Twitter Delicious Facebook Digg Stumbleupon Favorites More

Saturday 3 September 2011

Process in Operating System

                PROCESS
Process: A process is a program in execution. This is the most general definition we all studied, suppose that a car is going through a road, then the movement of car is a process i.e something which is happening like a running child, soccer which is playing by players, a person is going to appear for the examination etc.. these are the examples of real life process.
                  But from the above statement we can conclude that a process is nothing but happening of a situation, just as we said A process is a program in execution, it mean we are just feeling the thing which is happening, And if it is then how an operating system defines a process how OS determines that there is something which OS can tell as a process, so we must know what are the components of a process.

A Process can be defined as.

        Stack + process control block(PCB) + Source Code(text section)

we can represent process pictorially as

This is a pictorial representation of process in memory.
One thing we should keep in mind that a program is a passive entity, i.e an executable file which is kept in memory is a passive entity where as a process is an active entity with the information of set of associated resources.

Life Cycle of a Process:
An important part of a process is PCB (process control block): 
Program Counter(PC):  This indicates address of the next instruction which is to be executed.
Process State: It represents the state of process whether it is ready, running, waiting or terminated.
Process Number: OS provides the process number to every process, in some operating system high number means high priority and some OS treats low number as high priority. It is known as PID.
Registers: These registers contains the information about Stack pointers accumulator and general purpose register.




0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates