Subscribe to our RSS Feeds

What is Process?

7 Comments »

What is Process?

A process is just an executing program. In other words, a program in execution is called a process. The term process was first used by the designers of multics system in 1960s. since that time a process was considered as an activity to perform a task. A process also includes:
  • Current activity, which is represented by current values of program counter, CPU registers and variables.
  • Process stack, which contains temporary data such as parameters of procedure, return address and local variables.
  • Heap, which is memory that is dynamically allocated during program execution time.
  • Operating resources allocated to it.
It must be noted that a program is not a process itself. It is static entity stored in a file on the disk. A process is an active entity, with a program counter specifying the next instruction to execute and a set of associated resources. A program becomes a process, when it is loaded into the memory for execution.
There may be multiple process for the same program. The process are controlled and scheduled by the operating system conceptually. Each process has its own virtual cpu, but in reality a single CPU switches from process to process in a cycle. This switching form process to process is called multiprogramming.
Process States:
In computer system, a process changes states during execution. Various events can cause a process to change states. A process exists in one of the five states. These are
  • New: this star of process indicated that the process has just been created.
  • Blocked: in this state the process is blocked and is waiting for some event to occur before it can continue executing.
  • Ready: in this state the process is not allocated to the processor for running but it is ready to run.
  • Running: the process is executing on processor, if a system has one CPU then only one process can be in the running state.
  • Terminated: the process has finished its execution on the cpu but the record of the process is still maintained by the operating system.
Transition between process states:
Five transitions are possible among these four states as shown below
  • Running- Blocked: This transition occurs, when a running process must executes a system call such as for performing I/O operation, communicating with other processes etc. in such cases, continuing execution of the process must be blocked.
  • Running- Ready: This transition occurs when the scheduler decides that the running process has used its time slice ( time allocated the process) it moves the process form running state to ready stare and runs another process.
  • Ready- Running transition: This transition occurs when CPU scheduler selects a process for running from the ready queue and sent to the CPU for execution.
  • Blocked- Ready: This transition occurs when a process is moved form blocked state to ready state. If no other process is running at that instant, transition 3 will be triggered immediately.
  • Running- Terminated: This transition occurs, when a running process is terminated. A process may be terminated by either performing some illegal action or by completing the execution of its code.
2:28 PM