How interrupts are handled by CPU?

Interrupts are hardware signals that remain pending until the CPU reaches a safe boundary (complete 1 instruction) and acknowledges them.

  • No queue to store interrupt like message.
  • No constant checking by CPU.
  • No mid-instruction stopping of CPU execution.

Analogy :

The chef(CPU) does not constantly look outside.
Someone rings the bell.
The bell stays ringing.
After finishing the current step, the chef responds.

What is Cooperating Process?

A cooperating process is one that can affect or be affected by other processes executing in the system. Cooperating processes can either directly share a logical address space (that is, both code and data) or be allowed to share data only through shared memory or message passing.

Why we need Process Synchronization?

When cooperating processes execute concurrently or in parallel, the CPU may be preempted due to interrupts and execution may switch between processes. If these processes access and modify shared data without coordination, the interleaving of their operations can lead to inconsistent or incorrect results (race conditions). Process synchronization is required to ensure correct and consistent access to shared resources.


start :)