Sei sulla pagina 1di 4

Final Exam, Real Time Systems

2003 O t 22, 14-19

Wang Yi
:

Instru tions

1. Do not write on the ba k side.


2. Do not write more than ne essary.
3. Put page number on ea h page.
4. You may use al ulators, text books and le ture notes.
5. You may write in English or Swedish.
6. State whi h problems you have solved in the following table.
7. Please handle in this overage page together with your solutions.
Problem
1
2
3
4
5
6
7

Solved

Max. Points Your Points


20
10
20
10
10
10
20
SUMMA:
100

Name : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Pers.no. : . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Problem 1

(20p) Answer the following questions brie y.

1. What is the essential di eren e between testing and (formal) veri ation?
2. Why is FPS ( xed priority s heduling) widely used in pra ti e, but not EDF?
3. What are the main advantages of veri ation?
4. What are the di eren es between pre ise and utilization tests for s hedulability?
5. What is the main di eren e between hard and soft real time tasks?
6. Why is so di ult to a hieve predi tability in implementing a real time system?
7. What is the di eren e between EDF and DMS?
8. What are QoS, SoC, WCET and UML standing for?
9. What are the di eren es between modeling and programming (models and programs)?
10. What are the main di eren es between general-purpose and real-time operating systems
(10p) A wat h-dog is monitoring a ontrol software whi h must reset a variable
X to 0 at least on e every 100 time units. If it doesn't, the wat h-dog should send out a
warning. Model the wat h-dog using a timed automaton.

Problem 2

(20p)
Des ribe the un-bounded priority inversion problem using an example of your own.
Why is the blo king (due to priority inversion) un-bounded?
Assume three tasks: T1 ; T2 ; T3 with priority order P (T1 ) > P (T2 ) > P (T3 ). We use a tuple
(A; C1 ; P (S ); C2; V (S )) to represent a task meaning that the tast arrives at time A, omputes for C1 time units, lo ks semaphore S , omputes C2 time units and then releases S . Let
T1 = (5; 1; P (S1 ); 5; V (S1 )), T2 = (7; 1; P (S2 ); 50; V (S2 )) and T3 = (0; 2; P (S1 ); 10; V (S1 )).
Illustrate how NPP, BIP and HLP work at run-time using the three tasks. What are the
essential di eren es between NPP and HLP? What are the essential di eren es between
BIP and HLP?
Problem 3

(10p) Using RMS, what is the best pro essor utilization? How do you a hieve
it? Give one example.

Problem 4

Problem 5

(10p) Assume a system with one pro essor and three periodi tasks:
Task
A
B
C

Ti

Ci

300
400
530

100
100
120

Di

250
120
520

where T stands for period, C for WCET, o h D for deadline.


1. Assume that RMS is used to s hedule the tasks (ignore the deadlines given in the
table)
(a) What is the priority order?
(b) Draw the run-time s hedule for the rst 520 time units.
( ) Is the task set s hedulable? Motivate your answer.
2. Assume that DMS is used to s hedule the tasks:
(a) What is the priority order?
(b) Draw the run-time s hedule for the rst 520 time units.
( ) Is the task set s hedulable? Motivate your answer.
3. Assume that EDF is used to s hedule the tasks:
(a) Draw the run-time s hedule for the rst 520 time units.
(b) Is the task set s hedulable? Motivate your answer.
(10p) Assume a set of non-periodi and preemptive tasks ea h of whi h is
hara terized as a pair (Ci ; Di ): omputing time and Deadline.

Problem 6

1. Explain the notion of s hedulability and how do you test the s hedulability for su h
task sets without onstru ting a s hedule. (2p)
2. Give an example to show that non-preemptive Earliest Deadline First is not optimal.
(2p)
3. Explain (prove informally) why Preemptive
mal.(4p)

Earliest Deadline First (EDF) is opti-

4. Can EDF be used to improve the average response time for soft real time tasks?
Motivate your answer.(2p)

(20p) There is a set of tasks sending messages periodi ally over a bus (or a
network) through a ontroller whi h de ides who should send and who should wait. They
send messages of the same size. The ontroller should guarantee that whenever a task gets
the right to send, it should nish sending the same message. Now assume that the period
for ea h task is Ti and the transmission time for a message is Ci (ea h task sends only one
message ea h period). Design a ontrol algorithm for su h a ontroller, and show how to
al ulate the maximal delay for a message to rea h the re eiver sent by ea h task.
Problem 7

Potrebbero piacerti anche