Jump to content

Blocking (computing)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by SmackBot (talk | contribs) at 18:59, 17 February 2009 (Date maintenance tags and general fixes). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Blocking occurs when a function does not return until it either completes its task or results in an error.

A process that is blocked is one that waits for the completion of some event, such as an I/O operation [1]

In a two state model (running and not-running), processes would go onto the (running) queue before being dispatched for execution. Without a blocked state, if priority is measured by length of time on the queue, blocked processes would be selected even though they have nothing to execute. This is undesirable since one may wish to maximize processor utilization. Hence the desire for a blocked queue(s)/state where blocked processes can be put until the event occurs.

After receiving the event, it moves from the blocked state into a different state, such as ready.

References

  • Stallings, William (2004). Operating Systems: Internals and Design Principles (5th ed.). Prentice Hall.