Definition at line 33 of file WeightedPolicyImpl.hh.
Public Member Functions | |||||||||||
WeightedPolicyImpl (const char *name) | |||||||||||
Construct a WeightedPolicyImpl object with the given values. | |||||||||||
virtual | ~WeightedPolicyImpl () | ||||||||||
Deconstruct the policy. | |||||||||||
virtual char * | Name (void) throw (CORBA::SystemException) | ||||||||||
Mostly useful for debugging. | |||||||||||
virtual void | AddTask (Broker::Task_ptr new_task, const Broker::ScheduleParameters &sp) throw (CORBA::SystemException, Broker::DuplicateScheduleParameter, Broker::InvalidScheduleParameter, Broker::MissingScheduleParameter) | ||||||||||
NOTE: This method will be called before the reservation is made, giving the policy a chance to adjust any values.
| |||||||||||
virtual void | RemoveTask (Broker::Task_ptr added_task) throw (CORBA::SystemException) | ||||||||||
NOTE: This method will be called after the reservation has been destroyed, so it can safely reallocate the newly freed CPU time.
| |||||||||||
virtual Broker::TaskList * | GetTaskList (void) throw (CORBA::SystemException) | ||||||||||
| |||||||||||
virtual void | Activate (const Broker::TaskList &tasks) throw (CORBA::SystemException) | ||||||||||
NOTE: The policy is expected to discover and adjust the scheduling parameters of any currently executing tasks.
| |||||||||||
virtual void | Deactivate (void) throw (CORBA::SystemException) | ||||||||||
NOTE: The policy should change any scheduling parameters of the currently executing tasks, the next policy to be activated will handle any changes.
| |||||||||||
virtual Broker::CPUReserve | ChangeTaskCPU (Broker::RealTimeTask_ptr task, const Broker::CPUReserve &advice) throw (CORBA::SystemException, Broker::InvalidState) | ||||||||||
| |||||||||||
virtual CORBA::Float | GetMaxCPUAllocation (void) throw (CORBA::SystemException) | ||||||||||
| |||||||||||
virtual void | SetMaxCPUAllocation (CORBA::Float amount) throw (CORBA::SystemException) | ||||||||||
| |||||||||||
virtual void | SetTaskWeight (Broker::Task_ptr task, CORBA::UShort weight) throw (CORBA::SystemException) | ||||||||||
| |||||||||||
virtual CORBA::UShort | GetTaskWeight (Broker::Task_ptr task) throw (CORBA::SystemException) | ||||||||||
| |||||||||||
Static Public Attributes | |||||||||||
const float | DEFAULT_MAX_USED_CPU = 0.75 | ||||||||||
Maximum percentage of CPU to allocate to tasks. | |||||||||||
const float | DEFAULT_MIN_TASK_CPU = 0.02 | ||||||||||
Minimum percentage of CPU to allocate to a single task. | |||||||||||
Private Member Functions | |||||||||||
void | RepairTaskList (void) | ||||||||||
Repair the task list by removing any dead/unreachable objects. | |||||||||||
TaskData * | FindTaskData (Broker::RealTimeTask_ptr task) | ||||||||||
Find the TaskData node that corresponds to the given task. | |||||||||||
void | RedistributeCPU (void) | ||||||||||
Redistribute CPU to any tasks managed by this policy. | |||||||||||
Private Attributes | |||||||||||
CORBA::String_var | wp_Name | ||||||||||
The name of this object as registered with the NamingService. | |||||||||||
float | wp_MaxUsedCPU | ||||||||||
The maximum percentage of CPU time that we are allowed to allocate. | |||||||||||
float | wp_MinTaskCPU | ||||||||||
The minimum percentage of CPU time that a task must have. | |||||||||||
lnList | wp_List | ||||||||||
A list of TaskData objects. | |||||||||||
CORBA::ULong | wp_MaxDeadline | ||||||||||
The largest deadline of the tasks managed by this policy. | |||||||||||
unsigned long long | wp_TotalWeightedComputeTime | ||||||||||
Cached value for the weighted compute time of all the tasks. |
|
Construct a WeightedPolicyImpl object with the given values.
Definition at line 29 of file WeightedPolicyImpl.cc. References lnNewList(), require, wp_MaxUsedCPU, wp_MinTaskCPU, and wp_TotalWeightedComputeTime. |
Here is the call graph for this function:
|
NOTE: The policy is expected to discover and adjust the scheduling parameters of any currently executing tasks.
Definition at line 183 of file WeightedPolicyImpl.cc. References Broker::TaskList. |
|
NOTE: The policy should change any scheduling parameters of the currently executing tasks, the next policy to be activated will handle any changes.
Definition at line 189 of file WeightedPolicyImpl.cc. |
|
Find the TaskData node that corresponds to the given task.
Definition at line 405 of file WeightedPolicyImpl.cc. References lnList::lh_Head, lnNode::ln_Succ, require, and wp_List. |