What is atomicity in the context of filesystems?

545 views Asked by At

According to webopedia it is when a processor both reads and writes to the bus...excluding other processors from accessing it.

In databases, it means that a set of operations either all occur or none do, according to wikipedia

In concurrent programming, it means that a set of operations occur instantaneously as seen by the system wikipedia

However I need to know what atomicity refers to in in the context of file systems, particularly Google File System.

Seems to be an over-used word which people use b.c. it sounds cool..but is there a more academic definition in regards to file systems?

It seems atomic refers to not breaking something up i.e. the atom...in a general case. I keep hearing the term atomic reads and atomic writes being used for the Google File System.

My guess would mean that it happens completely or not at all and in one "step". Referring to the unity of time (appears instantaneous) and composition (all parts are completed).

Does this sound correct?

3

There are 3 answers

0
Vaughn Cato On BEST ANSWER

That's right. It is the basic property that even though some operation may consist of a smaller set of steps, you can never observe it in a state where some but not all of those steps have taken place.

0
Ernesto Campohermoso On

From Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services written by Seth Gilbert and Nancy Lynch:

Atomic, or linearizable, consistency is the condition expected by most web services today.3 Under this consistency guarantee, there must exist a total order on all operations such that each operation looks as if it were completed at a single instant. This is equivalent o requiring requests of the distributed shared memory to act as if they were executing on a single node, responding to operations one at a time. One important property of an atomic read/write shared memory is that any read operation that begins after a write operation completes must return that value, or the result of a later write operation.

0
David Titarenco On

Your definition seems pretty sound. There's a great MIT talk here about atomicity with regards to computer software and hardware. A small gripe that I have with your definition is that you make it seem as if something "atomic" occurs in one step. This is both right and wrong.

As you'll see in the talk, atomicity is defined by:

Recoverable + Isolated = Atomic
A sequence of composite steps but whose invoker cannot discover is composite.

The main idea here is that something "atomic" may be separated in discrete steps (in implementation) but the invoker will never know this. Even an atomic write has multiple steps, for example.