Real-Time Operating Systems
Real-Time Operating Systems
Real-Time Operating Systems
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Priority inversion (2)<br />
¿ Basic priority inheritance protocol:<br />
1. A job J uses its assigned priority, unless it is in its CS<br />
and blocks higher priority jobs<br />
In which case, J inherits P H<br />
, the highest priority of the<br />
jobs blocked by J<br />
When J exits the CS, it resumes the priority it had at<br />
the point of entry into the CS<br />
2. Priority inheritance is transitive<br />
¿ Advantage:<br />
¿ Transparent to scheduler<br />
¿ Disadvantage:<br />
¿ Deadlock possible<br />
21<br />
Priority inversion (3)<br />
¿ Priority ceiling protocol<br />
1. A priority ceiling is assigned to each resource, which is<br />
equal to the highest priority task that may use the<br />
resource<br />
2. The scheduler transfers that priority to any task that<br />
accesses the resource<br />
3. Job J is allowed to start a new CS only if its priority is<br />
higher than all priority ceilings of all the semaphores<br />
locked by jobs other than J<br />
4. On completion, J’s priority switches to its normal value<br />
¿ Advantage:<br />
¿ tasks can share resources simply by changing their<br />
priorities, thus eliminating the need for semaphores<br />
22<br />
11