0% found this document useful (0 votes)
1 views22 pages

1 Process Concept

Operating system

Uploaded by

sharmafamily029
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views22 pages

1 Process Concept

Operating system

Uploaded by

sharmafamily029
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Process Concept

Dr. . Shashi Kant Gupta


Professor , Department of CSA
Outlines
• Prerequisite of topic
• Problem Objective
• Program and Process
• Parts of Process
• Comparison between program and process
• Process States
• Process Control Block (PCB)
• Assignment
• Learning Outcomes
• References

1
Prerequisite of Topic

• Basic Concept of Operating System


• Services of operating System
• Memory and its types
Problem Objective

• Understand about the Programs and Process


• Components of Process
• Difference between program and process
Program
• Aprogram is an executable file which contains a certain set of
instructions written to complete the specific job on your computer.

• Programs are never stored on the primary memory in your computer.

• Instead, they are stored on a disk or secondary memory on your PC or


laptop.

• They are read from the primary memory and executed by the kernel.

<SELO: 5,8,9> Reference No.: R1, R2


Features of Program

• Aprogram is a passive entity.

• Various processes may be related to the same program.

• A user may run multiple programs where the operating systems


simplify its internal programmed activities like memory management.

• The program can't perform any action without a run. It needs to be


executed to realize the steps mentioned in it.

<SELO: 5,8,9> Reference No.: R1, R2


Process

• Aprocess is an execution of any specific program.

• It is considered an active entity that actions the purpose of the


application.

• Multiple processes may be related to the same program.

<SELO: 5,8,9> Reference No.: R1, R2


Features of Process

• Aprocess has a very limited lifespan

• They also generate one or more child processes, and they die like a
human being.

• Process has information like who is a parent when it is created etc..

• Processes are allocated system resources like file descriptors and


network ports.

<SELO: 5,8,9> Reference No.: R1, R2


Process Parts

• Process memory is divided into four sections for efficient working :

 Text section

 Data section

 Heap

 Stack

<SELO: 5,8,9> Reference No.: R1, R2


Comparison Between Program and Process

Parameter Process Program


Definition Executing part of a program Group of instructions
Nature Active Passive
The program only
Resource The resource requirement is
needs memory for
management quite high in case of a process.
storage.
Processes have considerable No significant
Overheads
overhead. overhead cost.

<SELO: 5,8,9> Reference No.: R1, R2


Comparison Between Program and Process

Parameter Process Program


shorter and very limited
Lifespan longer lifespan
lifespan
New processes require No such duplication is
Creation
duplication of the parent needed.
Process holds resources
The program is stored on
Required Process like CPU, memory address,
disk in some file
disk
Entity type dynamic or active entity. passive or static entity.
A process contains many needs memory space on
Contain
resources. disk

<SELO: 5,8,9>
Process States
• Processes in the operating system can be in any of the following
states:
• NEW- The process is being created.
• READY- The process is waiting to be assigned to a processor.
• RUNNING- Instructions are being executed.
• WAITING- The process is waiting for some event to occur(such as an
I/O completion or reception of a signal).
• TERMINATED- The process has finished execution.

<SELO: 5,8,9> Reference No.: R1, R2


Process State Diagram

<SELO: 5,8,9> Reference No.: R1, R2


Process Control Block

• Process Control Block is a data structure that contains information of


the process related to it.
• The process control block is also known as a task control block, entry
of the process table, etc.
• It is very important for process management as the data structuring
for processes is done in terms of the PCB. It also defines the current
state of the operating system.
• It is also known as a process descriptor.

<SELO: 5,8,9> Reference No.: R1, R2


Process Control Block

• There is a Process Control Block for each process, enclosing all the
information about the process. It is a data structure, which contains the
following:

<SELO: 5,8,9> Reference No.: R1, R2


Process Control Block

• Process State: It can be running, waiting etc.


• Process ID and the parent process ID.
• CPU registers and Program Counter. Program Counter holds the
address of the next instruction to be executed for that process.
• CPU Scheduling information: Such as priority information and
pointers to scheduling queues.
• Memory Management information: For example, page tables or
segment tables.
• Accounting information: The User and kernel CPU time consumed,
account numbers, limits, etc.
• I/O Status information: Devices allocated, open file tables, etc.

Reference No.: R1, R2

<SELO: 5,8,9>
Location of the Process Control Block

• The process control block is kept in a memory area that is protected from
the normal user access.

• This is done because it contains important process information.

• Some of the operating systems place the PCB at the beginning of the
kernel stack for the process as it is a safe location.

<SELO: 5,8,9> Reference No.: R1, R2


Learning Outcomes

After this Lecture students are able to:

• difference between program and process


• basics of process
• components of process

<SELO: 5,8,9> Reference No.: R1, R2


Assignment
Tabulate any 10 foreground and any 10 background processes and write
their functions also.
References
1. A. Silberschatz, P. B. Galvin, G. Gagne; Operating System
Concepts; Wiley Publishing.
2. A. S. Tanenbaum; Modern Operating System; PHI Publication.
SELO

5. Design Thinking ability


8.Ability to understand subject related concepts clearly along
with contemporary issues.
9.Application of concepts of topic and its technological
applications

You might also like