Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Why did they skip?

This question is about the **ROUND ROBIN** cpu algorithm.

So basically, the time given for each process is 3 to run. And it queues up in sequential order until each processes' runtime is exhausted.

The problem here; according to the table below (Gant chart) P1 should've been in after P0, because P1 (as I have calculated, only has 2 runtime left). What happened?

this comes from the website :

https://www.tutorialspoint.com/operating_system/os...

Attachment image

1 Answer

Relevance
  • 3 years ago
    Favorite Answer

    Looks reasonable to me.

    P1 has a total execute time of 3, and the quantum for processing is 3. From the start P0, with an execute time of 5, gets its first 3 units of execution leaving 2 for the next time it is allowed to run, After P0 has its first run, P1 runs. However, P1 gets all its execute time the first time it is selected to run. After the second time P0 runs, P1 does not need any more execution time, so after the second P0 run, the next process in the round robin is P2 as P1 has already finished.

    I hope this helps.

Still have questions? Get your answers by asking now.