0% found this document useful (0 votes)
8 views

CS ZG524ES ZG524MEL ZG524 - Real Time Operating System - Comprehensive -Make Up -Answer Keys

Uploaded by

s ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

CS ZG524ES ZG524MEL ZG524 - Real Time Operating System - Comprehensive -Make Up -Answer Keys

Uploaded by

s ranjan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Birla Institute of Technology & Science, Pilani

Work Integrated Learning Programmes Division


First Semester 2021-2022

Comprehensive Exam – Answer Keys


(EC-3 Make Up)

Course No. : CS ZG524/ES ZG524/MEL ZG524 ( Merged)


Course Title : Real Time Operating Systems
Nature of Exam : Open Book
Weightage : 50 % No. of Pages =
Duration : 2 Hours No. of Questions = 06
Date of Exam : 28.11.2021 ( 2 PM to 4 PM)

Note to Students:
1. Please follow all the Instructions to Candidates given on the cover page of the answer
book.
2. All parts of a question should be answered consecutively. Each answer should start
from a fresh page.
3. Assumptions made if any, should be stated clearly at the beginning of your answer.

Q.1 Draw the Finite State Machine of a telephone system. Also provide the 10
various steps and assumptions made. Marks

Solution Finite State Machine / Diagram 5 Marks

Steps:
1. The phone is idle and waiting for something to do.
2. You start to phone someone
3. You dial a number and start waiting for someone to answer the
remote phone 3 Marks
4. Someone answers the phone and you have a chat
5. You finish your conversation and hang up
6. If nobody answers the phone, you hang up and phone becomes idle
again
7. If there is an incoming call, then the phone starts to ring.
8. If you answer the phone, then you talk to the remote person
9. After finish talking, you hang up and the phone goes to idle state

Assumptions:
Step 1 assumes that you live alone and no one else could be on the
phone.
 The algorithm assumes the existence of a working phone and active 2 Marks
service.
 The algorithm assumes you are not deaf or mute.
 The algorithm assumes a normal corded phone

Q.2 What is RM Scheduling? Check if the following tasks are schedulable 5 Marks
by RM scheduling algorithm T(e,d) { T1(8,4), T2(12,4) , T3(20,4)}
Solution RM scheduling is a static uniprocessor scheduling algorithm. Processor 2 Marks
utilisation increases in a monotonic manner.

RM Schedulability constraint is
∑U(tas=1 to n)< = (n* (2(1/n)-1)) 2 Marks
0.50+0.33+0.20=1.03
(3*(2(1/3)-1))= 0.77

1 Mark
Hence the task set is not schedulable by RM Algorithm.

Q.3 Determine whether the following set of periodic real time tasks is 10
schedulable on a uniprocessor using RMA. Perform all necessary tests Marks
and check the conditions and provide the conclusion.

Task Start time Processing Period Deadline


(ms) time (ms) (ms) (ms)
T1 20 25 150 100
T2 40 7 40 40
T3 60 10 60 50
T4 25 10 30 20

Solution Total CPU Utilization for the given tasks


3 Marks

7 Marks
Q.4 Explain Priority Ceiling Protocol with an example. 10
Marks

Solution  Priority ceiling protocol extends priority inheritance to prevent 3 Marks


deadlocks.
– Assigned priorities of all jobs are fixed.
– Resources required by all jobs are known apriori before
the execution of any job begins.
 Priority ceiling of any resource is the highest priority of all jobs.
 Current priority ceiling is the highest priority ceiling of the
resources that are in use at the time.

Example
Explanation with an Example :7
Marks

Q.5 Define the following terms: 5 Marks


a) Release time
b) Response time
c) Completion time
d) Relative deadline
e) Absolute deadline

Solution Release time – the instant in time when a job becomes available for
execution
– May not be exact: Release time jitter so ri is in the interval [ri-,
ri+] – A job can be scheduled and executed at any time at, or 1*5 =5
after, its release time, provided its resource dependency Marks
conditions are met

• Response time – the length of time from the release time of the job to
the time instant when it completes
– Not the same as execution time, since may not execute
continually
• Completion time – the instant at which a job completes execution
• Relative deadline – the maximum allowable job response time
• Absolute deadline – the instant of time by which a job is required to be
completed (often called simply the deadline)
– absolute deadline = release time + relative deadline
– Feasible interval for a job Ji is the interval (ri, di]
Q.6 The feasible interval of each job in the precedence graph in Figure.The 10
execution times of all jobs is equal to 1. Marks
a. Find the effective release times and deadlines of the jobs in the
precedence graph
b. Find an EDF schedule of the jobs

Solution

7 Marks

3 Marks

You might also like