edited by
1,033 views
1 votes
1 votes
Consider a uni-processor system executing four tasks T1, T2, T3, T4 each of which is composed of 10 sequence of jobs which arrive periodically at interval of 2, 4, 8, 16 ms resp. The priority of each task is directly proportional to its period and available tasks are scheduled based on priority, with highest priority task scheduled first. Each instance of T1, T2, T3, T4 requires execution time of 1, 2, 4, 6 ms resp. Given all tasks initially arrive at t=0, the 2nd instance of T3 completes its execution at the end of ______ ms.
edited by

4 Answers

1 votes
1 votes
Since all arrive at time 0

Give high priority to T4 (priority directly proportional to period)

    ||0  T4  6 || 6 T3 10 || 10  T3 14  ||      

T4 has not yet arrived so giving chance to 2nd instance of  T3 which is next high proirity process.
1 votes
1 votes

The tasks arrive periodically at 2,4,8,16ms respectively

T1 0(1st instance) 2(2nd instance) 4 6
T2 0 4 8 12
T3 0 8 16 24
T4 0 16 32 48

The priority of process is directly proportional to its period

  CPU Time Priority
T1 1ms Highest
T2 2ms  
T3 4ms  
T4 6ms Lowest

Each instance takes 1ms for T1, 2ms for T2 , 4ms for T3 and 6ms for T4

Gantt Chart

T4 T3 T2 T1 T3 T4 T3

0               6                10              12              13              16               22             23

Therefore the 2nd instance of T3 completes its execution at the end of 23 ms

1 votes
1 votes

"The priority of each task is directly proportional to its period."

That means T$_{4}$ has the highest priority.

1st instances of all jobs arrive at>> 0, 0, 0, 0 respectively

2nd  instances of all jobs arrive at>> 2, 4, 8, 16 respectively

3rd  instances of all jobs arrive at>> 4, 8, 16, 32 respectively

.

.

.

and so on.

and Burst time of each task given,

T$_{1}$ = 1 ms

T$_{2}$ = 2 ms

T$_{3}$ = 4 ms

T$_{4}$ = 6 ms

Gantt chart looks like  something

   T$_{4}$ T$_{3}$ T$_{3}$ T$_{2}$         ............  

0                  6          10             14        16         ...........

 

Answer: 14 ms

Related questions