Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Blocking (computing)

From Wikipedia, the free encyclopedia
State for a computing process
For the memory-access optimization technique, seeloop blocking.

Incomputing, aprocess that isblocked is waiting for someevent, such as aresource becoming available or the completion of anI/O operation.[1]Once the event occurs for which the process is waiting ("is blocked on"), the process is advanced fromblockedstate to an imminent one, such asrunnable.

In amultitasking computer system, individualtasks, orthreads of execution, must share the resources of the system.Shared resources include: the CPU, network and network interfaces, memory and disk.

When one task is using a resource, it is generally not possible, or desirable, for another task to access it. The techniques ofmutual exclusion are used to prevent this concurrent use. When the other task is blocked, it is unable to execute until the first task has finished using the shared resource.

Programming languages andscheduling algorithms are designed to minimize the over-all effect of blocking. A process that blocks may prevent local work-tasks from progressing. In this case "blocking" often is seen as not wanted.[2] However, such work-tasks may instead have been assigned to independent processes, where halting one has little to no effect on the others, since scheduling will continue. An example is "blocking on achannel" where passively waiting for the other part (i.e. nopolling orspin loop) is part of the semantics of channels.[3] Correctly engineered, any of these may be used to implementreactive systems.[clarification needed]

Deadlock means that processes pathologically wait for each other in a circle. As such it is not directly associated with blocking.

See also

[edit]

References

[edit]
  1. ^Stallings, William (2004).Operating Systems: Internals and Design Principles (5th ed.). Prentice Hall.ISBN 978-0131479548.
  2. ^C++ and Beyond 2012: Herb Sutter - C++ Concurrency
  3. ^Rob Pike (2012-07-02).Go Concurrency Patterns.Google I/O 2012. Google for Developers.
Stub icon

Thisoperating-system-related article is astub. You can help Wikipedia byadding missing information.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Blocking_(computing)&oldid=1330516487"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp