22-JAN-2004
Lecture Outline
Note: Only topics are listed here, make sure you
see class notes for details.
You are also required to read online notes on your own.
- Anoop Gupta
Processes
- Program and Process
Program is a static code and static data.
Process is a program
in execution .
There can be multiple processes from the same program
e.g. many users can run ls at the same time.
One program can invoke multiple processes
e.g. Like a script consisting of many commands
Process States:
- New
-
Ready
- Running
- Waiting (Blocked)
- Terminated
- Threads and Processes
A process is a different
than a thread.
Thread is a lightweight process.
Each thread is a separate
execution streams that share address
space.
Can have multiple threads within
a process.
- Why use processes?
General principles of Divide and
Conquer
Many operation occur
concurrently within system
Easier to reason about
processes
- System Classification
Uniprogramming - Only one
process at a time
Multiprogramming - Multiple
processes at a time
- Multiprogramming
OS requirements
for multiprogramming. Separation of
poilcy and mechanism
- Dispatch
Mechanism
- How dispatcher gain
control: User mode Vs System mode
- Two ways OS gain controls:
Traps and Hardware Interrupts
What state must be saved by dispatcher?
- Process Creation
Two ways to create a process
- New one from scratch
- Clone an existing one
Project 1 was discussed with use of java threads and emphasis on coding styles and use of comments.
CS 537 - Introduction to Operating Systems (Spring
2004) Anoop
Gupta