Rev 882 | Rev 993 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
882 | trimarchi | 1 | /** |
2 | \mainpage FSF reference |
||
3 | |||
4 | This reference manual contains the description of the API provided |
||
5 | by the FSF library. |
||
6 | |||
7 | \section intro Introduction to FSF |
||
8 | |||
9 | The First Scheduling Framework (FSF) is the result of a joint |
||
10 | effort from four european research groups to propose an API for |
||
929 | lipari | 11 | flexible real-time scheduling in Real Time operating systems. See |
12 | <a href="http://130.243.76.81:8080/salsart/first/">the FIRST web |
||
13 | page</a> for more details in the project. |
||
882 | trimarchi | 14 | |
15 | \section lib Objectives |
||
16 | |||
929 | lipari | 17 | Scheduling theory generally assumes that real-time systems are mostly |
18 | composed of activities with hard real-time requirements, many systems |
||
19 | are built today by composing different application or components in |
||
20 | the same system, leading to a mixture of many different kinds of |
||
21 | requirements with small parts of the system having hard real-time |
||
22 | requirements and other larger parts with requirements for more |
||
23 | flexible scheduling, taking into account quality of service. Hard |
||
24 | real-time scheduling techniques are extremely pessimistic for the |
||
25 | latter part of the application, and consequently it is necessary to |
||
26 | use techniques that let the system resources be fully utilized to |
||
27 | achieve the highest possible quality. |
||
882 | trimarchi | 28 | |
929 | lipari | 29 | The FIRST project aims at developing a framework for a scheduling |
30 | architecture that provides the ability to compose several applications |
||
31 | or components into the system, and to flexibly schedule the available |
||
32 | resources while guaranteeing hard real-time requirements. The FIRST |
||
33 | Scheduling Framework (FSF) is independent of the underlying |
||
34 | implementation, and can run on different underlying scheduling |
||
35 | strategies. It is based on establishing service contracts that |
||
36 | represent the complex and flexible requirements of the application, |
||
37 | and which are managed by the underlying system to provide the required |
||
38 | level of service. |
||
882 | trimarchi | 39 | |
929 | lipari | 40 | FSF provides a generalized architecture framework that combines |
41 | different kinds of requirements: |
||
882 | trimarchi | 42 | |
929 | lipari | 43 | - co-operation and coexistence of standard real-time scheduling |
44 | schemes, time-triggered and eventtriggered, dynamic and fixed |
||
45 | priority based, as well as off-line based through a common |
||
46 | architecture that is independent on the underlying scheduling |
||
47 | mechanism |
||
882 | trimarchi | 48 | |
929 | lipari | 49 | - integration of different timing requirements such as hard and soft, |
50 | and more flexible notions |
||
882 | trimarchi | 51 | |
929 | lipari | 52 | - temporal encapsulation of subsystems in order to support the |
53 | composability and reusability of available components including |
||
54 | legacy subsystems. |
||
55 | |||
56 | FSF has been implemented in two POSIX compliant real-time operating |
||
57 | systems, <a href="http://marte.unican.es">MaRTE</a> and <a |
||
58 | href="http://shark.sssup.it/">SHARK</a>, which are based on FP and EDF |
||
59 | scheduling schemes, respectively, thus illustrating the platform |
||
60 | independence of the presented approach. |
||
61 | |||
62 | \section Service Contracts |
||
63 | |||
64 | The service contract is the mechanism that we have chosen for the |
||
65 | application to dynamically specify its own set of complex and flexible |
||
66 | execution requirements. From the application s perspective, the |
||
67 | requirements of an application or application component are written as |
||
68 | a set of service contracts, which are negotiated with the underlying |
||
69 | implementation. To accept a set of contracts, the system has to check |
||
70 | as part of the negotiation if it has enough resources to guarantee all |
||
71 | the minimum requirements specified, while keeping guarantees on all |
||
72 | the previously accepted contracts negotiated by other application |
||
73 | components. If as a result of this negotiation the set of contracts is |
||
74 | accepted, the system will reserve enough capacity to guarantee the |
||
75 | minimum requested resources, and will adapt any spare capacity |
||
76 | available to share it among the different contracts that have |
||
77 | specified their desire or ability for using additional capacity. |
||
78 | |||
79 | |||
80 | As a result of the negotiation process, if a contract is accepted, a |
||
81 | server is created for it. The server is a software object that is the |
||
82 | run-time representation of the contract; it stores all the information |
||
83 | related to the resources currently reserved for that contract, the |
||
84 | resources already consumed, and the resources required to handle the |
||
85 | budget consumption and replenishment events in the particular |
||
86 | operating system being used. |
||
87 | |||
88 | Because there are various application requirements specified in the |
||
89 | contract, they are divided into several groups, also allowing the |
||
90 | underlying implementation to give different levels of support trading |
||
91 | them against implementation complexity. This gives way to a modular |
||
92 | implementation of the framework, with each module addressing specific |
||
93 | application requirements. The minimum resources required by the |
||
94 | application to be reserved by the system are specified in the core |
||
95 | module. The requirements for mutual exclusive synchronization among |
||
96 | parts of the application being scheduled by different servers or among |
||
97 | different applications are specified in the shared objects |
||
98 | module. Flexible resource usage is associated with the spare capacity |
||
99 | and dynamic reclamation modules. The ability to compose applications |
||
100 | or application components with several threads of control, thus |
||
101 | requiring hierarchical scheduling of several threads inside the same |
||
102 | server are supported by the hierarchical scheduling module. Finally, |
||
103 | the requirements of distributed applications are supported by the |
||
104 | distributed and the distributed spare capacity modules. We will now |
||
105 | explain these modules together with their associated application |
||
106 | requirements. |
||
107 | |||
108 | |||
882 | trimarchi | 109 | */ |
110 | |||
111 | /** |
||
112 | \defgroup coremodule Core module |
||
113 | |||
929 | lipari | 114 | The core module contains the service contract information related to |
115 | the application minimum resource requirements, the operations required |
||
116 | to create contracts and negotiate them, and the underlying |
||
117 | implementation of the servers with a resource reservation mechanism |
||
118 | that allows the system to guarantee the resources granted to each |
||
119 | server. |
||
120 | |||
882 | trimarchi | 121 | This module includes the basic functions and services that are |
122 | provided by any FSF implementation. This module includes basic type |
||
123 | definitions, and functions to |
||
124 | |||
125 | - create a contract and initialize it |
||
126 | - set/get the basic parameters of a contract |
||
127 | - negotiate a service contract, obtaining a server id |
||
128 | - create and bind threads to servers |
||
129 | - create/destroy a synchronization object |
||
130 | - manage bounded workloads |
||
131 | */ |
||
132 | |||
133 | /** |
||
134 | \defgroup sparemodule Spare capacity sharing module |
||
135 | |||
929 | lipari | 136 | Many applications have requirements for flexibility regarding the |
137 | amount of resources that can be used. The spare capacity module allows |
||
138 | the system to share the spare capacity that may be left over from the |
||
139 | negotiation of the service contracts, in a static way. During the |
||
140 | negotiation, the minimum requested resources are granted to each |
||
141 | server, if possible. Then, if there is any extra capacity left, it is |
||
142 | distributed among those applications that have expressed their ability |
||
143 | to take advantage of it. |
||
144 | |||
145 | This module include functions for sharing the spare capacity in the |
||
146 | system between the servers. It allows to mainly to specify |
||
882 | trimarchi | 147 | additional contract parameters to allow the sharing of the spare |
929 | lipari | 148 | capacity. |
882 | trimarchi | 149 | |
150 | The features provided by this module are different from the |
||
151 | services provided by the Dynamic reclamation module. This module |
||
929 | lipari | 152 | influences the negotiation procedure (see the \ref core_negotiate |
153 | module). |
||
882 | trimarchi | 154 | |
155 | */ |
||
156 | |||
157 | /** |
||
158 | \defgroup hiermodule Hierarchical scheduling module |
||
159 | |||
929 | lipari | 160 | One of the application requirements that FSF addresses is the ability |
161 | to compose different applications, possibly using different scheduling |
||
162 | policies, into the same system. This can be addressed with support in |
||
163 | the system for hierarchical scheduling. The lower level is the |
||
164 | scheduler that takes care of the service contracts, using an |
||
165 | unspecified scheduling policy (for instance, a CBS on top of EDF, or a |
||
166 | sporadic server on top of fixed priorities). The top level is a |
||
167 | scheduler running inside one particular FSF server, and scheduling the |
||
168 | application threads with whatever scheduling policy they were |
||
169 | designed. In this way, it is possible to have in the same system one |
||
170 | application with, for example, fixed priorities, and another one |
||
171 | running concurrently with an EDF scheduler. |
||
882 | trimarchi | 172 | |
929 | lipari | 173 | We are currently providing three top-level schedulers: fixed |
174 | priorities, EDF, and table-driven. |
||
882 | trimarchi | 175 | */ |
176 | |||
177 | /** |
||
178 | \defgroup shobjmodule Shared Objects module |
||
179 | |||
929 | lipari | 180 | The shared objects module of FSF allows the application to specify in |
181 | the contract attributes all the information required to do the |
||
182 | schedulability analysis. |
||
882 | trimarchi | 183 | |
929 | lipari | 184 | The set of shared objects present in the system together with the |
185 | lists of critical sections specified for each contract are used for |
||
186 | schedulability analysis purposes only. A run-time mechanism for mutual |
||
187 | exclusion is not provided in FSF for two important reasons. One of |
||
188 | them is upward compatibility of previous code using regular primitives |
||
189 | such as mutexes or protected objects (in Ada); this is a key issue if |
||
190 | we want to persuade application developers to switch their systems to |
||
191 | the FSF environment. The second reason is that enforcing worst case |
||
192 | execution time for critical sections is expensive. The number of |
||
193 | critical sections in real pieces of code may be very high, in the tens |
||
194 | or in the hundreds per task, and monitoring all of them would require |
||
195 | a large amount of system resources. |
||
882 | trimarchi | 196 | |
929 | lipari | 197 | The FSF application does not depend on any particular synchronization |
198 | protocol, but there is a requirement that a budget expiration cannot |
||
199 | occur inside a critical section, because otherwise the blocking delays |
||
200 | could be extremely large. This implies that the application is allowed |
||
201 | to overrun its budget for the duration, at most, of the critical |
||
202 | section, and this extra budget is taken into account in the |
||
203 | schedulability analysis. |
||
204 | |||
882 | trimarchi | 205 | */ |
929 | lipari | 206 | |
207 | /** |
||
208 | \defgroup distjmodule Distributed module |
||
209 | |||
210 | @todo Peppe complete description |
||
211 | |||
212 | */ |
||
213 | |||
214 | /** |
||
215 | \defgroup distsparemodule Distributed spare capacity module |
||
216 | |||
217 | @todo Peppe complete description |
||
218 | |||
219 | */ |