# Priority and Round Robin Scheduling Algorithms Quiz

SufficientLithium
·
·

Start Quiz

Study Flashcards

## 9 Questions

Q1

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

P4

Three queues

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

$12$ ms

Q0

Burst 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.

• 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

Use Quizgecko on...
Browser
Information:
Success:
Error: