Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 690 → Rev 691

/shark/trunk/include/kernel/model.h
21,11 → 21,11
 
/**
------------
CVS : $Id: model.h,v 1.10 2004-05-25 12:14:35 giacomo Exp $
CVS : $Id: model.h,v 1.11 2004-05-26 15:35:31 anton Exp $
 
File: $File$
Revision: $Revision: 1.10 $
Last update: $Date: 2004-05-25 12:14:35 $
Revision: $Revision: 1.11 $
Last update: $Date: 2004-05-26 15:35:31 $
------------
 
This file contains the definitions of the task and resource models.
263,10 → 263,6
#define SAVE_ARRIVALS 0
#define SKIP_ARRIVALS 1
 
#define NO_PREDEFINED_SCALING 0
#define WCET_SCALING 1
#define PERIOD_SCALING 2
 
/* -----------------------------------------------------------------------
DUMMY_TASK_MODEL: model used only for the dummy task
----------------------------------------------------------------------- */
479,6 → 475,7
The default model set noraiseexc and period to 0, and accept a deadline
*/
 
 
typedef struct {
TASK_MODEL t;
TIME period;
509,14 → 506,47
#define job_task_def_trace(m) task_def_trace((m).t)
#define job_task_def_notrace(m) task_def_notrace((m).t)
 
 
/* -----------------------------------------------------------------------
ELASTIC_TASK_MODEL: Elastic Task
----------------------------------------------------------------------- */
 
/* This model implements an elastic task. An elastic task is described by
the following attributes:
 
Tmin - The nominal (minimum) period. This is the period the task
wants to execute at whenever there are enough resources.
 
Tmax - The maximum tolerable period. The elastic model will never
force the task to execute at a longer period than this.
 
C - The declared worst-case execution time. By default,
an exception will be raised if the wcet is violated.
 
E - The elasticity coefficient. A coefficient of 0 means
that its utilization cannot be changed by the elastic
algorithm. A large number means that the task is very
elastic. The default value is 0.
 
beta - This parameter determines how the elastic scaling is done.
PERIOD_SCALING means that the period will be changed, while
WCET_SCALING means that the wcet will be changed. The
default is PERIOD_SCALING.
*/
 
 
/* Elastic Task */
 
#define PERIOD_SCALING 0
#define WCET_SCALING 1
 
 
typedef struct {
TASK_MODEL t;
TIME Tmin;
TIME Tmax;
TIME wcet;
int kelastic;
TIME C;
int E;
int beta;
int arrivals;
} ELASTIC_TASK_MODEL;
525,9 → 555,9
task_default_model((m).t,ELASTIC_PCLASS), \
(m).Tmin = 0, \
(m).Tmax = 0, \
(m).wcet = 0, \
(m).kelastic = 0, \
(m).beta = NO_PREDEFINED_SCALING, \
(m).C = 0, \
(m).E = 0, \
(m).beta = PERIOD_SCALING, \
(m).arrivals = SKIP_ARRIVALS
#define elastic_task_def_level(m,l) task_def_level((m).t,l)
#define elastic_task_def_arg(m,a) task_def_arg((m).t,a)
540,8 → 570,8
#define elastic_task_def_ctrl_jet(m) task_def_ctrl_jet((m).t)
#define elastic_task_def_period(m,min,max) (m).Tmin = (min),\
(m).Tmax = (max)
#define elastic_task_def_wcet(m,w) (m).wcet = (w)
#define elastic_task_def_param(m,k,b) (m).kelastic = (k), \
#define elastic_task_def_wcet(m,w) (m).C = (w)
#define elastic_task_def_param(m,E,b) (m).E = (E), \
(m).beta = (b)
#define elastic_task_def_save_arrivals(m) (m).arrivals = SAVE_ARRIVALS
#define elastic_task_def_skip_arrivals(m) (m).arrivals = SKIP_ARRIVALS
/shark/trunk/include/modules/elastic.h
45,7 → 45,7
#define ELASTIC_ENABLE_GUARANTEE 1 /*+ Task Guarantee enabled +*/
#define ELASTIC_ENABLE_ALL 1
 
LEVEL ELASTIC_register_level(int flags, LEVEL master);
LEVEL ELASTIC_register_level(int flags, LEVEL master, bandwidth_t U);
 
__END_DECLS
#endif