Subversion Repositories shark

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1655 giacomo 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
 ------------
23
 CVS :        $Id: edfact.h,v 1.1.1.1 2004-05-24 18:03:39 giacomo Exp $
24
 
25
 File:        $File$
26
 Revision:    $Revision: 1.1.1.1 $
27
 Last update: $Date: 2004-05-24 18:03:39 $
28
 ------------
29
 
30
 This file contains the server EDFACT (EDF with pending activations)
31
 
32
 Title:
33
   EDFACT
34
 
35
 Task Models Accepted:
36
   HARD_TASK_MODEL - Hard Tasks (only Periodic)
37
     wcet field and mit field must be != 0. They are used to set the wcet
38
       and period of the tasks.
39
     periodicity field can be only PERIODIC
40
     drel field is ignored
41
 
42
 Guest Models Accepted:
43
   JOB_TASK_MODEL - a single guest task activation
44
     Identified by an absolute deadline and a period.
45
     period field is ignored
46
 
47
 Description:
48
   This module schedule his tasks following the classic EDF scheme.
49
   The task guarantee is based on the factor utilization approach.
50
   The tasks scheduled are only periodic.
51
   All the task are put in a queue and the scheduling is based on the
52
   deadline value.
53
   NO GUARANTEE is performed on guest tasks. The guarantee must be performed
54
   by the level that inserts guest tasks in the EDF level.
55
   If a task miss a deadline a counter is incremented.
56
   If a task exausts the wcet a counter is incremented
57
   No ZOMBIE support!!!!!!
58
 
59
 Exceptions raised:
60
   XUNVALID_GUEST XUNVALID_TASK
61
     some primitives are not implemented:
62
     task_sleep, task_delay, guest_endcycle, guest_sleep, guest_delay
63
 
64
   XACTIVATION
65
     If a task is actiated through task_activate or guest_activate more than
66
     one time
67
 
68
 Restrictions & special features:
69
   - This level doesn't manage the main task.
70
   - At init time we have to specify:
71
       . guarantee check
72
          (when all task are created the system will check that the task_set
73
          will not use more than the available bandwidth)
74
   - A function to return the used bandwidth of the level is provided.
75
   - Functions to return and reset the nact, wcet and dline miss counters
76
 
77
**/
78
 
79
/*
80
 * Copyright (C) 2001 Paolo Gai
81
 *
82
 * This program is free software; you can redistribute it and/or modify
83
 * it under the terms of the GNU General Public License as published by
84
 * the Free Software Foundation; either version 2 of the License, or
85
 * (at your option) any later version.
86
 *
87
 * This program is distributed in the hope that it will be useful,
88
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
89
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
90
 * GNU General Public License for more details.
91
 *
92
 * You should have received a copy of the GNU General Public License
93
 * along with this program; if not, write to the Free Software
94
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
95
 *
96
 */
97
 
98
 
99
#ifndef __EDFACT_H__
100
#define __EDFACT_H__
101
 
102
#include <ll/ll.h>
103
#include <kernel/config.h>
104
#include <sys/types.h>
105
#include <kernel/types.h>
106
 
107
 
108
 
109
 
110
 
111
 
112
 
113
 
114
/*+ flags... +*/
115
#define EDFACT_ENABLE_GUARANTEE      1  /*+ Task Guarantee enabled +*/
116
#define EDFACT_ENABLE_ALL            1
117
 
118
#define EDFACT_FAILED_GUARANTEE      8  /*+ used in the module, unsettabl
119
                                         in EDF_register_level... +*/
120
 
121
 
122
 
123
 
124
 
125
#define ELASTIC_HARD_PCLASS 0x0600                              
126
 
127
#define EDFACT_LEVELNAME        "EDFACT base"
128
#define EDFACT_LEVEL_CODE       166
129
#define EDFACT_LEVEL_VERSION    1
130
 
131
 
132
/*+ Registration function:
133
    int flags     Options to be used in this level instance...
134
 
135
    returns the level number at which the module has been registered.
136
+*/
137
LEVEL EDFACT_register_level(int flags);
138
 
139
/*+ Returns the used bandwidth of a level +*/
140
bandwidth_t EDFACT_usedbandwidth(LEVEL l);
141
 
142
/*+ returns respectively the number of dline, wcet or nact; -1 if error +*/
143
int EDFACT_get_dline_miss(PID p);
144
int EDFACT_get_wcet_miss(PID p);
145
int EDFACT_get_nact(PID p);
146
 
147
/*+ resets respectively the number of dline, wcet miss; -1 if error +*/
148
int EDFACT_reset_dline_miss(PID p);
149
int EDFACT_reset_wcet_miss(PID p);
150
 
151
#endif
152