Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 759 → Rev 760

/shark/trunk/include/modules/edf.h
9,7 → 9,7
* Paolo Gai <pj@gandalf.sssup.it>
* Massimiliano Giorgi <massy@gandalf.sssup.it>
* Luca Abeni <luca@gandalf.sssup.it>
* (see the web pages for full authors list)
* Anton Cervin
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
21,11 → 21,11
 
/**
------------
CVS : $Id: edf.h,v 1.5 2004-05-17 15:03:50 anton Exp $
CVS : $Id: edf.h,v 1.6 2004-06-21 11:40:06 anton Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-05-17 15:03:50 $
Revision: $Revision: 1.6 $
Last update: $Date: 2004-06-21 11:40:06 $
------------
 
This file contains the scheduling module EDF (Earliest Deadline First)
38,7 → 38,8
wcet field and mit field must be != 0. They are used to set the wcet
and period of the tasks.
periodicity field can be either PERIODIC or APERIODIC
drel field must be <= mit. NOTE: a drel of 0 is interpreted as mit.
drel field must be <= mit. NOTE 1: a drel of 0 is interpreted as mit.
NOTE 2: The utilization of the task is computed as wcet/drel.
offset field specifies a release offset relative to task_activate or
group_activate.
 
60,8 → 61,8
 
Exceptions raised:
XUNVALID_GUEST
This level doesn't support guests. When a guest operation
is called, the exception is raised.
This level doesn't support guests of this type. When a guest
operation is called, the exception is raised.
 
The following exceptions may be raised by the module:
XDEADLINE_MISS
82,12 → 83,11
 
- Relative deadlines drel <= mit may be specified.
- An offset > 0 will delay the activation of the task by the same
amount of time. To synchronize a group of tasks, use the
group_activate function.
amount of time. To synchronize a group of tasks, assign suitable
offsets and then use the group_activate function.
- This level doesn't manage the main task.
- The level uses the priority and timespec_priority fields.
- A function to return the used bandwidth of a level is provided.
- The guest tasks don't provide the guest_endcycle function
- The guest tasks don't provide the guest_endcycle function.
- At init time, the user can specify the behavior in case of
deadline and wcet overruns. The following flags are available:
 
110,10 → 110,10
EDF_ENABLE_ACT_EXCEPTION When a periodic or sporadic task is activated
too often, an exception is raised.
 
- The functions EDF_get_dl_miss, EDF_get_wcet_miss, EDF_get_nact,
and EDF_get_nskip can be used to find out the number of missed
deadlines, number of wcet overruns, number of currently queued
periodic activations, and the number of skipped sporadic activations.
- The functions EDF_get_dl_miss, EDF_get_wcet_miss, EDF_get_act_miss,
and EDF_get_nact can be used to find out the number of missed
deadlines, the number of wcet overruns, the number of skipped
activations, and the number of currently queued periodic activations.
 
**/
 
148,28 → 148,37
 
__BEGIN_DECLS
 
 
/*+ flags... +*/
/* Level flags */
#define EDF_DISABLE_ALL 0
#define EDF_ENABLE_GUARANTEE 1 /*+ Task guarantee enabled +*/
#define EDF_ENABLE_WCET_CHECK 2 /*+ Wcet monitoring enabled +*/
#define EDF_ENABLE_DL_CHECK 4 /*+ Deadline monitoring enabled +*/
#define EDF_ENABLE_WCET_EXCEPTION 8 /*+ Wcet overrun exception enabled +*/
#define EDF_ENABLE_DL_EXCEPTION 16 /*+ Deadline overrun exception enabled +*/
#define EDF_ENABLE_ACT_EXCEPTION 32 /*+ Activation exception enabled +*/
#define EDF_ENABLE_ALL 63 /*+ All flags enabled +*/
#define EDF_ENABLE_GUARANTEE 1 /* Task guarantee enabled */
#define EDF_ENABLE_WCET_CHECK 2 /* Wcet monitoring enabled */
#define EDF_ENABLE_DL_CHECK 4 /* Deadline monitoring enabled */
#define EDF_ENABLE_WCET_EXCEPTION 8 /* Wcet overrun exception enabled */
#define EDF_ENABLE_DL_EXCEPTION 16 /* Deadline overrun exception enabled */
#define EDF_ENABLE_ACT_EXCEPTION 32 /* Activation exception enabled */
#define EDF_ENABLE_ALL 63 /* All flags enabled */
 
 
/*+ Registration function +*/
/* Registration function */
LEVEL EDF_register_level(int flags);
 
