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 stack queue circular queue tree Operating System isro2015 operating-system process-scheduling + – go_editor 14.0k views answer comment Share Follow Print See 1 comment 1 1 comment reply Vishnu__ commented Jul 21, 2022 reply Follow flag RoundRobin uses time-slice to give equal priority status to each and every process. So, executing after that time bound units, each process is preempted.Hence it uses a Circular Queue. 0 0 replyShare Please log in or register to add a comment.
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. ManojK answered Jun 19, 2016 • selected Jun 25, 2016 by Arjun ManojK comment Share Follow See all 5 Comments 5 5 Comments reply Show 2 previous comments ManojK commented Nov 20, 2016 reply Follow flag FCFS-Oueue SJF-Min heap Round Robin-Circular queue LJF-Max heap Priority-Priority queue. 25 25 replyShare yagneshmb commented Jan 25, 2021 reply Follow flag Thank you! 0 0 replyShare Siddharth_Perkar commented Aug 5 reply Follow flag Adding to @ManojK comment, SRTF - Min Heap (Priority Queue)Multilevel Queue - Multiple QueuesMultilevel Feedback Queue - Multiple Circular Queues 0 0 replyShare Please log in or register to add a comment.
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. अनुराग पाण्डेय answered Oct 6, 2015 अनुराग पाण्डेय comment Share Follow See all 3 Comments 3 3 Comments reply priti sharma commented Oct 6, 2015 reply Follow flag thank you . I just want to verify ! :) 0 0 replyShare shweta1920 commented Apr 14, 2017 reply Follow flag why cant it be simply 'queu' instead of 'circular queu'? 1 1 replyShare PRASAD07 commented Aug 4 reply Follow flag it will take unnecessary space in queue suppose each process need to be executed 2 times then the size of queue required would be 2n but in circular queue it will be n . Read the question carefully they have asked the best they mean to use optimized queue which is circular 0 0 replyShare Please log in or register to add a comment.