Cheddar user's guide
LIMI /EA 2215 Team
You will find here a (very) simple user's guide of Cheddar.
Cheddar is mainly designed for educational purpose. Cheddar is a free software,
and you are welcome to redistribute it under certain conditions; See the GNU
General Public License for details. Cheddar is developped by the LIMI/EA 2215
Team, University of Brest.
You want to improve this page ? Your english is better of mine (that's
certainly the case...) ? Feel free to contact us :-)))
Cheddar provides tools to check temporal constraints of real time tasks.
These tools are based on classical results from real time scheduling theory.
Before calling such tools, you must define a system which is mainly composed
of several processors and tasks.
To define a processor, choose the "Edit/Add/Add a processor" submenu.
The window below is then displayed :
Each processor has a name and hosts a scheduler. Scheduler can be preemptive of
not. Basically, you can
choose from 5 schedulers :
- Earliest Deadline First (EDF). Tasks can be periodics or not and are
scheduled according to their deadline.
- Least Laxity First (LLF). Tasks can be periodics or not and are scheduled
according to their laxity.
- Rate Monotonic. Tasks have to be periodics and deadlines must be equal
to periods. Tasks are scheduled according to their period.
- Deadline Monotonic. Tasks have to be periodic and are scheduled according
to their deadline.
- POSIX 4 scheduler. Tasks can be periodics or not. Like Rate Monotonic
and Deadline Monotonic, it's a fixed priority scheduler but you have to give
a priority level for each task of your system (with Rate Monotonic and Deadline
Monotonic, priorities are automaticly computed from period or deadline).
The Cheddar POSIX 4 scheduler supports SCHED_RR, SCHED_FIFO
and SCHED_OTHERS policies. SCHED_OTHERS is a time sharing
policy. SCHED_RR and SCHED_FIFO tasks must have priorities
range from 255 to 1. Priority level 0 is reserved to SCHED_OTHERS
tasks.
To get a detailed description on these schedulers, see your prefered real
time books.
In Cheddar, each time you define a processor, you can set its scheduler
to be preemptive or not. A quantum value can be given for the POSIX.4
SCHED_RR policy.
Lets see now how to define a task. Choose the "Edit/Add/Add a task
" submenu. The window below is then displayed :
At least, a task is defined by a name, a capacity (bound on its execution
time) and a place to run it (a processor). The other parameters are optionnals
but can be required for a particular scheduler. For instance, if you selected
a processor that owns a Rate Monotonic scheduler, you should give a deadline
and a period (all tasks must be periodics). In the same manner, the fields
"Policy" and "Priority" are dedicated to the POSIX 4 scheduler.
When you create tasks, in most of cases, Cheddar does not check if your
task parameters are errornous according to the scheduler you previously selected
: these checks are done before task analysis/scheduling. Of course, you
can always change task and processor parameters with "Edit/Update
", "Edit/Delete" and "Edit/Duplicate" menus.
When tasks and processors are defined, we can start task analysis. The
simpliest tools provided by Cheddar checks if a set of tasks meet thier
temporal constraints.
These tools can be called from the "Tools" Menu and from some
toolbar Buttons :
- From the submenu "Tools/Draw scheduling", the scheduling
of each processor is drawn on the top of the Cheddar main window (see below).
From the drawn scheduling, missed deadlines are shown and some statistics
are displayed (number of preemption for instance).
- From the submenu "Tools/Check scheduling faisability", response
time, base period and processor utilization level are computed and displayed
on the bottom of the Cheddar main window.
To get a comprehensive list of tools provided by Cheddar, see section
VI.
Information stored in a Cheddar simulation can be saved into project
files.
A project named foo is made of several files :
- foo.proc contains the processors of the project.
- foo.tsk contains the tasks of the project.
- foo.buff contains buffers shared between tasks of the project.
- foo.res contains shared resources of the project.
- And foo.msg contains messages received/sended from/to tasks
of a project.
There is two ways to load a saved project :
- At first, call the "File/Open" submenu, or click on the Open
Button, and then give the project name without file extensions (.proc
, .tsk, ...) .
- In the same manner, a project can be loaded from the command line.
For instance, to start Cheddar and load the project foo, just do
:
my_shell$cheddar foo
Saving a project can be done with the same "File" menu.
Project files are built in a binary format (sorry, we have no time to improve
that). So, you can not share project files between different hardware machines
(sparc and intel for instance).
WARNING : due to POSIX 4 scheduler information, you can not read CHEDDAR-1.1
projects with CHEDDAR-1.2 (sorry).
In Cheddar, you can define shared resources.
To create a resource click on "Edit/Add/Add a resource"
submenu.
The window below is then displayed :
If you want to define a resource, a processor and a least one task must exist.
A resource must have an
unique name and an initial value.
Resources are modeled as semaphore : resource's initial value
is then a semaphore initial value.
For each resource, you should select a protocol which manages the way the resources are
allocated/released.
Today, 3 protocols are available : PCP, PIP or no protocol.
During resource allocation, no protocol does not change task priorities
and only checks if the resource is free or not.
See a real time book to have details on PCP and PIP.
Of course, you
have to select a processor where the resource will be attach. Finally,
we must give information on tasks who need the resource.
Tasks held resources in critical section. So, you
have to give, the start and the end of each critical section.
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.
In the "Tools/Resources/Blocking time", you will
find services to compute bounds on blocking time
of each tasks.
In 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 begin of task
execution.
Message dependencies expressed relationship between a sender and a receiver task
of a given message.
Buffer dependencies expressed relationship between producer and consumer of data in a
given buffer.
To create a dependency, you may open the "Precedencies Graph" window by clicking on the appropriate
icon on the main Cheddar window. By the way, all Cheddar objects are imported in this window. All items
are represented by geometrical forms :
- Tasks -> circles.
- Messages -> rectangles.
- Buffers -> enveloppes.
If there is no item on the canvas, it means that you don't have created any dependency before... So you
can create one by entering in "create" mode (on the top left corner) and selecting 'task' on the radio
button. After that, create a task by clicking on the canvas, then a popup appears asking you to create a
new or import one task from Cheddar
(cf Part One).
It's the same succession of operations to create
others types of items (buffers and messages).
To create a dependencie, enter in "create" mode and select 'arrow' on the radio
button. Then click on a first item.
This item is the source of the dependencie. Click on a second item which
will be the destination of the dependencie. You can see a screenshot of such
a dependencie between a task and and a buffer below :
If you want to delete nodes or arrows, enter in "delete" mode and select the object
(task, arrow, message, buffer) on the radio
button. Click on a task, buffer or message should delete all dependencies of the clicked object.
Delete operations do not delete tasks, buffers and messages from the project files but
only dependencies of the project. To delete tasks, messages or buffers from
the project, choose the "Edit/Delete" submenu.
With precedencies, some simple scheduling tools are provided. See the submenu
"Tools/Precedencies"
Cheddar allows buffer definitions.
If you want to define a buffer, a processor and a least one task must exist.
Buffers are shared by periodics or aperiodicss tasks.
They are defined as follow :
- A buffer has a unique name, a size and is hosted by a processor.
- Two type of task can access a buffer : producer and consumer.
We suppose that a producer/consumer writes/reads a fixed size of information on a buffer
each time the task is activated (in the periodic case for instance).
For each producer or consumer, the buffer definition should
defines the size of the produced/consummed information.
A buffer can be added to a Cheddar project with the submenu "Edit/Add/Add a buffer". The
picture below is then displayed :
From buffer definitions, two kind of tools can be invoque by the user. At first, simulation
of the task scheduling can help the user to see how the buffer is filled or not with messages
(see "Tools/Buffer/Draw buffer utilization" submenu).
In this case, a scheduling simulation must be previously run. The result is then displayed in
a picture as below :
The picture contains for each time
the buffer utilization level.
The second tool provides a way to compute bound on buffers
utilization level. Bounds do not depend on the type of scheduler. Bounds can be computed
from the "Tools/Buffer/Compute buffer bound" submenu.
Every Cheddar analysis tools can be called from the "Tools" menu. Some of
them compute
tasks parameters, and then are composed of two submenus : "Compute and update
tasks set"
and "Compute and display".
Choose "Compute and update tasks set" submenu if you want to save computed
parameters into your project tasks set.
Choose "Compute and display" if you only want to display computed parameters
on the bottom of the main Cheddar window.
Provided analysis tools are :
- Clear work space. Clean the working area (main window). Do not
change anything on the project itself.
- Scheduling tools : from this submenu, you can draw scheduling
("Tools/Scheduling/Draw scheduling" submenu), compute response time, base period,
processor utilization and processor busy period ("Tools/Scheduling/Check scheduling
"). Some priorities affectation algorithms are also provided
(Rate Monotonic and Deadline Monotonic). The
"Tools/Scheduling/Options" allows you to tune how scheduling
simulation is done.
- Shared resources tools. From there, you can compute blocking
time from a set of tasks and a set of resources. Blocking time evaluation
is available for PCP and PIP protocols.
- Buffers analysis. The submenu "Tools/Buffer" can help you to
set size of buffers shared by periodic tasks. At first, you can do simulation of buffer utilization
from a scheduling simulation
("Tools/Buffer/Draw buffer").
You can also compute bounds on buffers
("Tools/Buffer/Compute Buffer Bounds" submenu).
Bounds computed here
suppose that each task which is defined as "procuder", produces one message
per periodic activation. In the same manner, each "consumer"
extracts one
message during each of its periodic activation.
- Precedencies tools . You will find here some heuristic/algorithms
that can schedule or check faisability of a tasks set with dependencies. First
of all, task deadlines or task priorities can be set according to Chetto
and Blazewicz heuristic.
Secondly, end to end response time bounds are also provided with a Holistic computation tool.
End to end response time includes message transmission delay
and buffer memorisation delay.
Contact : Frank Singhoff
(singhoff@univ-brest.fr)
Last update : october the 8th, 2002