Welcome! Log In Create A New Profile

Advanced

cpu scheduling

Posted by bobylove 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
cpu scheduling
February 15, 2012 11:30AM
can anyone please explain the RR gantt chart?


Blv
Re: cpu scheduling
April 23, 2012 02:51PM
RR works on the first come first served basis but, the difference is that it has a "quantum". The quantum is a maximum time period that the processor gives to the process at a time. If the process is longer than the quantum it is put at the back of the queue and when it gets to the front of the queue once again it is completed further. It does this until it is finished. Numerous processes are in the queue and all wait for their turn so, remembering the processes and their order is important. I also assume that if a new process appears at the same time as a queued process it would be started first, not too sure on that but it shouldn't matter too much.

Here is a real life example:

person serving = processor, number of items = burst time, number of items that can be bought at one time = quantum, queue = process queue, people being served = processes

There is a food queue at the local fast food shop; it's rush hour and everyone wants something different (the different processes). There is only one person serving the queue and each person being served can only buy one item at a time (quantum = 1). The first person gets to the front of the queue and buys a hamburger but is still hungry and joins the back of the queue. The next person wants a hotdog and is done and so leaves the queue. the following person wants an egg sandwich but is still hungry and joins the back of the queue. The person who wants another hamburger is served again but is still hungry so goes to the back of the queue. This continues until the queue is empty or the shop closes.
Sorry, only registered users may post in this forum.

Click here to login