CSC 7103 20091029

CSC 7103 20091029 - CSC 7103 Page 1 of 3 Task pre-emption...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC 7103 10/29/2009 Page 1 of 3 Task pre-emption with semaphores. Figure 1 – Semaphore example Figure 2 – Nested semaphores Figure 3 illustrates priority inversion because when T 1 locks, it blocks, and even though T 2 has a lower priority it is still allowed to run first because of the semaphore blocking. Figure 3 – Semaphore example showing priority inversion Chain blocking is shown in Figure 4. Here T 3 runs because T 1 and T 2 share a semaphore. And T 1 is blocked by a lower priority process because of the semaphores. How can we avoid the wasted time for T 1 ? Figure 4 – Chain blocking example How to remove the problem of priority inversion? The simplest way is for tasks which are holding semaphores needed by a higher priority process to get the priority of the process that needs the semaphore. This is called the priority inheritance protocol. More details:
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
CSC 7103 10/29/2009 Page 2 of 3 1. All tasks are assigned rate monotonic priorities 2. If T h is blocked by T l , then the priority of Pr(T
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/25/2010 for the course CSC 7103 taught by Professor Kannan,r during the Fall '08 term at LSU.

Page1 / 3

CSC 7103 20091029 - CSC 7103 Page 1 of 3 Task pre-emption...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online