10
$\begingroup$

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?

$\endgroup$
2
  • 1
    $\begingroup$ It might be good for caches and disk IO, but that is not "besides memory". $\endgroup$
    – Raphael
    Commented Mar 11, 2012 at 22:55
  • $\begingroup$ As @Raphael says, but in other words, it avoids/reduces thrashing. $\endgroup$ Commented Mar 20, 2012 at 19:35

1 Answer 1

8
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.