I had the following question in my Operating System 'CPU- Scheduling' assignment-

4 processes A,B,C,D have estimated time of completion of 5,7,9,11 ns each. They are scheduled in a round-robin fashion and the time slice is of 2ns. The processes A,B,C,D arrive at the 0,1,2,3 ns respectively. At what time will the process C complete? Also what will be the completion time of process C, if Shortest Job First was used instead of Round Robin?

My doubt is- Can we design a Gantt Chart using just Arrival time and Completion time. I referred many books and websites but in all the places the chart was designed using arrival and burst time rather than completion time.

If I assume the question to be straightforward then I don't need a Gantt Chart and can easily get the completion time of C to be 9 in round-robin scheduling. However, calculating the completion time for SJF scheduling will become a mystery. I am guessing the question could be printed wrong yet I am not sure and would like some assurance if it's wrong, else some guidance on how to tackle the above question.

  • $\begingroup$ Welcome to COMPUTER SCIENCE @SE. My take: It wasn't the best of days for whoever worded the assignment. Tasks completed in nanoseconds? Even if the estimated times stated where "burst times", how is anyone to know completion time without any information on deviance from estimates? What is the connection between the assignment as presented and Gantt Chart? $\endgroup$ – greybeard Oct 15 '20 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.