You are on page 1of 7

BSD 1101A: COMPUTER ORGANIZATION AND ARCHITECTURE

LECTURER: MR RAPHAEL AGONG

STUDENT:TEVIN MUTHENGIA KABURU

SCHOOL ID: 22/04823

EMAIL: 2204823@kcau.ac.ke

CONTACTS: 0791773012

SEMESTER: SEPTEMBER TO DECEMBER 2022 (TRIM 1)

ASSIGNMENT :
QUESTION

When people speak about inaccuracy in floating points arithmetic, they often ascribe errors to
cancellation that occurs during subtraction of nearly equal quantities, but when x and y are
approximately equal, the difference obtained during pipelining process (x-y) gives a null return;
an error is seen. Explain how this is resolved using the round robin process, using appropriate
diagrams to depict the solving of floating points.

Round Robin is a CPU scheduling algorithm where each process is assigned a fixed time slot
in a cyclic way. It is basically the preemptive version of First come First Serve CPU
Scheduling algorithm.
 Round Robin CPU Algorithm generally focuses on Time Sharing technique.
 The period of time for which a process or job is allowed to run in a pre-emptive
method is called time quantum.
 Each process or job present in the ready queue is assigned the CPU for that time
quantum, if the execution of the process is completed during that time then the
process will end else the process will go back to the waiting table and wait for its
next turn to complete the execution.
 It is simple, easy to implement, and starvation-free as all processes get fair share of
CPU.
 One of the most commonly used technique in CPU scheduling as a core.
 It is preemptive as processes are assigned CPU only for a fixed slice of time at most.
 The disadvantage of it is more overhead of context switching.

Example of Round-robin Scheduling


Consider this following three processes

Process Queue Burst time


P1 4
P2 3
P3 5
Step 1) The execution begins with process P1, which has burst time 4. Here, every process
executes for 2 seconds. P2 and P3 are still in the waiting queue.

Step 2) At time =2, P1 is added to the end of the Queue and P2 starts executing
Step 3) At time=4 , P2 is preempted and add at the end of the queue. P3 starts executing.

Step 4) At time=6 , P3 is preempted and add at the end of the queue. P1 starts executing.
Step 5) At time=8 , P1 has a burst time of 4. It has completed execution. P2 starts execution

Step 6) P2 has a burst time of 3. It has already executed for 2 interval. At time=9, P2 completes
execution. Then, P3 starts execution till it completes.
Step 7) Let’s calculate the average waiting time for above example.

Wait time
P1= 0+ 4= 4
P2= 2+4= 6
P3= 4+3= 7
REFERENCES
 Yadav, Rakesh Kumar, et al. "An improved round robin scheduling algorithm for CPU
scheduling." International Journal on Computer Science and Engineering 2.04 (2010):
1064-1066.
 Hahne, E. L. (1986). Round robin scheduling for fair flow control in data communication
networks. MASSACHUSETTS INST OF TECH CAMBRIDGE LAB FOR
INFORMATION AND DECISION SYSTEMS.

You might also like