Bolt variable

from Wikipedia, the free encyclopedia

Bolt variables are used in computer science to coordinate competing access to resources . The difference to the frequently used semaphore is that the Bolt variable can have three instead of two states and thus enables a more flexible reservation of resources, for example by implementing a read-write lock . The name is from the word bolt (bolt) is derived.

description

Bolt variables are used in programming for process synchronization , i.e. to solve tasks in which the parallel execution of several processes or threads requires the execution to be timed. They describe the occupancy status of a device. A distinction is made between three states:

  • not used (A)
  • occupied (B)
  • Assignment not possible (C)

Rules for occupancy:

  • A change in state B can be made when the bolt variable is in state A. State B corresponds to an exclusive access or a write lock .
  • State C can be entered successfully if the variable is in state A or C. This means that several processes can use the reserved resource in parallel without being disturbed by potentially write accesses (state B). This enables a read lock to be implemented.

practice

In mainframe operating systems such as For example, z / OS from IBM, these services are available under different names. There the term enqueue / dequeue is used with the 'shared' or 'exclusive' option.

Web links

HTW Dresden Lecture Operating Systems II Topic 2: Synchronization. (PDF; 193 kB) Retrieved on September 2, 2011 (esp.p. 28f).

Individual evidence

  1. RTOS-UH An overview on page 19 (PDF; 411 kB)
  2. Bodo Heimann, Wilfried Gerth, Karl Popp: Mechatronik: Component Method Examples . Hanser Verlag, 2006, ISBN 3-446-40599-2 , p. 167 f .