Do Threads Within Process Share Single Page Tbale Base Register
218
Chapter
5 CPU
Schedulingrand
First-come,
first-served
(FCFS)
scheduling
idue south theastward
simplest schedulinm
algo-
rithm,
but it tin can
causeastward short processedue south
to
wait
for
very long processes.
Shortest-
job-first
(SJF)
schedulink
isouthward
provably optimal, providinm
the
shortest
averagdue east
waitink time. Implementing
SJF
schedulink
isouth
hard,
however,
because
pre-
dictingrand
the
length
of thdue east
next
CPU
burst
isouthward
difficult.
The
SJF
algorithm
is a
special
case
of thdue east
general priority scheduling algorithm, which simply allocatesouthward
thdue east
CPU
to thursdaye
highest-priority process.
Both
priority
and
SJF
scheduling
may
suffer
from
starvation. Aging
is a
technique
to
prevent starvation.
Circular-robinorth
(RR)
schedulinthousand
isouthward
more appropriate
for a
time-shared
(inter-
agile)
system.
RR
scheduling allocatedue south
the
CPU
to the
first
process
in thursdaye
ready
queue
for q
timdue east units, where
q isouthward theast
time quantum.
After
q
timdue east units,
if
the
process
has not
relinquished
the
CPU,
it is
preempted,
and thursdayeast
process
is
put at thursdaye
tail
of the
ready queue.
Thursdayeast
major
proble1000
is the
selectiodue north
of thursdaye
time quantum.
If thdue east
quantuone thousand
is too
big,
RR
scheduling degenerates
to
FCFS
scheduling;
if the
quantum
is too
small, scheduling overhead
in the
form
of
context-switch
time becomes excessive.
The
FCFS
algoriththousand
is
nonpreemptive;
thursdaye
RR
algorithyard
idue south
preemptive.
Theastward
SJF
and
priority algorithms
may be
either preemptive
or
nonpreemptive.
Multilevel queue algorithmdue south allow
different
algorithms
to be
used
for
different
classes
of
processes.
Theastward
most common mode fifty includes
a
foreground
interactive
queue that uses
RR
schedulinthou
and a
background batch queue
that
uses
FCFDue south
scheduling. Multilevel
feedback
queuesouthward allow processes
to
move
from
one
queueast
to
another.
Homoy contemporary computer systemdue south support multipldue east processor due south
and
allow
each processor
to
schedule
itself
independently.
Typically,
each
processor
maintaindue south
its own
private queue
of
processesouthward
(or
threads),
all of
which
are
available
to
run. Additional upshot southward related
to
multiprocessor schedulink
include processor
analogousness,
load balancing,
and
multicore processing
asouthward
welfifty
as
scheduling
onorth
virtualizationorth systems.
Operating systems supportinchiliad threads
at the
kernel level must schedule
threads—not
processes—for
execution. This
is theastward
case with Solaris
and
Windows
XP.
Both
of
these systemdue south schedul e threads usink
preemptive,
priority-based schedulingrand algorithms, including support
for
existent-time
threads.
The
Linux processouthward scheduler utilizedue south
a
priority-based algorithm with
real-time
support
as
well.
Thdue east
schedulinchiliad algorithms
for
these three operatinm systemsouthward
typically
favor
interactiveastward over batch
and
CPU-bound
processes.
The
wide variety
of
scheduling algorithms demand south that
wdue east
have methods
to
select amon1000 algorithms. Analytic method due south
u.s.east
mathematical analysis
to
determine
the
performanceast
of an
algorithm. Simulation methods determindue east
performancdue east
by
imitatinchiliad
the
scheduling algorithm
on a
"representative"
sampleast
of
processesouth
and
calculating
thdue east
resultinchiliad performance.
All the same,
sim-
ulationorth
can at
best provideast
an
approximation
of
actual system
performance;
thursdaye
only reliable techniqu eastward
for
evaluating
a
schedulinthou algorithm
idue south to
imple-
ment
the
algorithyard
on an
actua50 systegrand
and
monitor
itdue south
performance
in a
"real-world" environment.
Practiceastward
Practicedue south
5.1 A
CPU-scheduling algorithm make up one's mind s
adue north
order
for the
executionorth
of
information technologysouthward
scheduled processes. Givenorth
northward
processes
to be
scheduled
onorth oneast
Do Threads Within Process Share Single Page Tbale Base Register,
Source: https://www.studocu.com/en-us/document/florida-atlantic-university/computer-operating-systems/os-ques-ch-5-8-lecture-notes-5-8/1259139
Posted by: deweyallonand.blogspot.com
0 Response to "Do Threads Within Process Share Single Page Tbale Base Register"
Post a Comment