Atomic order

from Wikipedia, the free encyclopedia

In computer science , an atomic command or sequence of commands denotes a command or commands that cannot be interrupted by other commands.

In the case of processors that support interrupts , it must be possible to suppress interrupts while the atomic command sequence is being executed. This is necessary , for example, for the implementation of semaphores . Changing the semaphore variables must not be interrupted and is carried out as an atomic command sequence. Interrupting this code can result in multiple allocation of a resource and thus possibly an error.

In general, the definition of atomic commands is always important when processes are to be parallelized. For example, the Fortress programming language, which is strongly geared towards parallelization, offers the option of marking instruction blocks as atomic in order to avoid conflicts.

See also