edited by
37,563 views
105 votes
105 votes
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, which is 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^{\text{st}}$ millisecond and task preemptions are allowed, the first instance of $T_{3}$ completes its execution at the end of_____________________milliseconds.
edited by

14 Answers

7 votes
7 votes
sequence should be 1 T1 ,2 T2,3 T2,4 T1,5 T3, 6 T3, 7 T1 ,8 T3 ,9 T2, 10 T1, 11 T2 , 12 T3 .,13 T1  so  ans is 12 .
4 votes
4 votes

Ans is 12 ms.

after end of 12 ms all the 4 units of T3 will be completed.

3 votes
3 votes
answer is 12
2 votes
2 votes
Let me clear the "beginning of the 1st millisecond".

Gate exam is of 3hr. So when your exam starts , it's the beginning of 1st hr i.e., 0-1 is 1st hour and begining of 1st hour is 0 and end of 1st hour is 1.

Similarly beginning of the 1st millisecond will start from 0 in our Gantt Chart.

0-1:     T1 (0 is beg and 1 is end of 1st millisecond)

1-2:     T2

2-3:     T2

3-4:     T1

4-5:     T3

5-6:     T3

6-7:     T1

7-8:     T2

8-9:     T2

9-10:   T1

10-11: T3

11-12: T3 (11 is beg and 12 is end)
Answer:

Related questions

48 votes
48 votes
6 answers
3
makhdoom ghaya asked Feb 12, 2015
12,171 views
The following two functions $P1$ and $P2$ that share a variable $B$ with an initial value of $2$ execute concurrently.$$\begin{array}{|l|l|}\hline \text{P1() \{ } & \tex...
31 votes
31 votes
2 answers
4