You are on page 1of 2

Birla Institute of Technology & Science, Pilani Distance Learning Programmes Division First Semester 2007-2008 Comprehensive Examination

(EC-2 Regular) Course No. Course Title Nature of Exam Weightage Duration Date of Exam Note:
1. 2. 3. 4.

: BITS ZG553 : REAL TIME SYSTEMS : Open Book : 60% : 3 Hours : 29/09/2007 (FN)

No. of Pages =2 No. of Questions = 5

Please follow all the Instructions to Candidates given on the cover page of the answer book. All parts of a question should be answered consecutively. Each answer should start from a fresh page. Mobile phones and computers of any kind should not be brought inside the examination hall. Use of any unfair means will result in severe disciplinary action.

Q.1

Answer the following questions briefly and precisely. (a) What are the factors that affect the computer speed? (b) What are kernel and user modes? What is typically involved in context switch? What is its effect in a real-time system? (c) What characteristics of RISC architectures tend to reduce the total interrupt latency time as compared to CISC? (d) Does a system with high reliability means high availability? Explain. [4 x 3 = 12] The given system of tasks T1 (4,1); T2 (5,2,7); T3 (8, 1.5) is to be scheduled using cyclic executive algorithm. Answer the following (a) (b) (c) Draw the neat timing diagram of the schedule, choosing proper frame size. If a stream of aperiodic job arrives as follows, how will you schedule this stream? A1 (4,2.5); A2 (4,1.5) and A3 (8.5,2) Find average response time. Now apply Slack Stealing and find average response time. [4 + 4 + 4 = 12]

Q.2

Q.3

Consider the following five fixed-priority tasks: T1 = (10,2), T2 = (14,2), T3 = (15,3), T4 = (50,1) and T5 = (24,3). (a) Write time demand functions for tasks T3, T4, T5. (b) Suppose that the scheduler makes a scheduling decision every 1 unit of time, that is, the tick size is 1.0. Each time, it takes 0.1 unit of time regardless of whether there are jobs waiting to be scheduled and 0.2 additional unit of time to schedule each waiting job. Modify your time demand function in part (a) for T3. Is T3 schedulable? [3 + 9 = 12]

Q.4

Consider a fixed priority system in which there are four tasks Ti, for i = 1,2,3 and 4, with decreasing priorities. There are three resources X, Y and Z; each has 1 unit. The critical sections of the tasks are [X; 4],[Y;6],[Z; 5] and [X;3[Y;2[Z;1]]] respectively. The tasks never self- suspend. What are the blocking times of the tasks? Use priority-ceiling protocol. [12] Page 1 of 2

BITS ZG553 (EC-2 REGULAR)

FIRST SEMESTER 2007-2008

PAGE 2

Q.5

An embedded computer is required to control a pedestrian crossing. The crossing has Traffic lights for controlling the movement of vehicles, a button for pedestrians to press when they wish to cross the road, an illuminated pedestrian figure and a bleeper for signaling to pedestrians that it is safe to cross. It should work as follows: When the system is initialized the traffic lights are set to green, the illuminated figure is set to red, the bleeper is off and the button is enabled. When button is pressed, button is disabled. After 20 seconds, the traffic lights are turned to amber. After a further 10 seconds, the traffic lights are turned to red , the illuminated figure is turned to green and bleeper is turned on. After a further 30 seconds, bleeper is turned off, the illuminated figure is set to flashing green and the traffic lights are set to flashing amber. After a further 10 seconds, the illuminated figure is set to red, the traffic lights are set to green and the button is enabled.

Assume suitable places and transitions; use Petri net to describe the above system. Write the firing table up to 4 entries. [12]

**********