MC78 Homework 1 (Fall 1998)
Due: September 21, 1998
-
Do exercise 5.9 from page 152.
-
Suppose we have a system that does preemptive priority-based
scheduling using externally defined priorities. Consider the following
scenario. A low-priority process is using some resource that only one
process can use at a time. The low-priority process is preempted by
an newly arriving medium-priority process, which just runs and runs
forever (totally CPU-bound). Now the medium-priority process is in
turn preempted by an arriving high-priority process. However, the
high-priority process needs the same resource that the low-priority
process was in the middle of using, so the high-priority process goes
into a waiting state, waiting for the resource. Which process will
run now? Why is this a bad thing? Give at least two completely
different modifications that could be made to the priority-based
scheduler to solve this problem. (Do not simply scrap the priority
scheduling entirely in favor of round-robin, for example. The goal is
to still generally give the high-priority process precedence.)
-
Windows NT Workstation versions 3.x and 4.0 both provide some
scheduling preference for the user's "foreground" application - the
application with the window that is currently "in focus" (i.e., the
window that would receive any keyboard input from the user). However,
the nature of this scheduling preference was changed in NT 4.0 versus
3.x. As background information, I'll summarize the scheduling
algorithm used in both versions of NT. (This description is
simplified, but gives the essential features.) The basic scheduling
algorithm is a preemptive multilevel queue, with one queue for each
priority level and round-robining among the processes at any one
priority level. Under normal circumstances, all a user's processes
will be at the same priority level (8, as it happens) and will use the
same time quantum for round-robining (normally 30 milliseconds). Of
course, a process may not run for its full time quantum - it can be
preempted by an arriving higher-priority process, in which case it
will get the remainder of its quantum when it resumes, or it can go
into a waiting state before the quantum is up, in which case it gets a
fresh quantum when it again becomes ready to run. With this
information as background, here is the difference between NT 3.x and
4.0: in 3.x, the foreground application gets boosted to a higher
priority level, whereas in 4.0 it instead gets double the normal time
quantum. (In 3.x it keeps the normal quantum and in 4.0 it keeps the
normal priority.) Explain what you would expect the user-visible
results of this difference to be, and why. How would the foreground
application behave differently? How would other (background)
applications behave differently?
Instructor: Max Hailperin