Download What is a Process?

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
What is a Process ?
•The activity of program execution.
•Also called a task or job
•An executing set of machine instructions
•Has associated with it:
Code
Data
Resources
A State
1
When is a Process Created?
Principal events that cause process creation
1. System initialization
• Execution of a process creation system
1. User request to create a new process
2. Initiation of a batch job
2
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 memory
I/O channels
I/O devices
Files
3
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
4
Conceptual model of 4 independent,
sequential processes
• Multiprogramming of four programs
• Only one program active at any instant
5
OS Handling Processes in a Multiprogrammed System
6
7
8
Process States
and Transitions between States
9
10
Fields of a Process Control Block
or Table
11
12
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)
13
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
14