11_Operating Sytems-Process Control
11_Operating Sytems-Process Control
Computer Architecture
CT049-3-1-OS&CA
Ver: VE
Process Control
Management
Learning Outcomes
• 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 exi
t
Interrupt / time out
ready
ready running
running
scheduler
I/O or event dispatcher I/O or event wait
completion
blocked
blocked
Module Code & Module Title Slide Title SLIDE 6
Process States
• 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
Pointer to parent
process
Pointer area to child
process
Process state
Program counter
Register save area
Memory limits
Priority information
Accounting information
Pointer to files and
otherSlide Title
Module Code & Module Title SLIDE 13
Process Control Block Diagram
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
Module Code & Module Title Slide Title SLIDE 23