Content deleted Content added
https://superuser.com/a/841325 Tags: Reverted Visual edit Mobile edit Mobile web edit |
m →Types of operating system schedulers: Corrected Signal Redirect Tags: Mobile edit Mobile app edit Android app edit App section source |
||
(9 intermediate revisions by 5 users not shown) | |||
Line 112:
===={{Anchor|SHORT-TERM}}Short-term scheduling====
The ''short-term scheduler'' (also known as the ''CPU scheduler'') decides which of the ready, in-memory processes is to be executed (allocated a CPU) after a clock [[interrupt]], an I/O interrupt, an operating [[system call]] or another form of [[Signal
A preemptive scheduler relies upon a [[programmable interval timer]] which invokes an [[interrupt handler]] that runs in [[kernel mode]] and implements the scheduling function.
Line 238:
Very early [[MS-DOS]] and Microsoft Windows systems were non-multitasking, and as such did not feature a scheduler. [[Windows 3.1x]] used a non-preemptive scheduler, meaning that it did not interrupt programs. It relied on the program to end or tell the OS that it didn't need the processor so that it could move on to another process. This is usually called cooperative multitasking. Windows 95 introduced a rudimentary preemptive scheduler; however, for legacy support opted to let 16-bit applications run without preemption.<ref>{{webarchive |url=https://web.archive.org/web/*/www.jgcampbell.com/caos/html/node13.html |date=* |title=Early Windows }}</ref>
[[Windows NT]]-based operating systems use a multilevel feedback queue. 32 priority levels are defined, 0 through to 31, with priorities 0 through 15 being ''normal'' priorities and priorities 16 through 31 being soft real-time priorities, requiring privileges to assign. 0 is reserved for the Operating System. User interfaces and APIs work with priority classes for the process and the threads in the process, which are then combined by the system into the absolute priority level.
The kernel may change the priority level of a thread depending on its I/O and CPU usage and whether it is interactive (i.e. accepts and responds to input from humans), raising the priority of interactive and I/O bounded processes and lowering that of CPU bound processes, to increase the responsiveness of interactive applications.<ref>{{cite web|title=A Tale of Two Schedulers Windows NT and Windows CE |url=http://sriramk.com/schedulers.html |author=Sriram Krishnan |url-status=dead |archive-url=https://web.archive.org/web/20120722015555/http://sriramk.com/schedulers.html |archive-date=July 22, 2012 }}</ref> The scheduler was modified in [[Windows Vista]] to use the [[Time Stamp Counter|cycle counter register]] of modern processors to keep track of exactly how many CPU cycles a thread has executed, rather than just using an interval-timer interrupt routine.<ref>{{cite web|url=https://technet.microsoft.com/en-us/magazine/cc162494.aspx |title=Windows Administration: Inside the Windows Vista Kernel: Part 1 |website=Technet.microsoft.com |date=2016-11-14 |access-date=2016-12-09}}</ref> Vista also uses a priority scheduler for the I/O queue so that disk defragmenters and other such programs do not interfere with foreground operations.<ref>{{cite web |url=http://blog.gabefrost.com/?p=25 |title=Archived copy |website=blog.gabefrost.com |access-date=15 January 2022 |archive-url=https://web.archive.org/web/20080219174631/http://blog.gabefrost.com/?p=25 |archive-date=19 February 2008 |url-status=dead}}</ref>
Line 298:
===NetBSD===
[[NetBSD]] uses a multilevel feedback queue with priorities ranging from 0–223. 0–63 are reserved for time-shared threads (default, SCHED_OTHER policy), 64–95 for user threads which entered [[kernel space]],
===Solaris===
Line 364:
| [[Windows NT]] (including 2000, XP, Vista, 7, and Server)
| {{Yes}}
| [[Multilevel feedback
|}
|