page_title: Semaphore (programming)
hierarchical_section_title: Semaphore (programming)
caption_attribution_description: English: A British lower-quadrant semaphore stop signal with subsidiary arm below. Español: Señal inglesa de parada con semáforo de cuadrante inferior y auxiliar de brazo por debajo. Source: https://www.flickr.com/photos/frield/30608398/ by User: https://www.flickr.com/people/frield/ Uploaded by -=# Amos E Wolfe talk #=- 18:22, 4 July 2006 (UTC)
context_page_description: In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system. A semaphore is simply a variable. This variable is used to solve critical section problems and to achieve process synchronization in the multi processing environment. A trivial semaphore is a plain variable that is changed depending on programmer-defined conditions.
  A useful way to think of a semaphore as used in the real-world system is as a record of how many units of a particular resource are available, coupled with operations to adjust that record safely as units are acquired or become free, and, if necessary, wait until a unit of the resource becomes available.
  Semaphores are a useful tool in the prevention of race conditions; however, their use is by no means a guarantee that a program is free from these problems. Semaphores which allow an arbitrary resource count are called counting semaphores, while semaphores which are restricted to the values 0 and 1 are called binary semaphores and are used to implement locks.
context_section_description: In computer science, a semaphore is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system such as a multitasking operating system. A semaphore is simply a variable. This variable is used to solve critical section problems and to achieve process synchronization in the multi processing environment. A trivial semaphore is a plain variable that is changed (for example, incremented or decremented, or toggled) depending on programmer-defined conditions.
  A useful way to think of a semaphore as used in the real-world system is as a record of how many units of a particular resource are available, coupled with operations to adjust that record safely (i.e., to avoid race conditions) as units are acquired or become free, and, if necessary, wait until a unit of the resource becomes available. 
  Semaphores are a useful tool in the prevention of race conditions; however, their use is by no means a guarantee that a program is free from these problems. Semaphores which allow an arbitrary resource count are called counting semaphores, while semaphores which are restricted to the values 0 and 1 (or locked/unlocked, unavailable/available) are called binary semaphores and are used to implement locks.
  The semaphore concept was invented by Dutch computer scientist Edsger Dijkstra in 1962 or 1963, when Dijkstra and his team were developing an operating system for the  Electrologica X8. That system eventually became known as THE multiprogramming system.
caption: A semaphore (Dutch: seinpaal, the term used in Dijkstra's original description[1]).
exif: {"Image Make": "Canon", "Image Model": "Canon EOS 300D DIGITAL", "Image XResolution": "180", "Image YResolution": "180", "Image ResolutionUnit": "Pixels/Inch", "Image DateTime": "2005:08:02 09:28:02", "Image YCbCrPositioning": "Centered", "Image Tag 0x1001": "3072", "Image Tag 0x1002": "2048", "Image ExifOffset": "248", "Image CustomRendered": "Normal", "Image ExposureMode": "Auto Exposure", "Image WhiteBalance": "Auto", "Image SceneCaptureType": "Standard", "Thumbnail Compression": "JPEG (old-style)", "Thumbnail XResolution": "180", "Thumbnail YResolution": "180", "Thumbnail ResolutionUnit": "Pixels/Inch", "Thumbnail JPEGInterchangeFormat": "2452", "Thumbnail JPEGInterchangeFormatLength": "7176", "EXIF ExposureTime": "1/400", "EXIF FNumber": "13", "EXIF ISOSpeedRatings": "200", "EXIF ExifVersion": "0221", "EXIF DateTimeOriginal": "2005:08:02 09:28:02", "EXIF DateTimeDigitized": "2005:08:02 09:28:02", "EXIF ComponentsConfiguration": "YCbCr", "EXIF CompressedBitsPerPixel": "3", "EXIF ShutterSpeedValue": "141621/16384", "EXIF ApertureValue": "15157/2048", "EXIF ExposureBiasValue": "1/3", "EXIF MaxApertureValue": "4", "EXIF MeteringMode": "Pattern", "EXIF Flash": "Flash did not fire", "EXIF FocalLength": "109", "EXIF FlashPixVersion": "0100", "EXIF ColorSpace": "sRGB", "EXIF ExifImageWidth": "2048", "EXIF ExifImageLength": "3072", "EXIF FocalPlaneXResolution": "409600/119", "EXIF FocalPlaneYResolution": "768000/223", "EXIF FocalPlaneResolutionUnit": "2", "EXIF SensingMethod": "One-chip color area", "EXIF FileSource": "Digital Camera"}