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

PS 6 Priority Inversion 2022

This document discusses priority inversion in real-time systems and potential solutions. It provides details on three tasks with different priorities executing on shared resources. The document examines priority inversion situations and sketches timeline diagrams to show how priority inheritance and priority ceiling protocols can limit the effects of priority inversion. It also provides details on four periodic tasks that share two resources protected by semaphores, and asks the reader to sketch timelines showing task execution under different scheduling policies and identify wait and signal operations on the semaphores. Potential priority inversion problems are to be discussed based on the timelines.
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)
33 views

PS 6 Priority Inversion 2022

This document discusses priority inversion in real-time systems and potential solutions. It provides details on three tasks with different priorities executing on shared resources. The document examines priority inversion situations and sketches timeline diagrams to show how priority inheritance and priority ceiling protocols can limit the effects of priority inversion. It also provides details on four periodic tasks that share two resources protected by semaphores, and asks the reader to sketch timelines showing task execution under different scheduling policies and identify wait and signal operations on the semaphores. Potential priority inversion problems are to be discussed based on the timelines.
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/ 2

Problem 

Solving: Priority Inversion 

a. The following table shows the priority of three tasks base on the timeline execution of the
tasks in Figure Q4.1. In this figure ‘E’ represents a single tick of execution time, ‘Q’
represents an execution tick with access to the Q critical section and ‘V’ represents an
execution tick with access to the V critical section. Answer the following questions.
Table Q4.1
Process Priority
Task1 High
Task2 Medium
Task3 Low

Figure Q4

i. Redraw the timeline and show the following three situations in the timeline.

ii. Base on the sketch discuss priority inversion situation.

iii. Sketch two timeline diagrams to show different solutions to limit the effect of priority
inversion using priority inheritance and original ceiling priority protocol, the ceiling
values for resources Q and V is high or 3. Discuss the differences, if any.
[12 marks]
b. Consider four periodic tasks with the following arrival times (S), computation times,
execution sequence and priority, in Table Q4.2. Each task’s period starts at time S and
terminates at T. The four tasks shared two resources that are protected by binary
semaphores A and B. For the execution sequence, ‘E’ represents a single tick of execution
time, ‘A’ represents an execution tick with access to the A semaphore and ‘B’ represents
an execution tick with access to the B semaphore. Answer the following questions.
Table Q4.2
Process Priority Arrival Computation Execution Semaphores
time times sequence used
T1 Very high 7 4 EAEB A, B
T2 High 2 5 EBABE A, B
T3 Low 5 4 EEEE -
T4 Very low 0 5 EAAAE A

i. Sketch timeline diagrams to show the execution of the four tasks given the scheduling
policies in Table 1 In each timeline shows the three situations: executing, preempted
and blocked, when appropriate using the following legend.

[4 marks]

ii. Identify the time tick for each task T1, T2 and T4 when the task do a wait operation on
the semaphores using wait(A) or wait(B) and do a release operation on the
semaphores using signal(A) or signal(B). Draw the following table to answer this
question. [3 marks]

Task wait(A) signal(A) wait(B) signal(B)


T1
T2
T4

iii. Based on the sketch timeline answer for Question 4.b.i. discuss the priority inversion
problem. [2 marks]

You might also like