Showing posts with label Process states. Show all posts
Showing posts with label Process states. Show all posts

Monday, March 23

Process -In Detail

So we had a brief introduction of what is meant by a program process and thread. Now we can discuss about process in detail. In our computer we have programs like MS Word Google Chrome etc stored in our secondary Storage,  now when we run a program the program is loaded into the main memory which is our RAM now we call it as a Process
A process mimics a processor in properties and holds a set of registers ,process status, program counter,  stack and the code for the corresponding process.Thus a process inherit all the properties of the CPU so we can consider a process as a virtual processor awaiting its turn to have its properties switched into the physical processor.

When the process gets its turn its registers and program counter becomes mapped into physical registers of the CPU. The memory occupied by the process is segregated into three regions..

  • Stack Memory- to hold temporary data such as variables locals to the process.
  • Data Memory - to hold all global data for the process.
  • Code Memory- contains the program code corresponding to the process.

When a process starts, it is assigned memory and resources.