0% found this document useful (0 votes)
60 views10 pages

Question Bank-Unit-1 To 6

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

Question Bank-Unit-1 To 6

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

Unit 1

1) Consider the real-time program described by the psuedocode below. Names of jobs are in
italic.

At 9AM, start: have breakfast and go to office;


At 10AM,
If there is class,
teach;
Else, help students;
When teach or help is done, eat lunch;
Until 2PM, sleep;
If there is a seminar,
If topic is interesting,
listen;
Else, read;
Else
write in office;
When seminar is over, attend social hour;
discuss;
jog;
eat dinner;
work a little more;
end _the_ day;

(a) Draw a task graph to capture the dependencies among jobs.

(b) Use as many precedence graphs as needed to represent all the possible paths of the program

2) A system contains nine non-preemptable jobs named Ji, for i = 1, 2, …, 9. Their execution times
are 3, 2, 2, 2, 2, 4, 4, 4, 4, and 9, respectively, their release times are equal to 0, and their deadlines are
12. J1 is the immediate predecessor of J9, and J4 is the immediate predecessor of J5, J6, J7, and J8.
There are no other precedence constraints. For all the jobs, Ji has a higher priority than Jk if i < k.

(a) Draw the precedence graph of the jobs.


(b) Can the jobs meet their deadlines if they are scheduled on three processors? Explain your
answer.
(c) Can the jobs meet their deadlines if we make them preemptable and schedule them
preemptively. Explain your answer.

3)How Real Time System is used in Air traffic Control discuss in detail also Compare hard and soft
real time system.

4)A system contains the following periodic tasks T1(e=3,d=7,p=20), T2(e=2,d=4,p=5) and
T3(e=2,d=8,p=10) phase() of all tasks is 0. Scheduled according to Least slack time (LST) algorithm. At
what time task T2 finish its operation ?
Q-5 What is the key difference between hard real time, soft real time and firm real time? Give at
least one example of real time task corresponding to these three categories.

What is the key difference between hard real time, soft real time and firm real time? Give at
least one example of real time task corresponding to these three categories.

The feasible interval of each job in the precedence graph shown in following figure. The execution time of all

jobs is equal to 1.

1) Find the effective release times and deadlines of the jobs in the precedence graph.2) Find an

EDF schedule of the jobs.

Q-8 Consider a system with three tasks. Task A has an execution time of 4 units and a deadline of 10
units. Task B has an execution time of 2 units and a deadline of 6 units. Task C has an execution time
of 3 units and a deadline of 8 units. Calculate the slack times and determine the order of execution
using LST scheduling.

Unit 2

1) A system uses the cyclic EDF algorithm to schedule sporadic jobs. The cyclic schedule of periodic
tasks in the system uses a frame size of 5, and a major cycle contains 6 frames. Suppose that the
initial amounts of slack time in the frames are 1, 0.5, 0.5, 0.5, 1, and 1.
(a) Suppose that a sporadic job S1(23, 1) arrives in frame 1, sporadic jobs S2(16, 0.8) and
S3(20, 0.5) arrive in frame 2. In which frame are the accepted sporadic jobs scheduled?
(b) Suppose that an aperiodic job with execution time 3 arrives at time 1. When will it be
completed, if the system does not do slack stealing?
2) Each of the following systems of periodic tasks is scheduled and executed according to a cyclic
schedule. For each system, choose an appropriate frame size. Preemptions are allowed, but the
number of preemptions should be kept small.
(a) (6, 1), (10, 2), and (18, 2).
(b) (8, 1), (15, 3), (20, 4), and (22, 6).

3)Which of the following fixed-priority task is not schedulable? Explain your answer.
T1(5,1) T2(3,1) T3(7,2.5) T4(16,1)

4)Find the maximum possible response time of tasks T4 in the following fixed-priority system
by solving the equation w4(t) = t, iteratively
T1 = (5,1), T2 = (3,1), T3 = (8,1.6), and T4 = (18,3.5)

5)Find frame size and Draw a network flow graph that we can use to find a preemptive cyclic
schedule of the periodic tasks
T1 = (3,7,1); T2 = (4,1); T3 = (6,2.4,8).
6)Discuss Pros and cons of Clock Driven Scheduling algorithms.

A system contains the following periodic tasks:

T1(p=8, e=1), T2(15, 3),T3 (20, 4), and T4(22, 6)

a) List the frame size constraints, and state why it is required?

b) Find all possible frame sizes?

c) Can all the frame size constraints be satisfied for the set of tasks?

d) Using the frame size found above, find out the tasks that need to be sliced and sizes of
the slices.

