/ COMPUTER-FUNDAMENTAL

multilevel Queue

Multilevel Queue


We have learnt several scheduling algorithms, such as RR and FIFO.
Multilevel queue is a scheduling process that applies different scheduling algorithms
to the different queues in each level.
It classifies the processes in different level depending on use.

For example, OS classifies interactive process with user as more important than background process.


Why need Multilevel queue?

Interactive process time is shorter and more affective to users.
For instance, Website is interactive process.
If the browser is slow, users will close the site.
However, Extracting Zip.file or downloading movies are background process.
These processes are not really affective to users, even if it is slow.

  • What users doing now == interactive process
  • Response time == time that respond the request from user

    Those reasons affect that interactive processes need to have higher priority,
    being applied more effective algorithm.

IPC

  • System process is the highest priority, which is made by OS.
  • Background process is applied FCFS algorithm (one process takes the resource until finish).
    e.g. Downloading will be finish during user doing internet surfing.

  • Interactive process is applied RR algorithm (processes will work in fixed time).
    e.g. Internet surfing won’t be affected by convey effect.

  • Student process is the lowest priority, which is made by user.

    OS separates the process depending on roles.

No process in the lower priority could run unless the queues for higher priority process is all empty.
If higher process enters the “Ready queue” during lower process running, higher process preempts the resources first.
Also, sometimes OS applies time-slice(RR algorithm). (= Preemption + RR)
For example, in foreground - background queue, OS allocates 80% of CPU burst to foreground queue, 20% of CPU burst to background queue.
To allocates lone time-slice in RR algorithm, it pretends to be FCFS algorithm.