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. Operating System gatecse-2015-set1 operating-system process-scheduling normal numerical-answers + – makhdoom ghaya asked Feb 13, 2015 • edited Jun 19, 2021 by Lakshman Bhaiya makhdoom ghaya 38.1k views answer comment Share Follow See all 19 Comments See all 19 19 Comments reply Show 16 previous comments chetan-naik commented Jan 18, 2021 reply Follow Share I don’t understand why is there so much confusion about beginning and end. Suppose you consider beginning of 1st millisecond as all processes arrive at 0, then execution of T3 will be over at the range 11 to 12 so by your definition 11 is the beginning of 12th millisecond and 12 is the end of 12th millisecond. And if suppose you belong to the other category which defines beginning of 1st millisecond as all processes arrive at 1, then execution of T3 will be over at the range 12 to 13 so by your definition 12 is beginning of 12th millisecond and 13 is the end of 12th millisecond. 6 votes 6 votes Ray Tomlinson commented Jan 17 reply Follow Share Answer is 11 if we start from 0 and the answer will be 12 if we start T1 execution from 1 0 votes 0 votes minimalist commented Jan 19 i reshown by minimalist Jan 19 reply Follow Share All processes available at the beginning of 1st clock cycle. Process T3 completes by the end of 12 clock cycle. Gantt chart starting from 0 or 1 all that’s not matter. Even if starting from 0 – total clock cycle is 12 i.e 12 msec #Beautiful_Question 0 votes 0 votes Please log in or register to add a comment.
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 . minal answered Jun 16, 2015 minal comment Share Follow See all 4 Comments See all 4 4 Comments reply SURABHI GUPTA commented Jul 1, 2015 reply Follow Share Arjun sir given in question is that all tasks initially arrive at the end of 1ms millisecond? Then how you are starting execution from t=0? 0 votes 0 votes minal commented Jul 1, 2015 reply Follow Share no ,we also started from 1ms 2 votes 2 votes Mitari Nagar commented Jul 9, 2015 reply Follow Share does not matter,as they have asked end of - ms..whether you start from 0 or 1,it will be end of 12th( note th) ms. –3 votes –3 votes Registered user 7 commented Feb 1, 2016 reply Follow Share i got 13 0 votes 0 votes Please log in or register to add a comment.
4 votes 4 votes Ans is 12 ms. after end of 12 ms all the 4 units of T3 will be completed. mrinmoyh answered Sep 10, 2018 mrinmoyh comment Share Follow See all 0 reply Please log in or register to add a comment.
3 votes 3 votes answer is 12 naresh1845 answered Feb 13, 2015 naresh1845 comment Share Follow See all 2 Comments See all 2 2 Comments reply smartmeet commented Jan 31, 2017 reply Follow Share Greater value of priority is higher or lesser value of priority is higher?, I mean number in some numericals the more value of number the priority is lesser! 0 votes 0 votes Bikram commented Sep 2, 2017 reply Follow Share @smartmeet 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. 2 votes 2 votes Please log in or register to add a comment.
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) tusharSingh answered Jan 14, 2021 tusharSingh comment Share Follow See all 0 reply Please log in or register to add a comment.