e) Show the cyclic schedule for the set of tasks.

7)A system uses the cyclic EDF algorithm to schedule sporadic jobs. The cyclic schedule of
periodic tasks in the system uses a frame size of 5, and a major cycle contains 6 frames. Suppose
that the initial amounts of slack time in the frames are 1, 0.5, 0.5, 0.5, 1, and 1.

Suppose that a sporadic job S1 (d=23, e=1) arrives in frame 1, sporadic jobs S2 (d=16, e=0.8) and
S3 (d=20,e= 0.5) arrive in frame 2. In which frame are the accepted sporadic jobs scheduled?

A A system uses the cyclic EDF algorithm to schedule sporadic jobs. The cyclic schedule of
periodic tasks in the system uses a frame size of 5, and a major cycle contains 6 frames.
Suppose that the initial amounts of slack time in the frames are 1, 0.5, 0.5, 0.5, 1, and 1.
(a) Suppose that a sporadic job S1(23, 1) arrives in frame 1, sporadic
jobs S2(16, 0.8) and S3(20, 0.5) arrive in frame 2. In which frame
are the accepted sporadic jobs scheduled?
A system contains the following periodic tasks:

T1(4,1), T2(5, 1.8),T3 (20, 1), and T4(20,2)

a) Calculate frame size.


b)Length of hyper period.

Find frame size and Draw a network flow graph that we can use to find a preemptive cyclic
schedule of the periodic tasks
T1 = (3,7,1); T2 = (4,1); T3 = (6,2.4,8).

Unit 3

The system contain three Tasks: T1(e=3,d=7,p=20), T2(e=2,d=4,p=5)


and T3(e=20,d=5,p=10) discuss the Priorities of these tasks, and show
the Deadline M Monotonic(DM) schedule for the same.

Q-1 Use the time-demand analysis method to show that the set of periodic tasks {(5, 1), (8, 2),
(14, 4)} is schedulable according to the rate-monotonic algorithm.

Q-2 Suppose that we want to make the first x units of each request in the task (8,2) non-
preemptable. What is the maximum value of x so that the system remains schedulable
according to the rate-monotonic algorithm?

Q-3 A system consists of three periodic tasks: (3, 1), (5, 2), and (8, 3). (a) What is the total
utilization? (b) Construct an earliest-deadline-first schedule of this system in the interval (0,
32). Label any missed deadlines. (c) Construct a rate-monotonic schedule for this system in
the interval (0, 32). Label any missed deadlines.

Q-4) A system contains the following periodic tasks: T1(p=8,e=1), T2(p=15,e=3), and
T3(p=20, e=4)and T4(p=22,e=6)
(a) Are the tasks schedulable according to the schedulability test of the Rate
Monotonic Algorithm (RMA).
(b) Using the Liu-Layland theorem (about the schedulability utilization of the rate
monotonic algorithm), is the above set of tasks schedulable?
(c) Find Maximum response time of each Task
(d) Draw the time demand functions of the tasks.
(e) Are the tasks schedulable? Why or why not?

Q-5 Discuss Rate Monotonic (RM) algorithm with example and Determine
whether the following set of tasks are scheduling using Rate Monotonic
(RM) algorithm.
Task e p d
s
T1 20 25 150 100
T2 40 7 40 40
T3 60 10 60 50
T4 25 10 30 20

Q-6 The system contain three Tasks: T1(e=3,d=7,p=20),


T2(e=2,d=4,p=5) and T3(e=20,d=5,p=10) discuss the Priorities of these
tasks, and show the Deadline M Monotonic(DM) schedule for the same.
7) The following systems of periodic tasks are schedulable by the rate-monotonic algorithm?
By the earliest-deadline-first algorithm? Explain your answer.
(a) T = {(8, 3), (9, 3), (15, 3)}
(b) T = {(8, 4), (12, 4), (20, 4)}
(c) T = {(8, 4), (10, 2), (12, 3)}

The following systems of periodic tasks are schedulable by the rate-monotonic algorithm? By
the earliest-deadline-first algorithm? Explain your answer.
(a) T = {(8, 3), (9, 3), (15, 3)}
(b) T = {(8, 4), (12, 4), (20, 4)}

a)A system contains four periodic tasks, (8, 1), (15, 3), (20, 4), and
(22, 6).Calculate total utilization and Construct the initial segment in the time interval (0, 25)
of a rate-monotonic schedule of the system.

The system contain three Tasks: T1(e=3,d=7,p=20), T2(e=2,d=4,p=5)


