next up previous contents
Next: Aggregation Methods Up: Plugin Scheduler Interface Previous: Developer-defined Performance Metrics   Contents


Estimation Function

The default behavior of a SeD when a service request arrives from its parent agent is to store the following information in the request profile:

  1. FAST-based execution time predictions: DIET SeD s attempt to call FAST routines to obtain execution time predictions based on the type of service requested, if FAST was available at compilation time. If available, such predictions are stored in the performance estimate.
  2. NWS-based dynamic resource information: If NWS library functions are available, performance estimates may include dynamic resource performance information about CPU availability, free memory, and network bandwidth.
  3. Elapsed time since last execution: To implement the default round-robin behavior in absence of FAST and NWS facilities, each SeD stores a timestamp of its last execution. When a service request arrives, the difference between that timestamp and the current time is added to the performance estimate.
This is accomplished by using the diet_estimate_fast and diet_estimate_lastexec functions described in Section 7.3.1.

To implement a plugin scheduler, we define an interface that admits customizable performance estimation routines:


  typedef void (* diet_perfmetric_t)(    diet_profile_t*, 

estVector_t);

  diet_perfmetric_t 

diet_service_use_perfmetric(diet_perfmetric_t perfmetric_fn);
Thus, the type diet_perfmetric_t is a function pointer that takes as arguments a performance estimation (represented by the estVector_t object) and a DIET service request profile. The application developer can associate such a function, or performance estimation routine, with DIET services via the diet_service_use_perfmetric interface. This interface returns the previously registered performance estimation routine, if one was defined (and NULL otherwise). At this point, a service added using the diet_service_table_add function will be associated with the declared performance estimation routine. Additionally, a performance estimation routine so specified will be associated with all services added into the service table until another call to the diet_service_use_perfmetric interface is made. In the performance estimation routine, the SeD developer should store in the provided estimation vector any performance data used in the server response aggregation methods (described in the next section).


next up previous contents
Next: Aggregation Methods Up: Plugin Scheduler Interface Previous: Developer-defined Performance Metrics   Contents
DIET Team - 2008-07-17