Subversion Repositories shark

Rev

Rev 1300 | 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
1300 pj 23
ECP.C, ERN.C, RRP.C, RRN.C  Various initfiles
1085 pj 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
The demo works as follows:
31
- It works at 640x480 16 bit colors
32
- on the left, there is the jumping ball arena, on the rigth there is the
33
  statistics about the tasks into the system.
34
 
35
- the tasks are guaranteed using CBS and EDF. The wcet and mean execution
36
  time on my portable after a few minutes are (us):
37
 
38
  JetCtrl   7400 max    7500 CBS met
39
  JetDummy   135 max     200 CBS met
40
  JetSlide  2100 max    2100 CBS met
41
  Balls      276 max     380 EDF wcet for hard ball,100 CBS met for soft ones
42
 
43
  The system should go overloaded with 40 soft balls.
44
 
45
- The idea is the following:
46
  - first, an edf guaranteed ball is created.
47
  - then, create a set of soft ball using space. since their met is < than the
48
    real met, they posticipate the deadlines.
49
  - if they are killed, they remain for some seconds in the zombie state
50
  - if a set of soft ball arde created (i.e., 10), and after a while all the
51
    others are created, the bandwidth is fully used, and the task posticipate
52
    their deadlines. the first set of tasks stops jumping when the bandwidth
53
    is full utilized by the newest balls until all the tasks have similar
54
    deadlines.
55
  - Note on the left the slides that represents the relative ratio
56
    between the tasks.
57
  - Note that in overload conditions the EDF task is still guaranteed
58
  - Note that PI is used with EDF, also if no theory says that it is good:
59
    - S.Ha.R.K. allows that, it is the user that have to choose if that is
60
      a non-sense
61
    - PI is independent from the implemnentation of the scheduling modules
62
  - if the second init file is used, RR is used instead of EDF+CBS.
63
  - In overload condition RR perform differently from EDF+CBS, giving to
64
    each task an equal fraction of bandwidth
65
 
66
  - note also:
67
    - the redefinition of the standard exception handler
68
    - the redefinition of the keys and the initialization of the keyboard
69
    - the myend exit function
70
    - the main() that terminates
71
    - the two parts (ball and jet) can be excluded using a #define
72
 
73
If You have any question, please contact the author...
74
 
1299 pj 75
Update (2003/12/19):
76
Just some more notes...
77
I usually show the four demos in the following order:
78
 
79
(first of all, tune the demo depending on how fast your notebook is; see demo.h)
80
 
81
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
82
 
83
RRP - Round Robin with Priority inheritance ... the EDF ball is at the same level of the others, all slow down...
84
 
85
RRN - 2 levels of Round Robin, without Priority inheritance ... when
86
there is overload, the white ball works ok, but the other have an impredicible
87
behavior (they execute many instances in one RR period)
88
 
89
ERN - EDF, RR, no priority inheritance - the white ball misses his deadline
90
just when there is an overload (all the other balls are queued on the same
91
semaphore, so the blocking time increase, and when there is overload the EDF
92
task misses also if it has not consumed his bandwidth). Note that it happens
93
also if the EDF task consume just a few microseconds... Real time does not
94
means "fast" :-)