it is clearly given in question:
Given that all tasks initially arrive at the beginning of the 1st millisecond
means in the range of 0 to 1 all tasks initially arrive.
so arriving time in Gnatt starts from 0 .
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.
periodically they arive as T1 then T2 next T3. so
for T1 , priority is = 1/1 = 1
T2 , priority is = 1/2 = 0.5
T3, priority is = 1/3= 0.33
so order of priority is T1 , T2, T3.
T1 is executing first.
Each instance of T1,T2 and T3 requires an execution time of 1, 2 and 4 milliseconds, respectively.
that means one instance of T1 = 1
one instance of T2=2
one instance of T3 = 4 and it is uniprocessor system so at any point of time only one task is running. in each box in Gnatt chart shoudl represent T1 for 1 msec only or T2 for 1 msecs only..
T1 repeat after 3 , 7 and 10 when start at 1 .( means after start at 0 , T1 come again at 0+3=3, 3+3=6 and 6+3=9)
( T2 repeats after 7 msecs means start at 0, then again come at 0+7 = 7 )
so the chart looks like :
0T1 1 | 1 T2 2 | 2 T2 3| 3 T1 4| 4 T3 5| 5 T3 6|6 T1 7| 7 T2 8| 8 T2 9| 9 T1 10|10 T3 11| 11 T3 12 |
T2 burst time = 2 so that's why after first T1, 2 times T2 occur.
so first instance of T3 completes at 12 milliseconds.( each instance of T3 takes 4 unit of time , so T3 appear 4 times in chart )