projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clarification.
[pintos-anon]
/
doc
/
mlfqs.texi
diff --git
a/doc/mlfqs.texi
b/doc/mlfqs.texi
index 90c22f3c2119d13676e51ed1c48fbf38b2bde867..b9a31865120fb10f84596c15ccdbee6ac0ca8dc2 100644
(file)
--- a/
doc/mlfqs.texi
+++ b/
doc/mlfqs.texi
@@
-1,5
+1,5
@@
-@node Multilevel Feedback Scheduling,
, Threads FAQ, Project 1--Threads
-@
section
Multilevel Feedback Scheduling
+@node Multilevel Feedback Scheduling,
Coding Standards, References, Top
+@
appendix
Multilevel Feedback Scheduling
This section gives a brief overview of the behavior of the Solaris 2.6
Time-Sharing (TS) scheduler, an example of a Multilevel Feedback Queue
This section gives a brief overview of the behavior of the Solaris 2.6
Time-Sharing (TS) scheduler, an example of a Multilevel Feedback Queue
@@
-22,7
+22,7
@@
waiting in higher priority queues are always scheduled over those in
lower priority queues. Processes at the same priority are usually
scheduled in a round-robin fashion.
lower priority queues. Processes at the same priority are usually
scheduled in a round-robin fashion.
-Such schedulers tend to be preemptible
in order
to support interactive
+Such schedulers tend to be preemptible to support interactive
processes. That is, a higher priority process is immediately
scheduled if a lower priority process is running on the CPU.
processes. That is, a higher priority process is immediately
scheduled if a lower priority process is running on the CPU.
@@
-37,7
+37,7
@@
scheduled if a lower priority process is running on the CPU.
@end menu
@node Scheduling in Solaris
@end menu
@node Scheduling in Solaris
-@s
ubs
ection Scheduling in Solaris
+@section Scheduling in Solaris
The Solaris operating system is based on Unix System V Release 4
(SVR4). Scheduling in Solaris, as in all SVR4-based schedulers, is
The Solaris operating system is based on Unix System V Release 4
(SVR4). Scheduling in Solaris, as in all SVR4-based schedulers, is
@@
-97,7
+97,7
@@
class. Note the priorities of each of the processes, as listed in the
fifth column.
@node Class Independent Functionality
fifth column.
@node Class Independent Functionality
-@s
ubs
ection Class Independent Functionality
+@section Class Independent Functionality
The class independent routines arbitrate across the scheduling
classes. This involves three basic responsibilities.
The class independent routines arbitrate across the scheduling
classes. This involves three basic responsibilities.
@@
-120,7
+120,7
@@
must be moved between blocked and ready queues.
@end itemize
@node Time-Sharing Scheduling Class
@end itemize
@node Time-Sharing Scheduling Class
-@s
ubs
ection Time-Sharing Scheduling Class
+@section Time-Sharing Scheduling Class
The time-sharing scheduler in Solaris is an example of a multi-level
feedback queue scheduler. A job begins at priority 29. Compute-bound
The time-sharing scheduler in Solaris is an example of a multi-level
feedback queue scheduler. A job begins at priority 29. Compute-bound
@@
-134,7
+134,7
@@
time-slice. Its priority is raised if it has not consumed its
time-slice before a starvation interval expires.
@node Dispatch Table
time-slice before a starvation interval expires.
@node Dispatch Table
-@s
ubs
ection Dispatch Table
+@section Dispatch Table
The durations of the time-slices, the changes in priorities, and the
starvation interval are specified in a user-tunable dispatch table.
The durations of the time-slices, the changes in priorities, and the
starvation interval are specified in a user-tunable dispatch table.
@@
-256,7
+256,7
@@
levels after it consumes its time-slice. The priority of a process is
increased to 50 or above when the starvation timer expires.
@node Implementation
increased to 50 or above when the starvation timer expires.
@node Implementation
-@s
ubs
ection Implementation
+@section Implementation
For each job in the TS class, the following data structure is
maintained (we've removed a few of the fields for simplicity):
For each job in the TS class, the following data structure is
maintained (we've removed a few of the fields for simplicity):
@@
-279,7
+279,7
@@
typedef struct tsproc @{
The @code{kthread_t} structure tracks the necessary information to
context-switch to and from this process. This structure is kept
The @code{kthread_t} structure tracks the necessary information to
context-switch to and from this process. This structure is kept
-separate from the time-sharing class
in order
to separate the
+separate from the time-sharing class to separate the
mechanisms of the dispatcher from the policies of the scheduler.
There are seven interesting routines in the TS class:
mechanisms of the dispatcher from the policies of the scheduler.
There are seven interesting routines in the TS class:
@@
-332,7
+332,7
@@
preempted thread is added to the front of its priority queue.
@end table
@node Fairness
@end table
@node Fairness
-@s
ubs
ection Fairness
+@section Fairness
The Solaris time-sharing scheduler approximates fair allocations by
decreasing the priority of a job the more that it is scheduled.
The Solaris time-sharing scheduler approximates fair allocations by
decreasing the priority of a job the more that it is scheduled.
@@
-356,7
+356,12
@@
consumes its timeslice, its priority is lowered about ten levels Since
the coarse job runs more frequently, it drops in priority at a faster
rate than the other two jobs.
the coarse job runs more frequently, it drops in priority at a faster
rate than the other two jobs.
+@ifnottex
@image{mlfqs1}
@image{mlfqs1}
+@end ifnottex
+@iftex
+@image{mlfqs1, 3in}
+@end iftex
The impact of this policy on the relative execution times of the three
applications is shown in the next graph below. Because the coarse
The impact of this policy on the relative execution times of the three
applications is shown in the next graph below. Because the coarse
@@
-364,10
+369,15
@@
application acquires more CPU time, it finishes its work earlier than
the other applications, even though all three jobs require the same
amount of time in a dedicated environment.
the other applications, even though all three jobs require the same
amount of time in a dedicated environment.
+@ifnottex
@image{mlfqs2}
@image{mlfqs2}
+@end ifnottex
+@iftex
+@image{mlfqs2, 3in}
+@end iftex
@node Project Requirements
@node Project Requirements
-@s
ubs
ection Project Requirements
+@section Project Requirements
For your project, you need to implement code that is similar in
functionality to the Solaris TS scheduler, but your code does not have
For your project, you need to implement code that is similar in
functionality to the Solaris TS scheduler, but your code does not have