Percentile predictor

Data Structures

struct  percpred_params_struct
 Parameters for percpred predictor. More...
struct  percpred_struct
 Percentile Predictor class definition. More...

Files

file  percpred.h
 

Private interface for the Percentile Predictor.


file  percpred_lib.h
 

Public interface for the Percentile predictor.


Defines

#define PERCPRED_DEF_SAMPLESIZE   3
 Default sample size.
#define PERCPRED_DEF_DISCARDED   0
 Default number of discarded samples (0 corresponds to WCET).

Typedefs

typedef struct
percpred_params_struct 
percpred_params_t
 Parameters for percpred predictor.
typedef struct percpred_struct percpred_t
 Percentile Predictor class definition.

Functions

qos_rv percpred_register (void)
 Register the Percentile Predictor class with the framework.
qos_rv percpred_init (void *self, void *params)
 Initialize a percpred object.
qos_rv percpred_final (qmgr_pred_t *self)
 Virtual destructor for a percpred object.
qos_rv percpred_add_sample (qmgr_pred_t *pred, qres_time_t new_sample)
 Virtual add_sample function for percpred object.
qres_time_t percpred_get_exp_value (qmgr_pred_t *pred)
qos_rv percpred_set_defaults (void)
 Configures a Percentile predictor with default parameters.
qos_rv percpred_set_sample_size (int sample_size)
 Sets the sample size for the Percentile predictor.
qos_rv percpred_set_discarded (int num_discarded)
 Sets the number of samples (less than sample_size) to be discarded, in order to get the desire percentile estimate.

Function Documentation

qos_rv percpred_add_sample ( qmgr_pred_t pred,
qres_time_t  new_sample 
)

Virtual add_sample function for percpred object.

Todo:
2 versions of this function could be created, one for the initial transitory when the window is not yet full, and another to be used when the window is full. By replacing the function pointer in the virtual table, this would avoid one comparison in the function at each call.
qos_rv percpred_init ( void *  self,
void *  params 
)

Initialize a percpred object.

Parameters:
params Set of parameters passed by the QMGR Library. When in kernel-space, self is a pointer to user-space.
Returns:
QOS_OK or one of the predefined error-codes.
qos_rv percpred_set_discarded ( int  num_discarded  ) 

Sets the number of samples (less than sample_size) to be discarded, in order to get the desire percentile estimate.

For example, setting it to 0 implies we want to estimate the WCET. Setting it to 1, when sample_size has been set to 12, implies we want to estimate the 91.6-th percentile (11/12 = 91.6666). Setting it to 2, when sample_size has been set to 12, implies we want to estimate the 83.3-th percentile (10/12 = 83.3333).

qos_rv percpred_set_sample_size ( int  sample_size  ) 

Sets the sample size for the Percentile predictor.

Parameters:
sample_size The number of past samples on which the moving average is computed
Generated on Mon Aug 2 22:38:48 2010 for qosmgr by  doxygen 1.6.3