CSC 7103 20091029

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

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

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:

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

View Full Document
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 h ) = Pr(T l ) 3.
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern