Subversion Repositories shark

Rev

Rev 1089 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1089 pj 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
/**
22
 ------------
1123 pj 23
 CVS :        $Id: edfstar.h,v 1.2 2003-01-07 17:10:17 pj Exp $
1089 pj 24
 
25
 File:        $File$
1123 pj 26
 Revision:    $Revision: 1.2 $
27
 Last update: $Date: 2003-01-07 17:10:17 $
1089 pj 28
 ------------
29
 
30
 Title:
31
   EDFSTAR
32
 
33
 Task Models Accepted:
34
   HARD_TASK_MODEL - Hard Tasks (only Periodic)
35
     wcet field and mit field must be != 0. They are used to set the wcet
36
       and period of the tasks.
37
     periodicity field can be only PERIODIC
38
     drel field is ignored
39
 
40
 Guest Models Accepted:
41
   JOB_TASK_MODEL - a single guest task activation
42
     Identified by an absolute deadline and a period.
43
     period field is ignored
44
 
45
 Description:
46
 
47
   This module schedule his tasks following the classic EDF
48
   scheme. This module is derived from the EDFACT Scheduling Module.
49
 
50
   This module can not stay alone: when it have to schedule a task, it
51
   simply inserts it into another master module using a
52
   BUDGET_TASK_MODEL.
53
 
54
   No Task guarantee is performed at all.
55
   The tasks scheduled are only periodic.
56
   All the task are put in a queue and the scheduling is based on the
57
   deadline value.
58
   If a task miss a deadline a counter is incremented.
59
   If a task exausts the wcet a counter is incremented
60
   No ZOMBIE support!!!!!!
61
 
62
 Exceptions raised:
63
   XUNVALID_GUEST XUNVALID_TASK
64
     some primitives are not implemented:
65
     task_sleep, task_delay, guest_endcycle, guest_sleep, guest_delay
66
 
67
   XACTIVATION
68
     If a task is actiated through task_activate or guest_activate more than
69
     one time
70
 
71
 Restrictions & special features:
72
   - This level doesn't manage the main task.
73
   - Functions to return and reset the nact, wcet and dline miss
74
     counters are provided
75
 
76
**/
77
 
78
/*
79
 * Copyright (C) 2001 Paolo Gai
80
 *
81
 * This program is free software; you can redistribute it and/or modify
82
 * it under the terms of the GNU General Public License as published by
83
 * the Free Software Foundation; either version 2 of the License, or
84
 * (at your option) any later version.
85
 *
86
 * This program is distributed in the hope that it will be useful,
87
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
88
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
89
 * GNU General Public License for more details.
90
 *
91
 * You should have received a copy of the GNU General Public License
92
 * along with this program; if not, write to the Free Software
93
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
94
 *
95
 */
96
 
97
 
98
#ifndef __EDFSTAR_H__
99
#define __EDFSTAR_H__
100
 
101
#include <ll/ll.h>
102
#include <kernel/config.h>
103
#include <sys/types.h>
104
#include <kernel/types.h>
105
 
106
 
107
 
108
/* flags... */
109
#define EDFSTAR_ENABLE_GUARANTEE      1  /* Task Guarantee enabled */
110
#define EDFSTAR_ENABLE_ALL            1
111
 
112
#define EDFSTAR_FAILED_GUARANTEE      8  /* used in the module, unsettabl
113
                                         in EDF_register_level... */
114
 
115
 
116
 
117
#define EDFSTAR_LEVELNAME        "EDFSTAR base"
118
#define EDFSTAR_LEVEL_CODE       166
119
#define EDFSTAR_LEVEL_VERSION    1
120
 
121
 
122
/* Registration function:
123
   int budget      The budget used by this module (see CBSSTAR.h)
124
   int master      The master module used by EDFSTAR
125
*/
126
LEVEL EDFSTAR_register_level(int budget, int master);
127
 
128
/* returns respectively the number of dline, wcet or nact; -1 if error */
129
int EDFSTAR_get_dline_miss(PID p);
130
int EDFSTAR_get_wcet_miss(PID p);
131
int EDFSTAR_get_nact(PID p);
132
 
133
/* resets respectively the number of dline, wcet miss; -1 if error */
134
int EDFSTAR_reset_dline_miss(PID p);
135
int EDFSTAR_reset_wcet_miss(PID p);
136
 
137
#endif
138