Question: 8 . ( 1 0 points ) In a RTOS system where Priority Ceiling is implemented and used, there are only three tasks A ,

8.(10 points)
In a RTOS system where Priority Ceiling is implemented and used, there are only three tasks A, B, and C,
whose priorities are in the order of A>B>C. For each task, it takes 1 time unit to request a resource (no
matter successfully or not). If the resource is locked by other tasks, this requesting task needs to wait (be
blocked) until the resource is unlocked. It takes 1 time unit to unlock a resource if the resource is hold by
the task. For each task, it takes 3 time units to finish executing its critical section.
Assume that at time unit 1, task C is created and scheduled to run immediately, task C requests for Resource
X, and X is also unlocked at time unit 1. Task B is created at time 3, and Task A is created at time 5. Tasks B
and A need to acquire Resource X before executing their critical sections.
(1) You may assume that Resource X is the only protected resource in the system, and tasks A, B and C
only compete for this single resource. What is the ceiling of Resource X?
(2) Please complete the following analysis at each time unit. You need to specify: (1) if a task is holding
resource X,(2) if it is blocked or running, and (3) the tasks priority level.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!