As we all know that round robin is gonna be something hard for practicals. I have made a program and found a big one on internet. It is your preference to choose one. 😉
Here goes the Round Robin : Process execution in Operating System –
- Each process gets a small unit of CPU time (time quantum q), usually 10-100 milliseconds. After this time has elapsed, the process is preempted and added to the end of the ready queue.
- If there are n processes in the ready queue and the time quantum is q, then each process gets 1/n of the CPU time in chunks of at most q time units at once. No process waits more than (n-1)q time units.
- Timer interrupts every quantum to schedule next process
Performance
- q large -> FIFO
- q small -> q must be large with respect to context switch, otherwise overhead is too high.
Click below for program – Continue reading →