CPU Scheduling Algorithms Simulation Using Java
CPU Scheduling Algorithms Simulation Using Java
Kaushal Sinha
CSC 4320
Spring 2007
|
¦ ¦
¦¦
This non-pree ptive scheduling algorith
follows the first-in, first-out (¦¦ ) policy.
As each process beco es ready, it joins the
ready queue. When the current running
process finishes execution, the oldest
process in the ready queue is selected to
run next.
|
ë ë ëë
ë
ë ëë
The i ple entation of RR is easily anaged with a
¦¦ ready queue.
The CPU is allocated to the process at the head the
ready queue. Then, one of two things will happen. f
the process has a CPU burst of less than 1 ti e
quantu , the process itself will release the CPU
voluntarily. The CPU is then assigned to the next
process in the ready queue. therwise, if the CPU
burst of the currently running job is longer than 1
ti e quantu , the process is pree pted after 1
ti e quantu and put at the tail of the ready
queue. The CPU is then assigned to the next process
in the ready queue.
|
¦ ¦
This non-pree ptive scheduling algorith
favors processes with the shortest
expected process ti e. As each process
beco es ready, it joins the ready queue.
When the current running process finishes
execution, the process in the ready queue
with the shortest expected processing
ti e (or service ti e) is selected to run
next.
|
e onstration
|
]uestions