Atomicity (Data-processing)
In Data-processing, an atomic operation is an operation which is not interruptible. That means that the operation is carried out in only once and that no other Thread will have access to the resource Processeur during all the duration of the operation.
In general, the instructions Assembleur can be regarded as atomic.
By extension, it is possible to say that a Section criticizes protected by a mutual exclusion is also atomic.
Example of special instruction having to be atomic
The instruction Test And Set is a concrete example of instruction having to be atomic. This instruction works on a Boolean variable (noted here V). The operation of this instruction is the following: TEST_AND_SET (V): C = not V V = True to turn over CSuch an instruction (if it is atomic) makes it possible to implement a algorithm of mutual exclusion by Attente activates. Indeed, it is possible to define the protocols of entry and exit following:
The protocol of entry buckles as much as the variable Verrou is true. If this one is false, then TEST_AND_SET turns over Vrai and modifies this last variable. The protocol of exit fixes simply the variable Verrou at forgery what authorizes the entry of a task in the Section criticizes.
| Random links: | Glossary of the Old Mode | Soap-in-Perthois | Roberta Vinci | Simon Kirke | Martha Wayne | Stan_Bingham |