Process States & Process Abstraction (Operating Systems)

  •  Process States :

  • As a process executes, it changes state. 

 

   A process may be in one of the following states: 

  • 1.  New. The process is being created. 

  • 2.  Running. Instructions are executing. 

  • 3.  Waiting. The process is waiting for some event to occur (such as an I/O completion (e.g. printf()/ scanf ()) or reception of a signal). 

  • 4.  Ready. The process is waiting to be assigned to a processor. 

  • 5.  Terminated. The process has finished execution. 

 

 

 

These process states are found all kind of systems. 

  • Certain operating systems also more finely delineate process states. 
  • It is important to realize that only one process can be running on any processor core at any instant. 
  • Many processes may be ready and waiting, however. 

  • Process Abstraction :

  • First obvious component of process is its memory. 
  • Instructions lie in memory 
  • the data that the running program reads and writes sits in memory as well 
  • The memory that the process can address (called its address space) is part of the process.  
  • Second important component of the process’s machine state are registers. 

    Many instructions explicitly read or update registers and thus  
  • clearly they are important to the execution of the process.  

  • Some particularly special registers are also included.  

  • For example, the program counter (PC) or Instruction Pointer (IP). 
  • Similarly a stack pointer and associated frame pointer are used to manage the stack for function parameters, local variables, and return addresses. 
  • Finally, programs often access persistent storage devices too.  
  • Such I/O information might include a list of the files the process 

Post a Comment

Previous Post Next Post