CPU Scheduling Algorithms Simulation Using Java
CPU Scheduling Algorithms Simulation Using Java
|
This non-preemptive scheduling algorithm
follows the first-in, first-out (I ) policy.
As each process becomes 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.
|
a a aa
a
a aa
The implementation of RR is easily managed with a
I ready queue.
The CPU is allocated to the process at the head the
ready queue. Then, one of two things will happen. If
the process has a CPU burst of less than 1 time
quantum, 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
time quantum, the process is preempted after 1
time quantum and put at the tail of the ready
queue. The CPU is then assigned to the next process
in the ready queue.
|
This non-preemptive scheduling algorithm
favors processes with the shortest
expected process time. As each process
becomes ready, it joins the ready queue.
When the current running process finishes
execution, the process in the ready queue
with the shortest expected processing
time (or service time) is selected to run
next.
|
emonstration
|
-uestions