Even when the system supports blocking semaphores


In this exercise you will extend the preemptive scheduler to support priority. This system should support three levels of priority: 1 will be the highest. You can solve this problem using either assembly or C.

a) Redesign the TCB to include a 16-bit integer for the priority (although the values will be restricted to 1, 2, 3). Show the static allocation for the three threads from the example in this chapter, assuming the first two are priority 2 and the last is priority 3. There are no priority 1 threads in this example, but there might be in the future.

b) Redesign the scheduler to support this priority scheme.

c) In the chapter it said "Normally, we add priority to a system that implements blocking semaphores and not to one that uses spin-lock semaphores." What specifically will happen here if the system is run with spin-lock semaphores?

d) Even when the system supports blocking semaphores, starvation might happen to the low-priority threads. Describe the sequence of events that causes starvation.

e) Suggest a solution to the starvation problem.

Request for Solution File

Ask an Expert for Answer!!
Mechanical Engineering: Even when the system supports blocking semaphores
Reference No:- TGS01468246

Expected delivery within 24 Hours