Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MaxDecayTaskAdvocate Class Reference

Inheritance diagram for MaxDecayTaskAdvocate:

Inheritance graph
[legend]
Collaboration diagram for MaxDecayTaskAdvocate:

Collaboration graph
[legend]
List of all members.

Detailed Description

An advocate that reacts quickly to increases in CPU usage, but slow to react to decreases in usage, making it an ideal generic advocate.

The actual implementation works by sending an advice that reflects the highest usage seen in the last N periods, where N can be set using the SetDelegateAttribute method.

Definition at line 31 of file MaxDecayTaskAdvocate.hh.

Public Member Functions

 MaxDecayTaskAdvocate (void)
 Default constructor.

virtual ~MaxDecayTaskAdvocate (void)
 Destructor.

virtual void SetDelegateAttribute (const char *id, const CORBA::Any &value) throw (CORBA::SystemException)
 
Parameters:
id The attribute identifier.
value The new attribute value.


virtual CORBA::Any * GetDelegateAttribute (const char *id) throw (CORBA::SystemException)
 
Parameters:
id The attribute identifier.
Returns:
The attribute's current value.


virtual Broker::CPUReserve PassCPU (Broker::RealTimeTask_ptr rtt, const Broker::CPUReserve &status, const Broker::CPUReserve &advice, const Broker::KeyedReportParameters &krp) throw (CORBA::SystemException)
 This method would then be used by adaptation proxies to change the advice parameter to their liking.

Parameters:
rtt The task object that was actually added to the manager.
status The CPU usage of the task in microseconds.
advice The amount of CPU time, in microseconds, that the application would like for the next period.
krp Non-standard report parameters that are indexed by key name.
Returns:
The actual CPU reserve given to the task.
See also:
ChangeTaskCPU



Private Attributes

CORBA::ULong md_LastAdvice
 The last advice reported by this advocate.

CORBA::ULong md_SubMax
 The maximum observed usage that is still below the last advice given.

unsigned int md_Decay
 The number of periods left before the reservation will be dropped to the value of md_SubMax.

CORBA::ULong md_DecayAfter
 The number of periods after which the advice should decay.


Member Function Documentation

CORBA::Any_ptr MaxDecayTaskAdvocate::GetDelegateAttribute const char *  id  )  throw (CORBA::SystemException) [virtual]
 

Parameters:
id The attribute identifier.
Returns:
The attribute's current value.

Currently supported 'id' values are:

  • decay-after The number of periods to wait before dropping the CPU usage.
  • last-advice The last advice given by the advocate.

Reimplemented from DelegateMixin< T, T_var >.

Definition at line 77 of file MaxDecayTaskAdvocate.cc.

References DelegateMixin< T, T_var >::GetDelegateAttribute().

Here is the call graph for this function:

void MaxDecayTaskAdvocate::SetDelegateAttribute const char *  id,
const CORBA::Any &  value
throw (CORBA::SystemException) [virtual]
 

Parameters:
id The attribute identifier.
value The new attribute value.

Currently supported 'id' values are:

  • decay-after The number of periods to wait before dropping the CPU usage.

Reimplemented from DelegateMixin< T, T_var >.

Definition at line 49 of file MaxDecayTaskAdvocate.cc.

References DelegateMixin< T, T_var >::SetDelegateAttribute().

Referenced by paGetAdvocate().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Tue Jun 22 14:51:56 2004 for CPU Broker by doxygen 1.3.6