and T3(e=20,d=5,p=10) discuss the Priorities of these tasks, and show
the Deadline M Monotonic(DM) schedule for the same.

9)The system contain three Tasks: T1=(4,1) , T2=(5,2) and T3=(20,5) show the
RM schedule for the same.

UNIT-4

Check whether the following set of periodic real time task is schedule under RMA schedulability test
on a uniprocessor
T1(20,100), T2(30,150), T3(60,200) and T1(20,100), T2(30,150), T3(60,200) justify your answer.

1) Check whether the following set of periodic real time task is schedule under RMA schedulability
test on a uniprocessor
T1(20,100), T2(30,150), T3(60,200) and T1(20,100), T2(30,150), T3(60,200) justify your answer

2)

Task p e d
s
T1 2 1 2
T2 3 1 3
T3 6 0.5 6
Schedule According to RMA algorithm. Draw Time Demand Function for the same

A system contains the following periodic tasks:


T1(p=8,e=1), T2(p=15,e=3), and T3(p=20, e=4)and T4(p=22,e=6)

(a) Are the tasks schedulable according to the schedulability test of the Rate Monotonic
Algorithm (RMA)

(b) Using the Liu-Layland theorem (about the schedulability utilization of the rate monotonic
algorithm), is the above set of tasks schedulable?

Check whether the following set of periodic real time task is schedule under RMA schedulability test
on a uniprocessor
T1(3,1,100), T2(5,1.5), T3(7,1.25) use Time Demand Function.
Check whether the following set of periodic real task is schedulable under RMA
schedulability test on uniprocessor.

T1 (20,100) T2 (30,150) T3 (60,200)

What is the necessary and sufficient condition for schedulability test of RMA?

UNIT 5

Q-1 A system contains three periodic tasks. They are (2.5, 1), (4, 0.5), (5, 0.75), and
their total utilization is 0.475.The system also contains a periodic server (2, 0.5). The
server is scheduled with the periodic tasks rate-monotonically.

i. Suppose that the periodic server is a basic sporadic server. What are the response time of
the following two aperiodic jobs: One arrives at 3 and has execution time 0.75, and one
arrives at 7.5 and has execution time 0.6.

ii. Suppose that the period server is a deferrable server. What are the response times
of the above two aperiodic job.

Q -2 A system contains three periodic tasks. They are (2.5, 1), (4, 0.5), (5, 0.75),
and their total utilization is 0.475.The system also contains a periodic server (2,
0.5). The server is scheduled with the periodic tasks rate-monotonically.
i. Suppose that the periodic server is a basic sporadic server. What are the
response times of the following two aperiodic jobs: One arrives at 3 and has
execution time 0.75, and one arrives at 7.5 and has execution time 0.6.
Suppose that the period server is a deferrable server. What are the response times
of the above two aperiodic jobs

2)A system contains three periodic tasks. They are (3, 1), (4, 0.5), (5, 0.5).
(a) The task system also contains a sporadic server whose period is 2. The sporadic server is
scheduled with the periodic tasks rate-monotonically. Find the maximum utilization of the server if
all deadlines of periodic tasks are surely met.

i. Suppose that the server in part (a) is a pure polling server. What are the response times of the
following two aperiodic jobs: One arrives at 2.3 and has execution time 0.8, and one arrives at 12.7
and has execution time 0.6?

ii. Suppose that the server in part (a) is a basic sporadic server. What are the response times of the
above two aperiodic jobs?

Q-2 A system contains three periodic tasks. They are (3, 1), (4, 0.5), (5, 0.5).

(a) The task system also contains a sporadic server whose period is 2. The sporadic
server is scheduled with the periodic tasks rate-monotonically. Find the maximum
utilization of the server if all deadlines of periodic tasks are surely met.

Q-3 Design the server S(Ps,Es) to schedule the aperiodic task A(r=8,e=1.5), for the system T
with following three periodic tasks which are scheduled rate monotonically, T1(p=3,e=0.5),
T2(20,5), T3(60,10). [Determine period Ps, and budget Es]

i.Suppose that the server in part (a) is a pure polling server. What are the response times of
the following two aperiodic jobs: One arrives at 2.3 and has execution time 0.8, and one
arrives at 12.7 and has execution time 0.6?

ii.Suppose that the server in part (a) is a basic sporadic server. What are the response times of
the above two aperiodic jobs?

Q-4 Consider a system containing the following periodic tasks: T1 = (10, 2), T2 = (14, 3), and
T3 = (21, 4). A periodic server of period 8 is used to schedule aperiodic jobs.
(a) Suppose that the server and the tasks are scheduled rate-monotonically.
i. If the periodic server is a deferrable server, how large can its maximum execution budget
be?

