View
214
Download
0
Tags:
Embed Size (px)
Citation preview
1
What is a Process ?
•The activity of program execution.
•Also called a task or job
•Has associated with it:CodeDataResourcesA State
•An executing set of machine instructions
2
When is a Process Created?
Principal events that cause process creation
1. System initialization
2. Execution of a process creation system
3. User request to create a new process
4. Initiation of a batch job
3
The resources ‘owned’ by the process include:the (virtual) Address Space to hold the process image
and may include control of other resources such as
Main memoryI/O channelsI/O devicesFiles
4
What are the Operating System Responsibilities for Processes?
• Interleave the execution of several processes to maximize processor utilization while providing reasonable response time
• Allocate resources to processes
• Support interprocess communication and user creation of processes
5
Conceptual model of 4 independent, sequential processes
• Multiprogramming of four programs
• Only one program active at any instant
13
Process Termination Conditions
1. Normal exit (voluntary) - job completed.
2. Error exit (voluntary) - occurs within execution of process such as division by zero but process may be just signaled and not terminated.
3. Fatal error (involuntary) - impossible for process to continue. Ex. Cc file.c process called but file.c does not exist.
4. Killed by another process (involuntary)
14
Process Hierarchies
• Parent creates a child process, child processes can create its own process
• Forms a hierarchy– UNIX calls this a "process group”– when a signal is sent from the keyboard, each process in the
group receives the signal.– all processes belong to a single tree with the special process ‘init’
at the root. ‘init’ is in the boot.
• Windows has no concept of process hierarchy– all processes are created equal