13,985 views
16 16 votes

Suppose a system contains $n$ processes and system uses the round-robin algorithm for CPU scheduling then which data structure is best suited ready queue of the process

  1. stack
  2. queue
  3. circular queue
  4. tree

2 Answers

Best answer
24 24 votes

Circular queue is the best data structure for round-robin CPU scheduling algorithm .

In round-robin CPU scheduling if the timer goes off first, then the process is swapped out of the CPU and moved to the back end of the ready queue.

The ready queue is maintained as a circular queue, so when all processes have had a turn, then the scheduler gives the first process another turn, and so on.

So option C is correct.

• selected by
4 4 votes
Yes, it should be Circular Queue.

Since it is given that there are n processes in the ready queue, we do not have to worry about the overflow in the circular queue also.
Answer:
Position:
Show:

Related questions

13 13 votes
11 answers 11 answers
18.7k
18.7k views
ajit asked Oct 12, 2015
18,737 views
Suppose two jobs, each of which needs $10$ minutes of CPU time, start simultaneously. Assume $50\%$ I/O wait time. How long will it take for both to complete, if they run...
7 7 votes
2 answers 2 answers
5.7k
5.7k views
go_editor asked Jun 19, 2016
5,678 views
Consider the following program.main() { fork(); fork(); fork(); }How many new processes will be created?8675
13 13 votes
5 answers 5 answers
5.7k
5.7k views
go_editor asked Jun 17, 2016
5,680 views
In a lottery scheduler with 40 tickets, how we will distribute the tickets among 4 processes $P_1, P_2, P_3$ and $P_4$ such that each process gets 10%, 5%, 60% and 25% re...
7 7 votes
2 answers 2 answers
13.2k
13.2k views
go_editor asked Jun 17, 2016
13,179 views
If there are 32 segments, each size 1 k bytes, then the logical address should have13 bits14 bits15 bits16 bits