Date post: | 19-Jun-2015 |
Category: |
Education |
Upload: | myrajendra |
View: | 535 times |
Download: | 0 times |
1
Understand Process Management Process definition, Process state
diagram , Sequence of process
HOME PREVIOUS TOPIC NEXTPREVIOUS QUESTION PAPERS FOR OSCPP TUTORIALS
Recap
In the last class, you have learnt about
• Definition of system call
• Types of system calls
• Single user operating system structure
• Multiuser operating system structure
2
3
Objectives
On completion of this period, you would be able
to know
• Definition of a Process
• Process State Diagram
• Sequence of Process
4
Process
• A Process is a program in execution
• A process is more than a program code, some times also
known as text section
• A process includes the current activity, as represented
by the program counter and the contents of the
processors registers
5
• A process also includes the process stack, which
contains temporary data & data section which
contains global variables
• Program by itself is not a Process
• Program is a Passive Entity
• Ex. A file stored on a disk
Process
Process
• Process is an active entity
• Ex. Program counter specifies the next
instruction to execute and set of associated
resources
• Process is known as a task or a job
• The process can be sub divided into sub processes
6
Process
• Two processes may be associated with the same
program, but they are considered as two separate
execution sequences
• Example:
– Several users may be running different copies
of mail program
– Same user may invoke many copies of editor
program7
8
Process States
• Process changes its state while it executes
• The state of a process is defined in part by the current activity of a process
• Each process may be in one of the following states
• New
• Ready
• Running
• Waiting
• Terminated
9
Process State Diagram
NEW
READY
WAITING
RUNNING
TERMINATED
Admitted
Interrupt
Scheduler dispatch
I/O or Event wait
Exit
I/O or Event completion
Figure 4.1 Diagram of Process State
12
• Programs from the secondary storage device are moved to the job queue for the execution
• Creating of a Process is called the NEW state, after creation the process enters the job queue
• Creation of a new process results in
• A name is given to the process
• Memory space is provided in the job queue
• A Process Control Block is created
• Its initial priority is assigned in the job queue
• Initial resources are allocated to it
Sequence of Process
13
•The New process which is in job queue must be
admitted to the ready queue
• Process waiting in the ready queue must be assigned
to a processor this state is called READY state
•The scheduler dispatch will assign the process to the
processor, and the instructions in the process are being
executed this state is called RUNNING state
Sequence of Process ..
14
Sequence of Process
•The running process enters the Waiting state when it
requires an I/O or an event wait
•After completion of a I/O or an event the process in the
waiting state enters the READY state
•The running process enters the ready state when a
process is interrupted by an interrupt
15
Sequence of Process
•The running process exits from a processor after
completion of its execution, this state is called
TERMINATED state
•A terminated process releases all its resources to
the resources queue and memory space to memory
pool
16
Summary
In this class, you have learnt about
• Definition of a Process• Process State Diagram• Sequence of Process
Frequently Asked Questions
1. Define a process
2. Write a brief note on a process
3. Draw process state diagram
4. Explain various process states
5. Explain the sequence of process
18
Other subject materials
• Web designing
• Micro processors
• C++ tutorials
• java
home
9CM402.11 19
Quiz
1. A process goes to wait state when it finishes execution
a) True
b) False
2. A process in the ready state is waiting to be assigned to a processor
a)True
b)False
9CM402.11 20
Quiz
3. The running process may be interrupted by an interrupt and the
process is sent back to READY state
a) True
b) False
4. Creation of a new process results in
a) A name is given to the process
b) Memory space is provided in the job queue
c) Both
d) None
9CM402.11 21
Quiz5. Process is an active entity
a) YES
b) NO
6. Process can be divided into sub processes
a) YES
b) NO
22
Quiz7. Program is an active entity
a) YES
b) NO
8. A process includes a process stack and data section
a) YES
b) NO
23
Other subject materials
• Web designing
• Micro processors
• C++ tutorials
• java
home