/*+ Returns the used bandwidth of a level +*/
 
/**** Public utility functions ****/
 
/* Get the bandwidth used by the level */
bandwidth_t EDF_usedbandwidth(LEVEL l);
 
/* Get the number of missed deadlines for a task */
int EDF_get_dl_miss(PID p);
 
/* Get the number of execution overruns for a task */
int EDF_get_wcet_miss(PID p);
 
/* Get the number of skipped activations for a task */
int EDF_get_act_miss(PID p);
 
/* Get the current number of queued activations for a task */
int EDF_get_nact(PID p);
int EDF_get_nskip(PID p);
 
 
__END_DECLS
#endif
/shark/trunk/include/modules/rm.h
9,7 → 9,7
* Paolo Gai <pj@gandalf.sssup.it>
* Massimiliano Giorgi <massy@gandalf.sssup.it>
* Luca Abeni <luca@gandalf.sssup.it>
* (see the web pages for full authors list)
* Anton Cervin
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
*
21,17 → 21,17
 
/**
------------
CVS : $Id: rm.h,v 1.5 2004-05-17 15:03:51 anton Exp $
CVS : $Id: rm.h,v 1.6 2004-06-21 11:40:06 anton Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-05-17 15:03:51 $
Revision: $Revision: 1.6 $
Last update: $Date: 2004-06-21 11:40:06 $
------------
 
This file contains the scheduling module RM (rate/deadline monotonic)
This file contains the scheduling module RM (rate-/deadline-monotonic)
 
Title:
RM (Rate/Deadline Monotonic)
RM (rate-/deadline-monotonic)
 
Task Models Accepted:
HARD_TASK_MODEL - Hard Tasks (Periodic and Sporadic)
38,7 → 38,8
wcet field and mit field must be != 0. They are used to set the wcet
and period of the tasks.
periodicity field can be either PERIODIC or APERIODIC
drel field must be <= mit. NOTE: a drel of 0 is interpreted as mit.
drel field must be <= mit. NOTE 1: a drel of 0 is interpreted as mit.
NOTE 2: The utilization of the task is computed as wcet/drel.
offset field specifies a release offset relative to task_activate or
group_activate.
 
48,21 → 49,20
period field is ignored
 
Description:
This module schedules periodic and sporadic tasks based on their
relative deadlines. The task guarantee is based on a simple
utilization approach. The utilization factor of a task is computed
as wcet/drel. (By default, drel = mit.) A periodic task must only
be activated once; subsequent activations are triggered by an
internal timer. By contrast, an sporadic task must be explicitely
activated for each instance. NO GUARANTEE is performed on guest
tasks. The guarantee must be performed by the level that inserts
guest tasks in the RM level.
 
This module schedules periodic and sporadic tasks based on fixed
priorities according to their relative deadlines. (By default, drel
= mit.) The task guarantee is based on a simple utilization
approach. The utilization factor of a task is computed as
wcet/drel. A periodic task must only be activated once; subsequent
activations are triggered by an internal timer. By contrast, an
sporadic task must be explicitely activated for each instance. NO
GUARANTEE is performed on guest tasks. The guarantee must be
performed by the level that inserts guest tasks in the RM level.
 
Exceptions raised:
XUNVALID_GUEST
This level doesn't support guests. When a guest operation
is called, the exception is raised.
This level doesn't support guests of this type. When a guest
operation is called, the exception is raised.
 
The following exceptions may be raised by the module:
XDEADLINE_MISS
83,12 → 83,11
 
- Relative deadlines drel <= mit may be specified.
- An offset > 0 will delay the activation of the task by the same
amount of time. To synchronize a group of tasks, use the
group_activate function.
amount of time. To synchronize a group of tasks, assign suitable
offsets and then use the group_activate function.
- This level doesn't manage the main task.
- The level uses the priority and timespec_priority fields.
- A function to return the used bandwidth of a level is provided.
- The guest tasks don't provide the guest_endcycle function
- The guest tasks don't provide the guest_endcycle function.
- At init time, the user can specify the behavior in case of
deadline and wcet overruns. The following flags are available:
 
111,10 → 110,10
RM_ENABLE_ACT_EXCEPTION When a periodic or sporadic task is activated
too often, an exception is raised.
 
- The functions RM_get_dl_miss, RM_get_wcet_miss, RM_get_nact,
and RM_get_nskip can be used to find out the number of missed
deadlines, number of wcet overruns, number of currently queued
periodic activations, and the number of skipped sporadic activations.
- The functions RM_get_dl_miss, RM_get_wcet_miss, RM_get_act_miss,
and RM_get_nact can be used to find out the number of missed
deadlines, the number of wcet overruns, the number of skipped
activations, and the number of currently queued periodic activations.
 
**/
 
