10

Two-level scheduling is useful when a system is running more processes than fit in RAM: a lower-level scheduler switches between resident processes, and a higher-level scheduler swaps groups of processes in and out.

I find no other mention of two-level scheduling in Andrew Tanenbaum's Operating Systems: Design and Implementation, 1st ed. Exercise 2.22 asks why two-level scheduling might be used; I don't know whether it's there as a reading comprehension check or there are other reasons not prominently mentioned in the text.

Is two-level scheduling useful to manage other resource contentions, besides memory?

Wandering Logic
  • 17,863
  • 1
  • 46
  • 87
Gilles 'SO- stop being evil'
  • 44,159
  • 8
  • 120
  • 184

1 Answers1

8

There are other forms of two-level scheduling than the type you describe. For example, one level of scheduling could be per-user and the other could be per-process, aiming for giving a user with 20 processes the same amount of CPU time as a user with 1 process. With a single-level scheduler, each process might get 1/21 of the CPU time.

Another form of two-level scheduling could be per-process and per-thread, aiming to give a process with 20 threads the same amount of CPU time as a process with 1 thread.

Ellen Spertus
  • 1,592
  • 13
  • 30