encyclopegia.org

Two-level scheduling

Two-level scheduling is a computer science term to describe a method to more efficiently perform process scheduling that involves swapped out processes.[src] Consider this problem: A system contains 50 running processes all with equal priority.[src] However, the system's memory can only hold 10 processes in memory simultaneously.[src] Therefore, there will always be 40 processes swapped out written on virtual memory on the hard disk.[src] The time taken to swap out and swap in a process is 50 ms respectively.[src] With straightforward Round-robin scheduling, every time a context switch occurs, a process would need to be swapped in (because only the 10 least recently used processes are swapped in).[src] Choosing randomly among the processes would diminish the probability to 80% (40/50).[src] If that occurs, then obviously a process also need to be swapped out.[src] Swapping in and out of is costly, and the scheduler would waste much of its time doing unneeded swaps.[src] That is where two-level scheduling enters the picture.[src] It uses two different schedulers, one lower-level scheduler which can only select among those processes in memory to run.[src] That scheduler could be a Round-robin scheduler.[src] The other scheduler is the higher-level scheduler whose only concern is to swap in and swap out processes from memory.[src] It does its scheduling much less often than the lower-level scheduler since swapping takes so much time.…[src]

Two-level scheduling is a computer science term to describe a method to more efficiently perform process scheduling that involves swapped out processes.[src] Consider this problem: A system contains 50 running processes all with equal priority.[src] However, the system's memory can only hold 10 processes in memory simultaneously.[src] Therefore, there will always be 40 processes swapped out written on virtual memory on the hard disk.[src] The time taken to swap out and swap in a process is 50 ms respectively.[src] With straightforward Round-robin scheduling, every time a context switch occurs, a process would need to be swapped in (because only the 10 least recently used processes are swapped in).[src] Choosing randomly among the processes would diminish the probability to 80% (40/50).[src] If that occurs, then obviously a process also need to be swapped out.[src] Swapping in and out of is costly, and the scheduler would waste much of its time doing unneeded swaps.[src] That is where two-level scheduling enters the picture.[src] It uses two different schedulers, one lower-level scheduler which can only select among those processes in memory to run.[src] That scheduler could be a Round-robin scheduler.[src] The other scheduler is the higher-level scheduler whose only concern is to swap in and swap out processes from memory.[src] It does its scheduling much less often than the lower-level scheduler since swapping takes so much time.[src] Thus, the higher-level scheduler selects among those processes in memory that have run for a long time and swaps them out.[src] They are replaced with processes on disk that have not run for a long time.[src] Exactly how it selects processes is up to the implementation of the higher-level scheduler.[src] A compromise has to be made involving the following variables: Response time: A process should not be swapped out for too long.[src] Then some other process (or the user) will have to wait needlessly long.[src] If this variable is not considered resource starvation may occur and a process may not complete at all.[src] Size of the process: Larger processes must be subject to fewer swaps than smaller ones because they take longer time to swap.[src] Because they are larger, fewer processes can share the memory with the process.[src] Priority: The higher the priority of the process, the longer it should stay in memory so that it completes faster.[src] ==References== Tanenbaum, Albert Woodhull, Operating Systems: Design and Implementation, p.92[src]

38 sentences · 38 cited inline · 0 references stored

References

No reference rows published for this article.

Cite this article

MLA

"Two-level scheduling." encyclopegia.org, 2021, https://encyclopegia.org/wiki/two-level-scheduling. Accessed 30 November 2026.

Chicago

"Two-level scheduling." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/two-level-scheduling.

APA

encyclopegia.org. (2021). Two-level scheduling. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/two-level-scheduling

Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

EFL League Two

stub · references available

The Two Noble Kinsmen

stub · references available

Epic Mickey 2: The Power of Two

stub · references available

two-stage-to-orbit

stub · references available

Teresa Cristina of the Two Sicilies

stub · references available

high-level programming language

stub · references available

two-dimensional space

stub · references available

Maria Christina of the Two Sicilies

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=999660954 · 0.5 · snapshot enwiki-000999660954

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners
  • Index — every corpus, paper and record
  • Estate guide — what a public data estate is
  • Founder — Lois-Kleinner Alpasan
  • Records — DOIs and external deposits
  • Documents — one-pagers, PDFs and QR codes
  • Brand kit — logos and share images
  • Papers — plain-language briefs with citations
  • Browser — search engine, PWA and bookmarklet
  • Anticloud — the operator and its projects

As seen in Business Insider · 336 outlets · evidence DOIs · plain-language papers

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.