Print Friendly and PDF
Process

A process is a prog ram in execution. The execution of a process must progress in a sequential fashion.
Definition of process is following .
A process is defined as an entity which represents the basic unit of work to be implemented in the system.


Components of process are following .
Component & Description

Object Program-
Code to be executed.

Data-Data to be used for executing the prog ram.
Resources-While executing the prog ram, it may require some resources.
Status-Verifies the status of the process execution.A process can run to completion only when all requested resources have been allocated to the process. Two or more processes could be executing the same program, each using their own data and resources.

Program--
A prog ram by it selfish not a process. It is a static entity made up of prog ram statement while process is a dynamic
entity. Prog ram contains the instructions to be executed by processor.
A prog ram takes a space at single place in main memory and continues to stay there. A prog ram does not perform any action by itself.
Process States--As a process executes, it changes state. The state of a process is defined as the current activity of the process.

Process can have one of the following five states at a time.


State & Description
New--The process is being created.

Ready--The process is waiting to be assigned to a processor. Ready processes are waiting to have the
processor allocated to them by the operating system so that they can run.
Running--Process instructions are being executed (i.e. The process that is currently being executed).
Waiting--The process is waiting for some event to occur (such as the completion of an I/O operation).
Terminated--The process has finished execution.





                                  process

The process has finished execution.
Process Control Block, PCB
Each process is represented in the operating system by a process control block (PCB) also called a task control block. PCB is the data structure used by the operating system. Operating system groups all information that
needs about particular process.
  PCB contains many pieces of information associated with a specific process which are described below.

Information & Description

Pointer--Pointer points to another process control block. Pointer is used for maintaining the scheduling list
Process State--Process state may be new, ready, running , waiting and so on.
Prog ram Counter Program Counter indicates the address of the next instruction to be executed for this process.
CPU registers--CPU registers include general purpose register, stack pointers, index registers and accumulators etc. number of register and type of register totally depends upon the computer architecture.
 Memory management information--This information may include the value of base and limit registers, the page tables, or the segment tables depending on the memory system used by the operating system. This information is useful for de-allocating the memory when the process terminates.
Accounting information--This information includes the amount of CPU and real time used, time limits, j ob or process numbers, account numbers etc.
Process control block includes CPU scheduling , I/O resource management, file management information etc..
The PCB serves as the repository for any information which can vary from process to process. Loader/linker
sets flag s and registers when a process is created. If that process get suspended, the contents of the registers are saved on a stack and the pointer to the particular stack frame is stored in the PCB. By this technique, the hardware state can be restored so that the process can be scheduled to run again.







zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: