CSE 131 Lecture Notes - Lecture 10: Freebsd, Context Switch, Timeshare

26 views4 pages
4 Mar 2019
School
Course
Professor

Document Summary

Scheduler is based on multi-level feedback queues. Thread priority is set by pri = min+[estcpu/4] + 2xnice. Values above max are set to max. Nice is set by the user to manually lower thread priority. Estcpu is an estimate of the number of ready processes. Selects next runnable thread from the run queues. Uses bitmask to quickly find first non-empty queue. High level scheduler: runs a few times per second. Prioritize interactive processes: use calculated interactivity score. Kernel picks a process to run next. Run-time system (at user level) schedules threads. Run each thread for less than process quantum. Example schedule: a1, a2, a3, a1, b1, b3, b2, b3. Not possible: a1, a2, b1, b2, a3, b3, a2, b1. May be more difficult for each process to specify priorities. Producer empty. down() reserves one place in the buffer and only successful is empty is > 0.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers