Concurrency control in DBMS

December 4, 2026 · Team EasyExamNotes · 4 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-502 DBMS December 2020 solved question paper

← RGPV CS-502-CBGS DBMS June 2020 solved question paper

← RGPV CS-502 DBMS June 2025 solved question paper

← RGPV CS-502 DBMS May 2024 solved question paper

← RGPV CS-502 DBMS November 2019 solved question paper

CS-502 (CBGS) | December 2020 | Q8(i) | Short note (any three together carry 14 marks)

Question (restated): Write a note on concurrency control.

Answer

Concurrency control coordinates simultaneous transactions to preserve isolation and consistency. Without coordination, lost updates, dirty reads, nonrepeatable reads and phantoms may occur. For example, two transactions reading balance 100 and independently adding 20 and 30 may overwrite each other, producing 120 or 130 instead of 150.

Lock-based protocols use shared and exclusive locks; two-phase locking ensures conflict serializability. Timestamp ordering enforces a transaction order and rejects conflicting operations that violate it. Optimistic protocols validate transactions before commit. Multiversion concurrency control maintains multiple versions so readers can often avoid blocking writers. The guarantees depend on the isolation level and implementation.

Concurrency control balances correctness with throughput. Deadlock handling, rollback and recovery complement it. Serializability is the strongest standard isolation objective for concurrent transactions, although weaker isolation levels are often used for performance.

Concurrency control in DBMS
Concurrency control in DBMS — conceptual illustration

Further reading: Silberschatz, Korth and Sudarshan, Database System Concepts.


June 2020 – Q2(b)

Question: Why the concurrency control is needed? Explain it.

Concurrency control coordinates simultaneous transactions so that their combined execution preserves database consistency and isolation. Without coordination, two correct transactions may produce an incorrect result when their operations interleave.

For example, suppose balance X=1000. T1 reads X and adds 100, while T2 reads the same initial value and subtracts 200. If T1 writes 1100 and T2 then writes 800, the deposit is lost. The correct result is 900. This is a lost update.

Other anomalies include dirty reads (reading uncommitted data), nonrepeatable reads (a repeated read returns a changed value), and phantom reads (a repeated predicate query returns a different set of rows). Concurrency control prevents these anomalies to the extent required by the selected isolation level.

Lock-based protocols use shared locks for reading and exclusive locks for writing. Two-phase locking separates lock acquisition from release and guarantees conflict serializability. Strict 2PL holds exclusive locks until commit or abort, preventing other transactions from reading uncommitted writes. Timestamp ordering uses transaction timestamps to enforce a consistent order. Multiversion concurrency control maintains multiple versions so readers can access a consistent snapshot; serializability may require additional checks.

Concurrency control improves throughput by permitting safe interleaving instead of executing every transaction serially. It must balance correctness against lock contention, deadlocks and overhead. A DBMS may detect deadlocks and abort a victim transaction, or use prevention techniques. The objective is reliable concurrent access without compromising the isolation guarantees required by applications.

June 2025 – Q8(c)

Write a short note on concurrency control.

Concurrency control coordinates simultaneous transactions to preserve isolation and consistency. Without it, lost updates, dirty reads and inconsistent reads can occur. Techniques include locking, timestamp ordering, optimistic validation and multiversion concurrency control. Serializability is a key correctness criterion, although systems also offer weaker isolation levels for performance. For two transactions updating the same account, exclusive locking can prevent both from overwriting a balance computed from the same old value. Deadlock detection or prevention may be necessary with locks.


May 2024 — Q6(a)

Question (restated): Explain issues that arise when transactions run concurrently.

Answer

Concurrent execution improves throughput but uncontrolled interleavings may violate isolation. Lost update occurs when two transactions read the same old value and overwrite each other’s changes: both read 100, then write 110 and 120, losing the first increment. Dirty read occurs when a transaction reads an uncommitted value that is later rolled back. Nonrepeatable read occurs when a repeated read of the same row observes a committed modification. Phantom read occurs when a repeated predicate query sees inserted or deleted qualifying rows. Inconsistent analysis occurs when an aggregate observes a mixture of old and new values. Write skew can occur under snapshot isolation when transactions update different rows after reading a shared invariant. Deadlock occurs when transactions wait cyclically for locks; starvation occurs when one repeatedly fails to progress. Serializable isolation, appropriate locking, MVCC and retry handling address these issues, with trade-offs in contention and performance.

Concurrent reads and writes|Isolation anomalies|Locks or MVCC|Consistent results
Concurrent transaction issues — schematic illustration

November 2019 – Question 6(b)

Question (restated): Explain how concurrency is performed and protocols used to maintain it.

Answer

A DBMS interleaves operations of multiple transactions while controlling conflicting accesses. Shared locks permit compatible reads; exclusive locks prevent conflicting reads and writes. Two-phase locking requires all acquisitions before the first release, guaranteeing conflict serializability. Timestamp ordering uses transaction timestamps to reject conflicting operations that violate the prescribed order. MVCC retains versions to support consistent snapshots, although snapshot isolation alone is not always serializable. These protocols address lost updates, dirty reads and inconsistent observations.

← RGPV CS-502 DBMS December 2020 solved question paper

← RGPV CS-502-CBGS DBMS June 2020 solved question paper

← RGPV CS-502 DBMS June 2025 solved question paper

← RGPV CS-502 DBMS May 2024 solved question paper

← RGPV CS-502 DBMS November 2019 solved question paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion