Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Three tasks T1, T2 and T3. T1 has the highest priority and T3 has the lowest priority. T1: T2: T3: acquire(seml); does some work; release(seml);

Three tasks T1, T2 and T3. T1 has the highest priority and T3 has the lowest priority.

image text in transcribed

T1: T2: T3: acquire(seml); does some work; release(seml); acquire(sem2); does some work; release(sem2); acquire(seml); does some work; acquire(sem2); does some work; release(sem2); does some work; release(seml); T3 starts first, followed by T2 (before T3 completes "does some work" and after "acquire(sem2)" is completed) and then T1 (before T2 completes the first "does some work" and after "acquire(seml)" is completed). The two "does some work" are highlighted in red. 1) (10 points) Use the priority ceiling protocol to run the three tasks and plot the execution by a Gantt chart. 2) (10 points) Use the priority inheritance protocol to run the three tasks and plot the execution by a Gantt chart. Compare the performance with the previous execution. T1: T2: T3: acquire(seml); does some work; release(seml); acquire(sem2); does some work; release(sem2); acquire(seml); does some work; acquire(sem2); does some work; release(sem2); does some work; release(seml); T3 starts first, followed by T2 (before T3 completes "does some work" and after "acquire(sem2)" is completed) and then T1 (before T2 completes the first "does some work" and after "acquire(seml)" is completed). The two "does some work" are highlighted in red. 1) (10 points) Use the priority ceiling protocol to run the three tasks and plot the execution by a Gantt chart. 2) (10 points) Use the priority inheritance protocol to run the three tasks and plot the execution by a Gantt chart. Compare the performance with the previous execution

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Accounting questions