Professional Documents
Culture Documents
At the end
• Describe the various process states
of this • Describe the life cycle of a process
chapter, • Describe the role of interrupt in process
management
students • Define the purpose of CPU scheduler
• Differentiate between preemptive and non-
will be able preemptive technique in scheduling.
to:
PROCESS STATES
• The state of a process is defined by the current activity of
that process.
Medium term
scheduler
Short? Medium? Long?
Answer
Long term
scheduler
Short term
scheduler
Medium term
scheduler
More..?
B
C
A
B
C
Gantt Chart
P1 P2
time
t=5
t=0 t=10 t=13
At t=5, P2 arrives
but has to wait
FIFO scenario:
- P1 arrives at t=0, while P2 arrives at t=5.
- Hence P1 will execute first
Turnaround
Process Burst time Priority Finish Time Waiting Time Response Time
Time
P1 10 3 16 6 16 16
P2 1 1 1 0 1 1
P3 2 3 18 16 18 18
P4 1 4 19 18 19 19
P5 5 2 6 1 6 6
• PRIORITY scenario:
- P2 has the highest priority, so it executes first. P2 preempts
P1.
Q&A