You are on page 1of 2

1. Describe what happened on Mars.

A classic case of priority inversion happened with the Mars Pathfinder on Mars:

There was a high priority bus management task that ran frequently to move certain kinds of data in and out of the information bus

A low priority thread that gathered meteorological data that also used the information bus to update its data. While updating the data to the information bus, mutexes were used to block the information bus.

Also, there was a medium priority task, that caused the communications task to be scheduled during the short interval while the high priority information bus thread was blocked waiting for the low priority meteorological data thread.

In this case, the long-running communications task, having higher priority than the meteorological task, would prevent it from running, consequently preventing the blocked information bus task from running.

2. Describe the priority inversion problem.

A priority inversion is said to occur when a medium-priority task preempts a lower-priority task using a shared resource on which the higher-priority task is pending. If the higher-priority task is otherwise ready to run, but a mediumpriority task is currently running.

3. Describe the basic priority inheritance protocol. This technique mandates that a lower-priority task inherit the priority of any higher-priority task pending on a resource they share. This priority change should

take place as soon as the high-priority task begins to wait; it should end when the resource is released. 4. Describe the priority ceiling protocol. Priority ceilings, associates a priority with each resource; the scheduler then transfers that priority to any task that accesses the resource. The priority assigned to the resource is the priority of its highest-priority user, plus one. Once a task finishes with the resource, its priority returns to normal. A beneficial feature of the priority ceiling solution is that tasks can share resources simply by changing their priorities, thus eliminating the need for semaphores.

You might also like