Processes (6) Flashcards
What is a program?
In an OS context: an inanimate entity.
In a non OS context: an animate entity.
What else other than program code does a process contain?
3 memory areas: stack, main, heap. Also contains data store for variables.
What is single user vs multi-user systems?
Single: only 1 process at a time, processor dedicated to that process.
Multi: several processes interleaved, reasonable response time, allocate resources, support inter-process communication, user creation of process.
How are processes created?
User logs on, process spawns another process, batch job, created to support service ie printing.
How are processes terminated?
Log off, quit, error, termination of batch job.
List 7 reasons for process termination?
Normal completion. Time limit exceeded. Memory unavailable. Bounds violation. Protection error. Arithmetic error. Time overrun (waiting for event to happen).
List another 7 reasons for process termination.
I/o failure invalid instruction. Privileged instruction. Data misuse. OS intervention (deadlock). Parent terminates so child terminates. Parent request.
In two state process model what are two ways a process can occur to be not running?
Queuing for it’s turn to start. Was interrupted and is queuing for it’s turn to restart.
What advantage has five state model over two state model?
Two state doesn’t distinguish between non-running processes ready to to run and non-running processes not yet ready to run.
List five states of five state model:
New, ready, running, blocked, exit.
What initiates transition from one process state to another?
Short-term and long-term schedulers.
What is the solution to having jus 1 queue for blocked processes?
Have multiple separate queues for each event the blocked processes are waiting on.
What two types of processes are there?
CPU an I/O bound processes.
Cpu mostly calculations.
I/o mostly I/o.
What is solution to inefficiency of fast cpu and slow I/o devices?
Suspending blocked processes. This frees up memory for adding more processes.
What two new states are needed to add suspending of blocked processes?
Blocked, suspend. Ready, suspend.