PROCESS CONCEPTS IN OPERATING SYSTEM


PROCESS CONCEPTS:

 

1.The Process:

  • is a program in execution.
  • It includes program counter,process stack,data section
  • program counter-which contains the address of the next instruction to be executed
  • process-stack-contains temporary data
  • data section-contains global variables.

2. Process State

  • The State of a process is defined by the current activity of that process.
  • Each Process may be in one of the following states
  • New-process is being created
  • Running-Instructions are being executed
  • Waiting-Process is waiting for some event to occur
  • Ready-Process is waiting to be assigned to a processor
  • Terminated-process has finished its execution.

Diagram of process state:



 

3.Process Control Block:


  • Each process is represented in the operating system by a process control block.
  • Also called as task control block
  • it contains pieces of information associated with a specific process
1.process state-new,running,waiting,halted...

2.program counter-which contains the address of the next instruction to be executed

3.CPU registers-can include accumulators,index register,stack pointer and general purpose registers,condition code information.

4.CPU scheduling information-includes process priority,pointers to scheduling queues and scheduling parameters

5.Memory Management information-includes about value of base and limit registers,page tables,segment tables

6.Accounting Information-includes the amount of CPU and real time used,time limits,account numbers,process numbers

7.I/O Status information-includes list of I/O devices allocated to the process,
list of open files

4.Threads


  • a process is a program that performs a single thread of execution
  • single thread of control allows the process to perform only one task at one time
  • modern OS have extended the process concept to allow a process to have multiple threads of execution.

No comments:

Post a Comment