You are on page 1of 14

10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S.

Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Get unlimited access to the best of Medium for less than $1/week. Become a member

Solutions for Real-Time System by Jane W. S.


Liu (Chapter 8)
Neeraj Dhanraj · Follow
3 min read · Jun 12, 2020

Listen Share More

This post provides the possible solutions for Chapter 8in Real-Time System by Jane
W. S. Liu. The book is available here.

Q.8.1: A system contains five jobs. There are three resources X, Y and Z. The
resources required 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 Ji is higher than the priority of Jj for i < j. What are the maximum
blocking times of the jobs under the non-preemptable critical section protocol and
under the priority ceiling protocol?

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 1/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Q.8.2: A system contains the following four periodic tasks. The tasks are scheduled
by the rate monotonic 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 = 0.9
T4 = (10,1)
bi is the blocking time of Ti. Are the tasks schedulable? Explain your answer.

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 2/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Q.8.3: Consider a fixed priority system in which there are five tasks Ti, for i = 1, 2, 3,
4 and 5, with decreasing priorities. There are two resources X and Y. The critical
sections of T1,T2, T4 and T5 are [Y;3], [X;4], [Y;5 [X;2]] and [X;10] respectively. (Note
that T3 does not require any resource.) Find the blocking time bi(rc) of the tasks.

Sol: Priority Ceiling (with Blocking time)

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 3/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Q.8.7: A system contains the following five periodic tasks. The tasks are scheduled
rate monotonically.

T1 = (6, 3, [X;2])

T2 = (20, 5, [Y;2])

T3 = (200, 5, [X;3 [Z;1]])

T4 = (210, 6, [Z;5 [Y;4]])

Compare the schedulability of the system when the priority ceiling protocol is used
versus the NPCS protocol.

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 4/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Q.8.10: Given a system consisting of the following tasks whose periods, execution
times and resource requirements are given below.

T1 = (2, 0.4, [X, 3; 0.3])

T2 = (3, 0.75, [X, 1; 0.3][Y, 1; 0.4])

T3 = (6, 1.0, [Y, 1; 0.4][Z, 1; 0.5 [X, 1; 0.4]])

T4 = (8, 1.0, [X, 1; 0.5][Y, 2; 0.1] [Z, 1; 0.4])

There are 3 units of X, 2 units of Y and 1 unit of Z. The tasks are scheduled by EDF
algorithm and the stack based protocol.

a) Find the preemption ceiling of each resource and the maximum blocking time for
each task.

Sol: Preemption Ceilings

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 5/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

b) Are the tasks schedulable according to the earliest deadline first algorithm? Why?

Real Time Systems Scheduling Solutions Research

Open in app

Search

Follow

Written by Neeraj Dhanraj


80 Followers

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 6/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Researcher in Data Sciences, more details available at: neerajbokde.in

More from Neeraj Dhanraj

Neeraj Dhanraj

How to publish R packages in good journals


R packages for researchers

4 min read · Jun 29, 2020

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 7/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Neeraj Dhanraj

Solutions for Real-Time System by Jane W. S. Liu (Chapter 6)


Chapter 6 starts with workloads consisting solely of independent periodic tasks that do not
require any resource other than a processor…

5 min read · Jun 12, 2020

10

Neeraj Dhanraj

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 8/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Solutions for Real-Time System by Jane W. S. Liu (Chapter 5)


Chapter 5 describes the clock-driven approach in general and cyclic executives in specific.
This is the traditional way to schedule more…

3 min read · Jun 11, 2020

7 2

Neeraj Dhanraj

How effectively a Sigmoid function curve can be fitted with a scaled


Weibull Cumulative…
WindCurves: A tool to fit wind turbine power curves

9 min read · Jun 14, 2020

See all from Neeraj Dhanraj

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 9/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Recommended from Medium

AL Anany

The ChatGPT Hype Is Over — Now Watch How Google Will Kill ChatGPT.
It never happens instantly. The business game is longer than you know.

· 6 min read · Sep 1

16.8K 492

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 10/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Barack Obama

Thoughts on Israel and Gaza


It’s been 17 days since Hamas launched its horrific attack against Israel, killing over 1,400 Israeli
citizens, including defenseless…

5 min read · 4 days ago

28K 728

Lists

The New Chatbots: ChatGPT, Bard, and Beyond


12 stories · 171 saves

Productivity 101
20 stories · 716 saves

Branding
33 stories · 70 saves

My Kind Of Medium (All-Time Faves)


45 stories · 102 saves

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 11/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Unbecoming

10 Seconds That Ended My 20 Year Marriage


It’s August in Northern Virginia, hot and humid. I still haven’t showered from my morning trail
run. I’m wearing my stay-at-home mom…

· 4 min read · Feb 16, 2022

68K 980

Scott-Ryan Abt in Pitfall

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 12/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Bye Bye, Spotify


And see ya later, all you subscription services in my little empire

· 4 min read · Aug 20

14.2K 334

Dr. Ashish Bamania in Level Up Coding

Google Rejected Max Howell(Creator Of Homebrew) For Getting This


Interview Question Wrong. Can You?
Can you solve this Google interview question?

· 4 min read · Oct 3

6.2K 68

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 13/14
10/28/23, 10:16 AM Solutions for Real-Time System by Jane W. S. Liu (Chapter 8) | by Neeraj Dhanraj | Medium

Dmitry Kruglov in Better Programming

The Architecture of a Modern Startup


Hype wave, pragmatic evidence vs the need to move fast

16 min read · Nov 7, 2022

6.4K 63

See more recommendations

https://medium.com/@neerajdhanraj/solutions-for-real-time-system-by-jane-w-s-liu-chapter-8-5a27653cb28c 14/14

You might also like