ii. If the periodic server is a sporadic server, how large can its maximum execution budget
be?

A system contains three periodic tasks. They are (2.5, 1), (4, 0.5), (5, 0.75), and their total
utilization

is 0.475.The system also contains a periodic server (2, 0.5). The server is scheduled with
the periodic tasks rate-monotonically.

i. Suppose that the periodic server is a basic sporadic server. What are the response
times

of the following two aperiodic jobs: One arrives at 3 and has execution time 0.75, and
one arrives at 7.5 and has execution time 0.6.

ii. Suppose that the period server is a deferrable server. What are the response times
of the above two aperiodic jobs

A system contains three periodic tasks. They are (3, 1), (4, 0.5), (5, 0.5).

(a) The task system also contains a sporadic server whose period is 2. The sporadic server is
scheduled with the periodic tasks rate-monotonically. Find the maximum utilization of the server if
all deadlines of periodic tasks are surely met.

i. Suppose that the server in part (a) is a pure polling server. What are the response times of the
following two aperiodic jobs: One arrives at 2.3 and has execution time 0.8, and one arrives at 12.7
and has execution time 0.6?

ii. Suppose that the server in part (a) is a basic sporadic server. What are the response times of the
above two aperiodic jobs?

Which of the following fixed-priority task is not schedulable? Explain your answer. T1
(5, 1) T2 (3, 1) T3 (7, 2.5) T4 (16, 1).

Write the Consumption and Replenishment rule of polling Server.

A system contains the following periodic tasks:

T1 (p=4, e=1), T2 (p=8, e=2), and T3 (p=16, e=6)

a) Are the tasks schedulable according to the schedulability test of the Rate Monotonic
Algorithm (RMA)?

b) Find out the schedule of the tasks for the first hyper period according to RM?
UNIT -6

Q-1 A system contains five jobs. There are three resources X, Y, and Z. The resource
requirements of the jobs are listed below.
J1: [X; 2]
J2: none
J3: [Y ;1]
J4: [X; 3 [Z; 1]]
J5: [Y ;4 [Z; 2]]
The priority Jiis higher than the priority of Jjfor i <j . What are the maximum blocking
times of the jobs under the nonpreemptable critical-section protocol and under the priority-
ceiling protocol?

Q-2 Differences between the Priority-Inheritance and Priority-Ceiling Protocols.

Q-3 A fixed-priority system contains five tasks. There are two kinds of resources X and Y .
The resource X has 3 units and Y has 2 units. The resource requirements of the tasks are as
follows.

T1 : [X, 1; 3]
T2 : [Y, 1; 4]
T3 : [Y, 1; 4 [X, 3; 2]]
T4 : [X, 1; 4] [Y, 2; 2]]
T5 : [Y, 1; 3]

The priority of Ti is higher than the priority of Tk if i < k.


(a) Suppose that the system uses the stack-based priority-ceiling protocol. What are the
maximum blocking times of the jobs?
(b) Suppose that these periodic tasks have the following parameters: T1 = (40, 5, 20), T2 =
(30, 5, 25), T3 = (35, 5, 30), T4 = (60, 6, 40), and T5 = (55, 5, 50). Are these tasks
schedulable? Explain your answer.

Q-4 Prepare the schedule for the following set of jobs according to Priority Inheritance Protocol:
J1(r=7,e=3,[B at 8;1]) J2(r=5,e=3,[A at 6;1]) J3(r=4,e=2) J4(r=2,e=6,{B at 3;4 {A at 8;1.5]])
J5(r=0,e=6,[A at 1;4] [B at6.5;0.5]) (Assume J1 has highest and J5 has lowest priority.)

Q-5 A system contains the following four periodic tasks. The tasks are scheduled by the
ratemonotonic
algorithm and the priority-ceiling protocol.
T1 = (3, 0.75) b1 = 0.9
T2 = (3.5, 1.5) b2 = 0.75
T3 = (6, 0.6) b3 = 1.0
T4 = (10, 1)
bi is the blocking time of Ti . Are the tasks schedulable? Explain your answer.

6) Define Dynamic-Slack Computation In Scheduling Aperiodic And Sporadic Jobs In


Priority-Driven Systems

7) Define the Basic Priority-Inheritance Protocol In Resources And Resource Access Control.

Differences between the Priority-Inheritance and Priority-Ceiling Protocols

Elaborate the concepts of

1. Priority-Inheritance
2. Priority-Ceiling Protocols

8) Discuss the use of priority ceiling protocol in dynamic priority system.

You might also like