IV. Scheduling with dependencies

This chapter describes services provided by Cheddar when the system you want to study has task dependencies. By task dependencies, we mean resources shared by several tasks (ex : semaphores) or precedency relationships between several tasks (due to buffer access or message exchange or also constraints between the end of a task and the start of another one).

IV.1 Shared resources analysis tools.



With Cheddar, you can define shared resources. Shared resources can be seen as semaphores. They can be accessed by several tasks. Tasks that require access to an already allocated semaphore are blocked (and then, unscheduled). To define a shared resource in a Cheddar project, call the submenu "Edit/Entities/Softwares/Resource". The window below is then displayed :

Figure 4.1 Add a new shared resource



Before adding a shared resource, at least one processor and one task must already exist in your project. A resource is defined by the following information :

  1. An unique name.
  2. An initial value/state (simular to a semaphore initial value). During a scheduling simulation, at a given time, if a resource value is equal or less than zero, the requesting tasks are blocked until the semaphore/shared resource is released. An initial value equal to 1 allows you to design a shared resource that is initially free and that can be used by only one task at a given time.
  3. A protocol. Currently, you can choose between PCP (for Priority Ceiling Protocol), PIP (for Priority Inheritance Protocol) or "No protocol". With PCP or PIP, accessing shared resources may change task priorities [SHA 90]. The "No protocol" just means that no task prioriy will be changed at accessing the shared resource.
  4. A processor name. Each shared resource has to be hosted by a given processor.
  5. A priority. ...
  6. A priority assignment. ...:
  7. Finally, we must give information on tasks that need the resource. Tasks hold resources in critical section. Each critical section has to be defined by : Of course, you can define several critical sections for a given task of a given shared resource.


By default, shared resources analysis tools are not included in the scheduling simulation engine of Cheddar. See "Tools/Scheduling/Options" if you want to take care of shared resources during scheduling simulation and if you want to display shared resources time line. Blocking time on shared resources can be computed from scheduling simulation analysis if scheduling simulation is invoked from the sub-menu "Tools/Scheduling/Scheduling Simulation".

Finally, from the "Tools/Resources/Bound on Blocking time" sub-menu, you will find services to compute bounds on blocking time of each tasks. These bounds are computed without assumption on the scheduling actually generated for the analyzed system. To compute blocking time bound, shared resources have to used PCP or PIP protocols.


IV.2 Task precedencies : the dependencies.



With Cheddar, dependencies are links between at least two tasks. There are three different types of dependencies : precedencies, message and buffer dependencies. Precendencies express order constraints between end or beginning of task execution. Message dependencies express relationships between a sender and a receiver task of a given message. Buffer dependencies express relationships between producer and consumer of data in a given buffer.

To create a dependency, choose "Edit/Entities/Softwares/Dependencies". The window of figure 4.2 is then displayed :

Figure 4.1 Add a new dependency



A dependency is characterized by:
  1. The type of dependency. We distinguish:

IV.3 Buffer analysis tools.



Cheddar allows you to define buffers shared by tasks. If you want to define a buffer, a processor, an address space and a least one task have to be defined before. A buffer can be added to a Cheddar project with the submenu "Edit/Entities/Softwares/Buffer". The window below is then displayed :


Figure 4.2 Add a new buffer


Like tasks, two kinds of tools can be invoked by the user from a buffer : simulation and feasibility tools. At first, the simulation of the task scheduling can help the user to see how the buffer is filled or not with messages (see "Tools/Buffer/Buffer simulation" submenu). In this case, a scheduling simulation must be previously run. The result is then displayed in a window as below :
Buffer Feasibility mainly consists of computing buffer bounds. Bounds computed here suppose that each task that is defined as "producer", produces one message per periodic activation. In the same manner, each "consumer" extracts one message during each of its periodic activation.





Figure 4.3 Display buffer utilization factor computed from scheduling simulation


The picture contains the buffer utilization level for each time.
Second, the feasibility tool provides a way to compute bounds on buffer utilization level. At the time we write this User's guide, bounds do not depend on the type of the scheduler. Bounds can be computed from the "Tools/Buffer/Buffer feasibility" submenu.


IV.4 Message scheduling services.











Contact : Frank Singhoff mailto:singhoff@univ-brest.fr
Last update : January, the 4th, 2019