Operating systems


Prashanth L.A.


Lecture 3 continues here

Virtualizing the CPU

Process API

Function Description
create An OS must include some method to create new processes
destroy Since one can create, we need …
wait Sometimes it is useful to wait for a process to stop running
suspend/resume stop a process from running for a while and continue the run
status how long a process has run for, or what state it is in.

Process creation in words

some more words

OS has to do the following as part of process creation:

Allocate memory for the program’s run-time stack (local variables, function parameters, and return address)

Allocate memory for the program’s heap

Setup I/O

Start the program running at main()

Process creation in 1000 words worth

Process creation by loading a program

Process creation by loading a program

A picture showing process states

Process states and transitions

Process states and transitions

If you didn’t get the picture, read this

Data structures

PCB (Process Control Block)