Subversion Repositories shark

Rev

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

Rev Author Line No. Line
911 trimarchi 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
 ------------
943 trimarchi 23
 CVS :        $Id: tdstar.h,v 1.2 2005-02-14 15:51:26 trimarchi Exp $
911 trimarchi 24
 
25
 File:        $File$
943 trimarchi 26
 Revision:    $Revision: 1.2 $
27
 Last update: $Date: 2005-02-14 15:51:26 $
911 trimarchi 28
 ------------
29
 
30
 Title:
31
   TDSTAR
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 __TDSTAR_H__
99
#define __TDSTAR_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
typedef struct {
108
  int command;
109
  void *param;
110
} TDSTAR_command_message;
111
 
112
/* flags... */
113
#define TDSTAR_ENABLE_GUARANTEE      1  /* Task Guarantee enabled */
114
#define TDSTAR_ENABLE_ALL            1
115
 
116
#define TDSTAR_FAILED_GUARANTEE      8  /* used in the module, unsettabl
117
                                         in EDF_register_level... */
118
 
119
 
120
 
121
#define TDSTAR_LEVELNAME        "TDSTAR base"
122
#define TDSTAR_LEVEL_CODE       166
123
#define TDSTAR_LEVEL_VERSION    1
124
 
125
 
126
/* Registration function:
127
   int budget      The budget used by this module (see CBSSTAR.h)
128
   int master      The master module used by EDFSTAR
129
*/
130
LEVEL TDSTAR_register_level(int master);
131
 
132
/* returns respectively the number of dline, wcet or nact; -1 if error */
133
int TDSTAR_get_dline_miss(PID p);
134
int TDSTAR_get_wcet_miss(PID p);
135
int TDSTAR_get_nact(PID p);
136
 
137
/* resets respectively the number of dline, wcet miss; -1 if error */
138
int TDSTAR_reset_dline_miss(PID p);
139
int TDSTAR_reset_wcet_miss(PID p);
140
 
141
int TDSTAR_getbudget(LEVEL l, PID p);
142
int TDSTAR_setbudget(LEVEL l, PID p, int budget);
143
int TDSTAR_budget_has_thread(LEVEL l, int budget);
144
 
145
void TDSTAR_set_nopreemtive_current(LEVEL l);
146
void TDSTAR_unset_nopreemtive_current(LEVEL l);
147
 
148
void TDSTAR_start_simulation(LEVEL l);
943 trimarchi 149
void TDSTAR_settable(LEVEL l, fsf_table_driven_params_t *param, PID pd);
911 trimarchi 150
 
151
#endif
152