Ignore:
Timestamp:
10/30/12 11:11:14 (12 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/example/localplugin/FCFSBF_DFSClusterPlugin.java

    r525 r531  
    2828public class FCFSBF_DFSClusterPlugin extends BaseLocalSchedulingPlugin { 
    2929 
    30         List<Processor> allocatedCPUs; 
    31         public FCFSBF_DFSClusterPlugin () { 
    32                 allocatedCPUs = new ArrayList<Processor>(); 
    33         } 
    34  
    3530        public SchedulingPlanInterface<?> schedule(SchedulingEvent event, TaskQueueList queues, JobRegistry jobRegistry, 
    3631                        ResourceManager resManager, ModuleList modules) { 
     
    3934                SchedulingPlan plan = new SchedulingPlan(); 
    4035                // our tasks are placed only in first queue (see 
    41                 // BaseLocalPlugin.placeJobsInQueues() method) 
     36                // BaseLocalSchedulingPlugin.placeJobsInQueues() method) 
    4237                TaskQueue q = queues.get(0); 
    4338                // chose the events types to serve. 
     
    7368                        cpuRequest = Double.valueOf(task.getCpuCntRequest()).intValue(); 
    7469                } catch (NoSuchFieldException e) { 
    75                         cpuRequest = 1; 
     70                        cpuRequest = 0; 
    7671                } 
    7772 
     
    7974                        List<ComputingResource> choosenResources = null; 
    8075                        List<Processor> processors = resourceManager.getProcessors(); 
    81                         processors.removeAll(allocatedCPUs); 
    8276                        if (processors.size() < cpuRequest) { 
    8377                                // log.warn("Task requires more cpus than is availiable in this resource."); 
     
    117111                                        cpu.getPowerInterface().setPState("P0"); 
    118112                        } 
    119  
    120113                } 
    121  
    122114        } 
    123115 
    124  
    125116} 
Note: See TracChangeset for help on using the changeset viewer.