Process

23 Jun 2022 . os .

  • Text area: stores code executed by the processor.
  • Data area: stores variables and dynamically allocated memory used during process execution.
  • Stack area: stores instructions and local variables called by active procedures.

State

  • Execution state -> Blocking state

    It is often caused by waiting for resource allocation such as main memory, or waiting for manual intervention.

  • Blocking state -> Ready state

    The waiting condition has been met, and it only needs to be assigned to the processor to run.

  • Execution state -> Ready state

    The running process is not for its own reasons, but for external reasons to give up the processor. For example, time slices are used up, or there are higher-priority processes to seize the processor.

  • Ready state -> Execution state

    The system selects a process in the ready queue to occupy the processor.

Context Switch

A process of saving the context of one process and loading the context of another process. Switch a process from one state to another i.e., running ⇒ ready.

Zombie Process

Referred to as a defunct process:

  • A process that is terminated or completed
  • But the whole process control block is not cleaned up from the main memory
  • It still has an entry in the process table to report to its parent process
  • It does not consume any of the resources and is dead, but it still exists and shows that resources are held by process and are not free.

Cascading Termination

A process termination in which if the parent process is exiting or terminating, then the children process will also get terminated.