Quick Notes

Things that came on the way

Spanner

Globally distributed database that automatically shards data across many sets of Paxos state machines in datacenters spread all over the world. Replication is used for global availability and geographic locality; clients automatically failover between replicas. It automatically migrates data between machines to balance load and during failures.

Challenges in Concurrent Programming II

In addition to race conditions, the second challenge in developing concurrent processing is deadlocks and they occur when the processes running concurrently need access to more than one resource. For e.g. if there are two resources R1 & R2 which will be accessed by two concurrent processes A & B,

  • Lets assume process A acquired resource R1

  • OS swaps processes A to start executing process B and processes B acquired resource R2

Challenges in Concurrent Programming I

Inherently concurrent processing will involve shared resources like memory and will lead to race conditions. A simple example would be an accumulator variable which needs to be read by all the processes running concurrently, adding some value to it and storing back the result. The race condition occurs when