149,32 → 148,37
 
__BEGIN_DECLS
 
 
/*+ flags... +*/
/* Level flags */
#define RM_DISABLE_ALL 0
#define RM_ENABLE_GUARANTEE 1 /*+ Task guarantee enabled +*/
#define RM_ENABLE_WCET_CHECK 2 /*+ Wcet monitoring enabled +*/
#define RM_ENABLE_DL_CHECK 4 /*+ Deadline monitoring enabled +*/
#define RM_ENABLE_WCET_EXCEPTION 8 /*+ Wcet overrun exception enabled +*/
#define RM_ENABLE_DL_EXCEPTION 16 /*+ Deadline overrun exception enabled +*/
#define RM_ENABLE_ACT_EXCEPTION 32 /*+ Activation exception enabled +*/
#define RM_ENABLE_ALL 63 /*+ All flags enabled +*/
#define RM_ENABLE_GUARANTEE 1 /* Task guarantee enabled */
#define RM_ENABLE_WCET_CHECK 2 /* Wcet monitoring enabled */
#define RM_ENABLE_DL_CHECK 4 /* Deadline monitoring enabled */
#define RM_ENABLE_WCET_EXCEPTION 8 /* Wcet overrun exception enabled */
#define RM_ENABLE_DL_EXCEPTION 16 /* Deadline overrun exception enabled */
#define RM_ENABLE_ACT_EXCEPTION 32 /* Activation exception enabled */
#define RM_ENABLE_ALL 63 /* All flags enabled */
 
/* Registration function */
LEVEL RM_register_level(int flags);
 
/*+ Registration function:
int flag Options to be used in this level instance
 
returns the level number at which the module has been registered.
+*/
LEVEL RM_register_level(int flag);
/**** Public utility functions ****/
 
/*+ Returns the used bandwidth of a level +*/
/* Get the bandwidth used by the level */
bandwidth_t RM_usedbandwidth(LEVEL l);
 
/* Get the number of missed deadlines for a task */
int RM_get_dl_miss(PID p);
 
/* Get the number of execution overruns for a task */
int RM_get_wcet_miss(PID p);
 
/* Get the number of skipped activations for a task */
int RM_get_act_miss(PID p);
 
/* Get the current number of queued activations for a task */
int RM_get_nact(PID p);
int RM_get_nskip(PID p);
 
 
__END_DECLS
#endif