0% found this document useful (0 votes)
6 views

Process Management

microprocessor notes

Uploaded by

ballu2711nov
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)
6 views

Process Management

microprocessor notes

Uploaded by

ballu2711nov
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/ 3

Process Management

Program vs Process: A process is a program in execution. For example, when we write a program
in C or C++ and compile it, the compiler creates binary code. The original code and binary code
are both programs. When we actually run the binary code, it becomes a process.
A process is an 'active' entity as opposed to the program which is considered to be a 'passive'
entity.

Asmentioned earlier, a process is a program in execution. The status


Of the current activity of a process is represented by the value of the program
Counter and the contents of the processor’s registers. The memory layout of a
Process is typically divided into multiple sections, and is shown in Figure
These sections include:
• Text section—the executable code
• Data section—global variables
• Heap section—memory that is dynamically allocated during program run
Time
• Stack section—temporary data storage when invoking functions (such as
Function parameters, return addresses, and local variables)
Attributes or Characteristics of a Process: A process has the following attributes.

1. Process Id: A unique identifier assigned by the operating system


2. Process State: Can be ready, running, etc.
3. CPU registers: Like the Program Counter (CPU registers must be saved and
restored when a process is swapped in and out of CPU)
4. Accounts information: A mount of CPU used for process execution, time limits, execution ID etc
5. I/O status information: For example, devices allocated to the process,
open files, etc
6. CPU scheduling information: For example, Priority (Different processes
may have different priorities, for example
a shorter process assigned high priority
in the shortest job first scheduling)

All of the above attributes of a process are also known as the context of the process. Every
process has its own Process Control Block i.e each process will have a unique PCB. All of the
above attributes are part of the PCB.

NOTE : A process control block PCB) is a data structure used by computer operating systems to store all
the information about a process.

States of Process: A process is in one of the following states:

1. New: Newly Created Process (or) being-created process.

2. Ready: After creation process moves to Ready state, i.e. the


process is ready for execution.

3. Run: Currently running process in CPU (only one process at


a time can be under execution in a single processor).

4. Wait (or Block): When a process requests I/O access.

5. Complete (or Terminated): The process completed its execution.

6. Suspended Ready: When the ready queue becomes full, some processes
are moved to suspended ready state

7. Suspended Block: When waiting queue becomes full.

You might also like