Why do we need the concept of locality of reference ? List the advantages and disadvantages of Round Robin algorithm.

This answer is restricted. Please login to view the answer of this question.

Login Now

Locality of reference refers to a phenomenon in which a computer program tends to access same set of memory locations for a particular time period. In other words, Locality of Reference refers to the tendency of the computer program to access instructions whose addresses are near one another. The property of locality of reference is mainly shown by loops and subroutine calls in a program.

- Hamro CSIT

  1. In case of loops in program control processing unit repeatedly refers to the set of instructions that constitute the loop.
  2. In case of subroutine calls, everytime the set of instructions are fetched from memory.
  3. References to data items also get localized that means same data item is referenced again and again.

 Round Robin (RR):

Advantages:

  1. Every process gets an equal share of the CPU.
  2. RR is cyclic in nature, so there is no starvation.

Disadvantages:

  1. Setting the quantum too short increases the overhead and lowers the CPU efficiency, but setting it too long may cause a poor response to short processes.
  2. The average waiting time under the RR policy is often long.
  3. If time quantum is very high then RR degrades to FCFS.
If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .