8 Concurrency Control

Database Management System · Unit 8

Concurrency Control

Exam-focused notes for Concurrency Control (Database Management System, BIT202): what the TU syllabus asks and how it has actually been tested, with 5 solved past questions from this unit.

What this unit covers

  • Concurrent execution in multiuser systems
  • Need for concurrency control
  • Binary locks
  • Shared and exclusive locks
  • Two-phase locking protocol
  • Deadlock definition and examples
  • Starvation in DBMS

Two-phase locking protocol

20825 marks

What is two phase locking protocol? How can it lead to the deadlock condition? [5]

Two Phase Locking (2PL) is a concurrency control protocol that ensures serializability of transactions by regulating when locks can be acquired and released. It states that: A transaction must acquire all the locks it needs before releasing any lock. The pr...

Full solved answer →

Shared and exclusive locks

20805 marks

What is Shared/Exclusive (Read/Write) Locks? How it is different from binary Locks. [5]

Note: Reference notes were not available for this topic. The following answer is based on standard database concurrency control concepts as taught in BSc CSIT curriculum. --- A binary lock has only two states: State Value Meaning ----------------------- Loc...

Full solved answer →

Deadlock definition and examples

20805 marks

What is Deadlock in DBMS? Explain with example. [5]

A deadlock is a situation in a database system where two or more transactions are waiting indefinitely for each other to release locks, such that none of them can ever proceed. Each transaction holds a resource that another transaction needs, creating a cir...

Full solved answer →

Need for concurrency control

20795 marks

What is meant by the concurrent execution of database transactions in a multiuser system? Discuss why concurrency control is needed, and give informal examples. [5]

In a multiuser database system, multiple transactions are submitted and executed at the same time (overlapping in time) rather than one after another. The database system interleaves the operations of multiple transactions to improve: - CPU utilization (whi...

Full solved answer →

Starvation in DBMS

20785 marks

What is starvation in DBMS? Explain with example. [5]

Starvation (also called indefinite blocking) is a situation in which a transaction waits indefinitely for a lock or resource because other transactions are continuously granted priority over it, preventing it from ever proceeding. In other words, a transact...

Full solved answer →