Chapter 3 (Process Description and Control) Flashcards
What are the two states of a process?
Running and not running
What does the OS do when a new process is created?
Builds the data structures needed and allocates space in main memory
What are the four primary reasons a process is created?
New batch job submitted
Interactive logon occurred
OS creates one for some service
Spawning an existing process
T/F The two state model is adequate
F
What is a problem with the two state model?
Requires the dispatcher to search the not-running queue, looking for a process that is not blocked
What states are in the five state model?
Running Ready Blocked New Exit
Null -> new
Process creation
New -> Ready
OS is ready for a new process
Ready -> Running
Based on scheduling algorithm
Running -> Exit
On termination
Running -> Blocked
Service call, I/O request
Blocked -> Ready
Waited event occurs
Ready -> Exit
Terminated due to parent
Blocked -> Exit
Terminated due to parent
What are the two suspend states?
Blocked/Suspend
Ready/Suspend
What is the blocked/suspend state?
Suspended and awaiting an event
What is the ready/suspend state?
Suspended and ready to run
Blocked -> Blocked/Suspend
To free memory
Blocked/Suspend -> Ready/Suspend
If event occurs while blocked/suspend
Ready/Suspend -> Ready
If no ready processes, or if suspended process is higher priority than ready queue processes
Ready -> Ready/Suspend
If need to free up memory and there are no blocked processes, or a ready process if of lower priority than the blocked processes
new -> Ready/Suspend and New -> Ready
Could add new process to either queue. Might add to the ready/suspend queue if no room in memory or if desired to let OS setup the new process before loading it
Blocked/Suspend -> Blocked
If suspended blocked process has higher priority than any suspended ready process
Running -> Ready/Suspend
Rather than returning to the ready queue, could be sent to the ready/suspend to free up memory for some higher priority process