|
In computer science, atomicity implies indivisibility and irreducibility, so an atomic operation must appear to be performed entirely or not at all. Note that this is not actually the case; even a simple add operation in code requires perhaps three to five register operations. The operating system and computer architecture, however, can ensure that nothing interrupts that sequence of register operations, resulting in the appearance of atomicity. Wikibooks Wikiversity has more about this subject: School of Computer Science Open Directory Project: Computer Science Downloadable Science and Computer Science books Collection of Computer Science Bibliographies Belief that title science in computer science is inappropriate Categories: Wikipedia articles needing priority cleanup | Computer science ...
Atomicity can prevent read-write and write-write conflicts. Suppose one thread of a program attempts to write the value "updated" to a memory location with the string "initial", while another thread simultaneously attempts to read it. If string read and write operations are not both atomic, the second thread, which should read either "initial" or "updated" may read, for example, the string "updaial", where the new string has only been partially written over the old. Similarly, suppose two threads simultaneously attempt to write to the same memory space containing an integer value. If the integer write operation is non-atomic and the threads attempt to write 7 and 0, the bits may be mangled and a 5 may be written instead. A thread in computer science is short for a thread of execution or a sequence of instructions. ...
Many processors, especially 32-bit ones with 64-bit floating point support, provide some read and write operations that are not atomic. Most processors provide an operation that can simultaneously read a location and update it in the same bus operation. This prevents any other processor or input-output device from writing or reading memory until the operation is complete. A CPU The exact term processor is a sub-system of a data processing system which processes received information after it has been encoded into data by the input sub-system. ...
32-bit is a term applied to processors, and computer architectures which manipulate the address and data in 32-bit chunks. ...
In computing, a 64-bit component is one in which data are processed or stored in 64-bit units (words). ...
A floating-point number is a digital representation for a number in a certain subset of the rational numbers, and is often used to approximate an arbitrary real number on a computer. ...
This article is about the computer interface. ...
Examples of atomic operations
- In database systems, "atomicity" is one of the ACID properties for transactions. Either all steps in a transaction succeed, or the entire transaction is rolled back; partial completion should never be observed.
- In concurrent programming, an "atomic" operation has the additional property that none of its effects are visible until after it completes. That is, that there are no intermediate states visible to other threads. In database systems, this property is classified separately as "isolation". This definition of atomic is equivalent to linearizability.
- In operating systems, an "atomic" operation is an operation that is not (or cannot be) interrupted once it has begun. For example, basic machine instructions like add or store are usually guaranteed by the hardware to be atomic, and some platforms provide a pair of operations (load-link/store-conditional) that only have an effect if they occur atomically. This property can be used to implement locks, a vital mechanism for multithreaded programming.
A database management system (DBMS) is a computer program (or more typically, a suite of them) designed to manage a database, a large set of structured data, and run operations on the data requested by numerous users. ...
In databases, ACID stands for Atomicity, Consistency, Isolation, and Durability. ...
Parallel programming (also concurrent programming), is a computer programming technique that provides for the execution of operations concurrently, either within a single computer, or across a number of systems. ...
Many programming languages, operating systems, and other software development environments support what are called threads of execution. ...
In database systems, isolation is a property that the changes made by an operation are not visible to other simultaneous operations on the system until its completion. ...
Linearizability in computer science is the same as sequential consistency but in addition every operation is timestamped. ...
In computing, an operating system (OS) is the system software responsible for the direct control and management of hardware and basic system operations. ...
A system of codes directly understandable by a computers CPU is termed this CPUs native or machine language. ...
In computer science, load-link (LL, also known as load-linked or load and reserve) and store-conditional (SC) are a pair of instructions that together implement a lock-free atomic read-modify-write operation. ...
In software engineering, a lock is a mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution. ...
Many programming languages, operating systems, and other software development environments support what are called threads of execution. ...
Other meanings There are several other unrelated meanings of the word atomic in computing: - In symbolic languages, like Lisp, S-expressions are made of atoms and lists of S-expressions. S-expressions are then "atomic" if they are atoms, for example, numerics or symbols.
- In the context of component-based paradigms, "atomicity" is an element of orthogonality. Possibly guaranteeing hermetic interfaces among components of a component-based system. Malfunctions in one component would result in side-effects in another component . In addition atomicity guarantees that services provided by a component are either offered as a whole, or not at all. Systems built according to this design principle localise the side-effects of changes within the package.
- In other areas of computer science, "atomic" can mean the smallest addressable unit of memory. The byte is typically atomic in this sense.
Lisp is a reflective, multi-paradigm programming language with a long history. ...
An S-expression (S stands for symbolic) is a convention for representing data or an expression in a computer program in a text form. ...
A component-based paradigm is a form of distributed control production system which utilises a CAN or LAN to link autonomous mechatronic modules. ...
In mathematics, orthogonal is synonymous with perpendicular when used as a simple adjective that is not part of any longer phrase with a standard definition. ...
A byte is commonly used as a unit of storage measurement in computers, regardless of the type of data being stored. ...
See also - Compare-and-swap
- Test-and-set
|