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. Elapsed time since last execution: To implement the default round-robin behavior in absence of scheduling 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_lastexec functions described in Section 9.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*, 



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).

The DIET Team - Mer 29 nov 2017 15:13:36 EST