Multi-Version Concurrency Control

Multi-Version Concurrency Control (MVCC) is a basic technique for elimination of starvation. MVCC allows several versions of an object to exist at the same time. That is, there are the "current" version and one or more previous versions. Readers acquire the current version and work with it as much as they want. During that a writer can create and publish a new version of an object, which becomes the current. Readers still work the previous version and can't block/starve writers. When readers end with an old version of an object, it goes away.

There is strong similarity with persistent data structures. However, in a context of persistent data structures we care about all version of an object equally; while in a context of MVCC we have a separated "current" version, and few previous versions that we care only as far as.

The approach may appear quite strange and counter-intuitive to you, if you used to work in a non-concurrent environment. However, trust me, it is a very good and natural approach for concurrent systems. It captures the essence of how things are in concurrent systems.

Next page: Optimistic Concurrency Control