Professional Documents
Culture Documents
Atomicity (Database Systems) - Wikipedia
Atomicity (Database Systems) - Wikipedia
systems)
Orthogonality
Atomicity does not behave completely
orthogonally with regard to the other ACID
properties of the transactions. For
example, isolation relies on atomicity to
roll back changes in the event of isolation
failures such as deadlock; consistency
also relies on rollback in the event of a
consistency-violation by an illegal
transaction. Finally, atomicity itself relies
on durability to ensure the atomicity of
transactions even in the face of external
failures.
Implementation
Typically, systems implement Atomicity by
providing some mechanism to indicate
which transactions have started and which
finished; or by keeping a copy of the data
before any changes occurred (read-copy-
update). Several filesystems have
developed methods for avoiding the need
to keep multiple copies of data, using
journaling (see journaling file system).
Databases usually implement this using
some form of logging/journaling to track
changes. The system synchronizes the
logs (often the metadata) as necessary
after changes have successfully taken
place. Afterwards, crash recovery ignores
incomplete entries. Although
implementations vary depending on
factors such as concurrency issues, the
principle of atomicity – i.e. complete
success or complete failure – remain.
Ultimately, any application-level
implementation relies on operating-system
functionality. At the file-system level,
POSIX-compliant systems provide system
calls such as open(2) and
flock(2) that allow applications to
atomically open or lock a file. At the
process level, POSIX Threads provide
adequate synchronization primitives.
See also
Atomic operation
Transaction processing
Long-running transaction
Read-copy-update
References
1. "atomic operation" .
http://www.webopedia.com/ : Webopedia.
Retrieved 2011-03-23. "An operation during
which a processor can simultaneously read
a location and write it in the same bus
operation. This prevents any other
processor or I/O device from writing or
reading memory until the operation is
complete."
2. Amsterdam, Jonathan. "Atomic File
Transactions, Part 1" . O'Reilly. Archived
from the original on 2016-03-03. Retrieved
2016-02-28.
Retrieved from
"https://en.wikipedia.org/w/index.php?
title=Atomicity_(database_systems)&oldid=880834
903"
Last edited 2 months ago by Nitpick…