Priority and Round Robin Scheduling Algorithms Quiz

SufficientLithium avatar
SufficientLithium
·
·
Download

Start Quiz

Study Flashcards

9 Questions

Which queue in the multilevel queue scheduling has a time quantum of 16 milliseconds?

Q1

If a job in queue Q0 does not finish in 8 milliseconds, where is it moved to next according to the multilevel queue scheduling policy?

Q1

What happens if a job in queue Q1 still does not complete after receiving an additional 16 milliseconds?

It is preempted and moved to Q2

In the multilevel queue scheduling system, which process has an arrival time of 3 and a burst time of 40?

P4

Multilevel Queue Scheduling involves how many queues according to the scenario provided?

Three queues

What is the burst time for process P2 in queue Q2 at time 15ms in the multilevel queue system?

$12$ ms

Multilevel Queue Scheduling includes which queue with a time quantum of 8 milliseconds?

Q0

Multilevel Queue Scheduling preemptively moves jobs between queues based on ____________.

Burst Time

Which process in the multilevel queue system has the highest completion time?

P4

Study Notes

Priority Scheduling

  • The priority scheduling process involves processes P1, P2, P3, P4, and P5 with burst times 10, 1, 2, 1, and 5, respectively, and priorities 3, 1, 4, 5, and 2, respectively.
  • The average response time is calculated as (6+0+16+18+1)/5 = 8.2 msec.

Round Robin (RR) Scheduling

  • Each process gets a small unit of CPU time (time quantum q), usually 10-100 milliseconds.
  • After the time has elapsed, the process is preempted and added to the end of the ready queue.
  • 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.
  • In the example, processes P1, P2, and P3 have burst times 24, 3, and 0, respectively, and arrive at the same time 0, with a time quantum of 4 ms.

Multilevel Queue Scheduling

  • There are three queues: Q0 with RR scheduling and a time quantum of 8 milliseconds, Q1 with RR scheduling and a time quantum of 16 milliseconds, and Q2 with FCFS scheduling.
  • A new job enters queue Q0 and is served FCFS; if it doesn't finish in 8 milliseconds, it's moved to Q1, and if it still doesn't complete, it's preempted and moved to Q2.
  • Process P1, P2, P3, and P4 have arrival times 0, 1, 2, and 3, respectively, and burst times 7, 60, 20, and 40, respectively.

Additional Concepts

  • Time slice: each queue gets a certain amount of CPU time, which it can schedule amongst its processes (e.g., 80% to foreground in RR and 20% to background in FCFS).
  • Multilevel queue scheduling with varying arrival times and preemption.
  • Fixed priority non-preemptive scheduling for multi-processors or multi-core processors.

Test your knowledge on priority and round robin scheduling algorithms with this quiz. Questions cover processes, burst time, priority scheduling, Gantt chart, and average response time calculations.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

More Quizzes Like This

CPU Scheduling Algorithms
15 questions

CPU Scheduling Algorithms

GracefulMossAgate avatar
GracefulMossAgate
Priority Queues and Job Scheduling Quiz
5 questions
Linux O(1) Scheduler Priority
10 questions
Use Quizgecko on...
Browser
Browser