Welcome! Log In Create A New Profile


Round Robin for Assignment 4.1

Posted by Lo 
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
Round Robin for Assignment 4.1
March 04, 2011 03:02PM
It seems like confussion is the name of the game for me here. I have a problem with Round Robin, I don't know how it is calculated. I do understand its definition that it has quantime time which is a small unit of time and preemptive which enables the system to switch between the processes. But for calculations take for instance the following question (taken from the net).
5.4 Consider the following set of processes, with the length of the CPU-burst time given in
Process Burst Time Priority
P1 10 3
P2 1 1
P3 2 3
P4 1 4
P5 5 2
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF, a
nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1)
And the answer is :
FCFS: P1 (0-10) P2 (10-11) P3 (11-13) P4 (13-14) P5 (14-19)
SJF: P2 (0-1) P4 (1-2) P3 (2-4) P5 (4-9) P1 (9-19)
Priority: P2 (0-1) P5 (1-6) P1 (6-16) ) P3 (16-18) P4 (18-19)
RR: P1 (0-1) P2 (1-2) P3 (2-3) P4 (3-4) P5 (4-5)
P1 (5-6) P3 (6-7) P5 (7-8)
P1 (8-9) P5 (9-10)
P1 (10-11) P5 (11-12)
P1 (12-13) P5 (13-14)
P1 (14-15) P1 (15-16) P1 (16-17) P1 (17-18) P1 (18-19)

Focussing on RR I understand that a 1 is added on each process which I think its the quantum time. I understand it in the first row but the problem starts on the second row, how are processes picked.
Please rescue me!!
avatar Re: Round Robin for Assignment 4.1
March 04, 2011 06:45PM
Don't go phobic. Just slow down, go back to the very basics, and ask yourself what the OS is trying to achieve. Once you've done that, forget the assignment for a moment, and take the example they give in the text book and step it out nice and slowly. See for yourself what's going on. I'm pretty sure that once you've done that you'll be on your way, and what's more you'll have learnt more than simply how to fire off an answer for this question.

It'll go quite quick if you go nice and slow, I promise.

The time quantum is just its "unit". Nothing particularly snazzy is meant by the term. If it worked in units of 12 us, that would be its quantum; if it worked in units of 2, that would be its unit. 1 turns out to make things simpler. You'll see.
Re: Round Robin for Assignment 4.1
March 05, 2011 12:51AM
Hey slow eddy, I don't believe how confussion may bring about, may be it was my stress levels that went so high that I just missed the boat. I thought I understood what exactly quantum is. So it is like in science the unit of energy is watts for instance. Misunderstanding can change the whole context. I am in the middle of it but Now it is much clearer.
Thanks.....soo much.
avatar Re: Round Robin for Assignment 4.1
March 05, 2011 10:38AM
No problem. I thought it may be the stress levels. You don't have a huge amount of time for this one and I can recall being in a similar situation during the previous exams, so all it then took was to imagine doing things the way I should've, then.

Best way to get something done quickly, sometimes, is to slow down.
Sorry, only registered users may post in this forum.

Click here to login