Consider a uniprocessor system executing three tasks T_{1}, T_{2} and T_{3}, each of which is composed of an infinite sequence of jobs (or instances) which arrive periodically at intervals of 3, 7 and 20 milliseconds, respectively. The priority of each task is the inverse of its period, and the available tasks are scheduled in order of priority, with the highest priority task scheduled first. Each instance of T_{1}, T_{2} and T_{3} requires an execution time of 1, 2 and 4 milliseconds, respectively. Given that all tasks initially arrive at the beginning of the 1^{st} millisecond and task preemptions are allowed, the first instance of T_{3} completes its execution at the end of ______ milliseconds.

**Answer : **
12

Periodic arrival times of T1: 0, 3, 6, 9, 12, 15 18, 21,...

Priority of T1=1/3, service time of T_{1} = 1.

Periodic arrival times of T_{2}: 0, 7, 14, 21,...

Priority of T_{2}= 1/7, service time of T_{2} = 2.

Periodic arrival times of T_{3}: 0, 20, 40,...

Priority of T_{3}=1/20, service time of T_{3} = 4.

T_{1} has highest priority and T3 has lowest priority.

First instance of T_{3} (4 units) completed at the end of 12 ms.

*Posted on 18/10/2020 17:20:10 by dobsonz*