Processes


Download 0.8 Mb.
bet2/9
Sana16.06.2023
Hajmi0.8 Mb.
#1496696
1   2   3   4   5   6   7   8   9
Bog'liq
os eng

PROCESSES


PROCESS STATE(5)
As a process executes, it changes state
new: The process is being created
running: Instructions are being executed
waiting: The process is waiting for some event to occur
ready: The process is waiting to be assigned to a processor
terminated: The process has finished execution

A Seven-State Process Model


But it is better to add two more states to keep track of those that are still blocked, and those which are no longer blocked because their event has occurred..

Some New state Transitions

  • Blocked --> Blocked Suspend
    • When all processes are blocked, the OS may remove a blocked process to bring an unblocked process into memory
      • The “swap out” frees up memory to allow this to happen
  • Blocked Suspend --> Ready Suspend
    • When the event for which process has been waiting occurs
  • Ready Suspend --> Ready
    • When there are no ready processes in main memory
    • Normally, this transition is paired with Blocked --> Blocked suspend for another process (a “swap”)
  • Ready--> Ready Suspend
  • New--> Ready Suspend
    • Probably the preferred way to introduce new processes

PROCESSES


PROCESS CONTROL BLOCK:
Each process is represented in the O.S. by a Process Control Block.
  • Program counter
  • CPU registers
  • CPU scheduling information
  • Memory-management information
  • Accounting information
  • I/O status information.

Process State

A PCB contains the following Information:

A PCB contains the following Information:


Download 0.8 Mb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8   9




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling