0
$\begingroup$

First post here, glad I found this exchange. I am in my Operating Systems course at university learning process scheduling. In my homework assignment we have to fill out a simulated scheduling chart along with the corresponding Gant chart. The arrival time of the first process is at time 0, and it's service time is 5 seconds. The second process doesn't arrive until time 7. The time quantum is 6. How do I fill out the gant chart if nothing is in the queue?

$\endgroup$
3
  • $\begingroup$ You have to show some effort, otherwise no help. $\endgroup$
    – Sumeet
    Feb 22, 2017 at 6:13
  • $\begingroup$ Are you asking what an operating system does if there is no task that is ready to run? If so, that's something that some reading or web searching should be able to answer. $\endgroup$
    – Pseudonym
    Jun 14, 2017 at 7:20
  • 1
    $\begingroup$ What you should do in this situation seems very clear from, say, the Wikipedia page on Gantt charts. We expect you to do some basic research before asking others for help. $\endgroup$ Jun 14, 2017 at 9:29

2 Answers 2

1
$\begingroup$

your first process will take time only upto 5 seconds as its service time is only upto 5 seconds and then you have to keep blank space between 5-7 and then your next process arriving at 7 would be processed,i think.

$\endgroup$
0
$\begingroup$

All operating systems have some sort of idle loop, twiddling it's thumbs if there is nothing else to do. If there are no ready tasks (no user tasks, and no kernel-internal tasks either), just waste time (today perhaps even power down the processor and schedule to wake up in a short while if nothing else happens).

$\endgroup$
1
  • 1
    $\begingroup$ "Twiddling your thumbs" takes too much energy, so it's actually sitting on its hands :-) As you say, a modern operating system will go to sleep and put its processors in a low power state, then wake up when needed. $\endgroup$
    – gnasher729
    Jan 31, 2020 at 21:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.