Information Technology Reference
In-Depth Information
Figure7.5: Multi-level Feedback Queue when running a mixture of I/O-bound
and compute-bound tasks.
tasks may receive no time on the processor. To combat this, the MFQ scheduler
monitors every process to ensure it is receiving its fair share of the resources. At
each level, Linux actually maintains two queues | tasks whose processes have
already reached their fair share are only scheduled if all other processes at that
level have also received their fair share. Periodically, any process receiving less
than its fair share will have its tasks increased in priority; equally, tasks that
receive more than their fair share can be reduced in priority.
Adjusting priority also addresses strategic behavior. From a purely selfish
point of view, a task can attempt to keep its priority high by doing a short I/O
request immediately before its time quantum expires. Eventually the system
will detect this and reduce its priority to its fair-share level.
Our previously hapless supermarket manager reads a bit farther into the
textbook and realizes that express lanes are a form of multi-level queue. By
limiting express lanes to customers with a few items, the manager can ensure
short tasks complete quickly, reducing average response time. The manager can
also monitor wait times, adding extra lanes to ensure that everyone is served
reasonably quickly.
7.1.6
Summary
We summarize the lessons from this section:
Search WWH ::




Custom Search