Schedulers University of New Mexico - - PowerPoint PPT Presentation
Schedulers University of New Mexico - - PowerPoint PPT Presentation
Schedulers University of New Mexico https://commons.wikimedia.org/wiki/ File:Simplified_Structure_of_the_Linux_Kern el.svg 2 University of New Mexico O(1) scheduler (older) Two arrays, switching between them is just changing a pointer
University of New Mexico
2
https://commons.wikimedia.org/wiki/ File:Simplified_Structure_of_the_Linux_Kern el.svg
University of New Mexico
3
O(1) scheduler (older)
Two arrays, switching between them is just changing a pointer Uses heuristjcs to try to know which processes are interactjve
Average sleep tjme
htups://en.wikipedia.org/wiki/O(1)_scheduler
University of New Mexico
4
CFS scheduler (currently in Linux)
Completely Fair Scheduler Red-black tree of executjon to the nanosecond
niffjes
Like weighted fair queuing for packet networks An ideal processor would share equally maximum executjon tjme = tjme the process has been waitjng to
run / total number of processes
htups://en.wikipedia.org/wiki/Completely_Fair_Scheduler
University of New Mexico
5
BFS (now MuQQS)
Brain “Hug” Scheduler Specifjcally for desktops Weighted round-robin where the weights are based on some
very complex formulae (see Wikipedia for details)
No priority modifjcatjon for sleep behavior Time slice = 6ms (human perceptjon of jituer ≈ 7ms) Performs slightly betuer than CFS for <16 cores htups://en.wikipedia.org/wiki/Brain_Fuck_Scheduler htups://lwn.net/Artjcles/720227/
University of New Mexico
6
Windows NT through 10
- Multilevel Feedback Queue (MLFQ)
University of New Mexico
7
Mac OS X
- XNU is a mix of FreeBSD and Mach
– Network, files, processes, POSIX interface,
- etc. come from FreeBSD
– CPU scheduling, memory management,
specialized IPC, etc. comes from Mach
- Round-robin and MLFQ schedulers
University of New Mexico
8
IOS (i.e., iPhone)
- Same as Mac OS X
– MLFQ and round-robin
University of New Mexico
9
Android
- Same as Linux
– Completely Fair Scheduler
University of New Mexico
10
FreeBSD
- https://www.usenix.org/legacy/event/bsdco
n03/tech/full_papers/roberson/roberson.pdf
- ULE scheduler
- Looks a lot like Linux’s old O(1) scheduler
University of New Mexico
11
Others
- GNU Hurd uses GNU Mach’s scheduler
– MLFQ and RR
- Haiku has a simple RR scheduler where the time
slice is based on the priority
- Solaris uses MLFQ
- Minix and xv6 - ???
- Real-time OSes - ???
- Supercomputers - ???