View worked solution
Answer: 12
The priority of each task is inversely proportional to its period. Thus, the priority order (from highest to lowest) is:
The task parameters are:
- : Period ms, Execution time ms
- : Period ms, Execution time ms
- : Period ms, Execution time ms
Tracing the execution timeline from :
- [0 to 1 ms]: (1st instance) runs and completes.
- [1 to 3 ms]: (1st instance) runs and completes.
- [3 to 4 ms]: (2nd instance) arrives at , preempts other tasks, runs, and completes.
- [4 to 6 ms]: (1st instance) runs for ms (requires ms more).
- [6 to 7 ms]: (3rd instance) arrives at , preempts , runs, and completes.
- [7 to 9 ms]: (2nd instance) arrives at , preempts , runs, and completes.
- [9 to 10 ms]: (4th instance) arrives at , preempts , runs, and completes.
- [10 to 12 ms]: resumes and runs for its remaining ms, completing at ms.
Thus, the first instance of completes its execution at the end of 12 milliseconds.
Free practice · Your answers on this page are not saved.
