Professional Documents
Culture Documents
Management
Learning Objectives:
What is a Process?
• A process is the instance of computer program that is being
executed.
• It performs all task that is present in the program.
• When a program is running, it is called as process.
COMPILER
Hello.class Secondary
(PRPGRAM) Memory
Hello.java
Secondary
Memory
Main
CPU Memory
Process management
❑ It is an important part of the operating system. It
allows you to control the way your computer runs by
managing the currently active processes. This includes
ending processes that are no longer needed, setting
process priorities, and more.
❑ There are several processes in the process management
system that use the same shared resources. As a
result, the operating system must efficiently and
effectively manage all activities and structures.
Process management
❑To preserve consistency, some elements may need to be executed
by one operation at a time. Otherwise, the system might be
inconsistent and deadlock may develop.
In terms of Process Management, the operating system is in
charge of the following task.
• Process and schedule on CPU.
• Both user and system processes can be created and
deleted.
• Process are suspended and resumed.
• Providing synchronization method for processes.
• Providing communication mechanism for processes.
Process Structure
When a program becomes a process, it is structured. The
structure can be divided into four parts and theses are:
STACK
HEAP
TEXT
CODE
• CODE – stores a code which will be executed.
• DATA – this consist Static Variable and Global Variable.
o Static Variable is the variable which is allocated statically.
– that is what we defined as variable while writing the
program.
– they remain until complete run of program.
– Value assigned to static variable is preserved.
o Global Variable has global scope.
– It can be accessed anywhere in the program.
• HEAP – free space available in memory.
• STACK – used for local variables which we normally declare in a
program. It also used to store method of function parameters or
return address.
The following are the
attributes of PCB.
Program Counter
The operating system control’s a process
by a block called Process Control Block. For Process State
• Priority – Every process has its own priority. The process with
the highest priority among the processes gets the CPU first. This
is also stored on the process control block.
• General Purpose Registers – Every process has its own set of
registers which are used to hold the data which is generated
during the execution of the process.
• I/O devices – this are the input and output devices need for the
execution of the process.