Subversion Repositories shark

Rev

Rev 1086 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1085 pj 1
----------------------------------
2
Jumping Balls demo
3
 
4
by
5
 
6
Paolo Gai 1999-2001 - pj@sssup.it
7
 
8
----------------------------------
9
 
10
This demo was created to show some S.Ha.R.K. functionalities in the course
11
of Informatica Industriale , University of Pavia, Italy.
12
 
13
The demo is composed by an application (derived by the template application
14
distributed on the web site) and two init files.
15
 
16
The demo is composed by:
17
 
18
MAKEFILE     The makefile used to compile the application;
19
             demo is the rule to compile the application with a CBS scheduler
20
             demo2 is the rule to compile the application with a RR scheduler
21
README.TXT   This file
22
DEMO.H       Some constants used into the demo
23
INITFIL1.C   The CBS initfile
24
INITFIL2.C   The EDF initfile
25
INITFILE.C   A makefile that cover either EDF+CBS and RR
26
BALL.C       The Jumping balls part of the demo
27
DEMO.C       The main() function and some other utility function
28
JETCTRL.C    The JET part of the demo
29
 
30
 
31
The demo works as follows:
32
- It works at 640x480 16 bit colors
33
- on the left, there is the jumping ball arena, on the rigth there is the
34
  statistics about the tasks into the system.
35
 
36
- the tasks are guaranteed using CBS and EDF. The wcet and mean execution
37
  time on my portable after a few minutes are (us):
38
 
39
  JetCtrl   7400 max    7500 CBS met
40
  JetDummy   135 max     200 CBS met
41
  JetSlide  2100 max    2100 CBS met
42
  Balls      276 max     380 EDF wcet for hard ball,100 CBS met for soft ones
43
 
44
  The system should go overloaded with 40 soft balls.
45
 
46
- The idea is the following:
47
  - first, an edf guaranteed ball is created.
48
  - then, create a set of soft ball using space. since their met is < than the
49
    real met, they posticipate the deadlines.
50
  - if they are killed, they remain for some seconds in the zombie state
51
  - if a set of soft ball arde created (i.e., 10), and after a while all the
52
    others are created, the bandwidth is fully used, and the task posticipate
53
    their deadlines. the first set of tasks stops jumping when the bandwidth
54
    is full utilized by the newest balls until all the tasks have similar
55
    deadlines.
56
  - Note on the left the slides that represents the relative ratio
57
    between the tasks.
58
  - Note that in overload conditions the EDF task is still guaranteed
59
  - Note that PI is used with EDF, also if no theory says that it is good:
60
    - S.Ha.R.K. allows that, it is the user that have to choose if that is
61
      a non-sense
62
    - PI is independent from the implemnentation of the scheduling modules
63
  - if the second init file is used, RR is used instead of EDF+CBS.
64
  - In overload condition RR perform differently from EDF+CBS, giving to
65
    each task an equal fraction of bandwidth
66
 
67
  - note also:
68
    - the redefinition of the standard exception handler
69
    - the redefinition of the keys and the initialization of the keyboard
70
    - the myend exit function
71
    - the main() that terminates
72
    - the two parts (ball and jet) can be excluded using a #define
73
 
74
If You have any question, please contact the author...
75
 
1299 pj 76
Update (2003/12/19):
77
Just some more notes...
78
I usually show the four demos in the following order:
79
 
80
(first of all, tune the demo depending on how fast your notebook is; see demo.h)
81
 
82
ECP - EDF with CBS and PI... the white EDF ball still work also in overload; CBS balls just slow down but they still get their guaranteed bandwidth
83
 
84
RRP - Round Robin with Priority inheritance ... the EDF ball is at the same level of the others, all slow down...
85
 
86
RRN - 2 levels of Round Robin, without Priority inheritance ... when
87
there is overload, the white ball works ok, but the other have an impredicible
88
behavior (they execute many instances in one RR period)
89
 
90
ERN - EDF, RR, no priority inheritance - the white ball misses his deadline
91
just when there is an overload (all the other balls are queued on the same
92
semaphore, so the blocking time increase, and when there is overload the EDF
93
task misses also if it has not consumed his bandwidth). Note that it happens
94
also if the EDF task consume just a few microseconds... Real time does not
95
means "fast" :-)
96