Question: Every preemption of one task by another task potentially results in two context switch activities: one switch from the lower-priority task and one switch back
Every preemption of one task by another task potentially results in two context switch activities: one switch from the lower-priority task and one switch back again when the preempting task completes. This means that each time a higher-priority task ?h preempts a lower-priority task ?l , the scheduler must perform the following actions:
-Save context of ?l
-Load context of ?h
-Let ?h execute until completion
-Save context of ?h for the next instance
-Load context of ?l
Assume that for all the tasks, the time to save the context is at most Csave and the time to load the context is Cload . Extend the original response time analysis formula for rate monotonic scheduling to consider context switches among tasks. Even for a task that is never preempted, its execution time must be added by Csave and Cload .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
