Lecture Slides 08 081-Processes
Lecture Slides 08 081-Processes
Computer
system:
Processes
University of Washington
Section 8: Processes
What is a process
Creating processes
Fork-Exec
Processes
University of Washington
What is a process?
Why are we learning about processes?
Processes are another abstraction in our computer system – the
process abstraction provides an interface between the program and the
underlying CPU + memory.
What do processes have to do with exceptional control flow?
Exceptional control flow is the mechanism that the OS uses to enable
multiple processes to run on the same system.
Processes
University of Washington
Processes
Definition: A process is an instance of a running program
One of the most important ideas in computer science
Not the same as “program” or “processor”
Processes
University of Washington
Concurrent Processes
Two processes run concurrently (are concurrent) if their
instruction executions (flows) overlap in time
Otherwise, they are sequential
Examples:
Concurrent: A & B, A & C
Sequential: B & C
time
Processes
University of Washington
time
Processes
University of Washington
Context Switching
Processes are managed by a shared chunk of OS code
called the kernel
Important: the kernel is not a separate process, but rather runs as part
of a user process
Control flow passes from one process to another via a context
switch… (how?)
Process A Process B
user code
user code
Processes