Information Technology Reference
In-Depth Information
providing the following ACID properties:
Atomicity. Updates are \all or nothing." If the transaction commits, all
updates in the transaction take effect. If the transaction rolls back, then
none of the updates in the transaction have any effect.
In the website update example above, doing the updates within a trans-
action guarantees that each of the update is only stored or readable if all
of the updates are stored and readable.
Consistency. The transaction moves the system from one legal state to
another. A sytem's invariants on its state can be assumed to hold at the
start of a transaction and must hold when the transaction commits.
In the example above, by using a transaction we can maintain the invariant
that every link from one document to another on the server references a
valid file.
Isolation. Each transaction appears to execute on its own, and is not
affected by other in-progress transactions. Even if multiple transactions
execute concurrently, for each pair of transactions T and T 0 , it either
appears that T executed entirely before T 0 or vice versa.
By executing the web site update in a transaction, we guarantee that each
transaction to read from the web site is applied either against the old set
of web pages or the new set, not some mix of the two.
Of course, if each individual read of an object is in its own transaction,
then a series of reads to assemble a web page and its included elements
could see the old web page and a mix of old and new elements. If web
protocols were changed to allow a browser to fetch a page and its elements
in a single transaction, then we could guarantee that the user would see
either the old page and elements or the new ones.
Durability. A committed transaction's changes to state must survive
crashes. Once a transaction is committed, the only way to change the
state it produces is with another transaction.
In our web update example, the system must not return from the commit-
Transaction() call until all of the transactions updates have been savely
stored in persistent storage.
Transactions v. critical sections The ACID properties are closely related
to the properties of critical sections. Critical sections provide a way to update
state that is atomic, consistent, and isolated but not durable. Adding the
durability requirement significantly changes how we implement atomic updates.
 
Search WWH ::




Custom Search