11 - Operating Sytems Process Control
11 - Operating Sytems Process Control
Computer Architecture
CT049-3-1-OS&CA
Ver: VD1
• What is a process?
– it is a program in execution which progresses
in a sequential manner.
– it is a unit of work with a unique process
identification.
– requires resources like memory, CPU time
and files to complete its task.
• What is a process?
– resources are allocated when a process is
created or while in execution
– the operating system creates and deletes
user and system processes
– a process is active while a program is
passive
– the operating system keeps track of
processes using a process table
new
new terminated
terminated
admitted exit
Interrupt / time out
ready
ready running
running
scheduler dispatcher
I/O or event I/O or event wait
completion
blocked
blocked
• Ready - Running
– instructions are being executed
– a process is using the CPU
– the number of running processes will depend on the number of
processors the computer has
• A running process can possibly become Blocked, Ready
or Terminated
• A Running process becomes Blocked when:-
– the process itself cannot execute because it is waiting for an I/O
operation to complete
– waiting for some external event to happen
readyqueue
ready queue CPU
CPU
I/O
I/O I/OQueue
I/O Queue I/ORequest
I/O Request
timeslice
time slice
expired
expired
child
child childexecute
child execute forkaachild
fork child
terminates
terminates
interrupt
interrupt waitfor
wait foran
an
occurs
occurs interrupt
interrupt
Q&A
CT049-3-1-OS&CA Process Control 23 of 23