0
3.5kviews
Short note on Distributed Transaction management.
1 Answer
1
52views
  • Transaction is strongly related to mutual exclusion as they ensure that a shared resource is accessed at the most by one process at a time.
  • Transactions allow a process to access and modify multiple data items as a single atomic operation and can roll back if a transaction backs out halfway.
  • The all-or nothing property of transactions is one of the four characteristic properties that transactions have. It follows the ACID properties
  • Transactions are classified into three type namely flat transactions that have a series of operations that follow ACID properties, nested transactions which are constructed from sub-transactions and the third is distributed transactions which are distributed across multiple machines.
  • To manage these transactions concurrency control is needed which can be explained using three managers that are organized in a layered fashion in below figure.

enter image description here

  • The bottom layer consists of data manager that performs the actual read and write operations on data. The data manager is not concerned about which transactions it is performing a read or write. It keeps no information about transactions. Execution of read and write is done here.
  • The middle layer consists of a scheduler and has the main responsibility of controlling concurrency. It decides which transaction is allowed to pass a read or write operation to the data manager and at which time. It schedules individual read and write operations such that isolation and consistency of transactions are achieved. These use timestamp operations.
  • The topmost layer consists of transaction manager that guarantees atomicity of transactions. It processes transaction primitives by transforming them into scheduling requests for scheduler. The operation BEGIN_TRANSACTION marks the start of a transaction while END_TRANSACTION terminates the transaction and tries to commit. These are used to delimit the scope of a transaction. READ/WRITE are normal primitives used to read and write files.
  • When the transactions are distributed each site has its own scheduler and data manager. These are responsible for ensuring local data remains consistent. Each transaction is handled by a single transaction manager and communicates with the scheduler.
  • Depending on the concurrency control algorithm, a scheduler may also communicate with remote data managers.
Please log in to add an answer.