Back to the 2024 paper

Unit 3: Storage and Transaction Processing

20247m

What do you mean by concurrency control techniques?

Worked SolutionAI Assisted

Concurrency Control Techniques: Methods to ensure isolation and serializability when multiple transactions execute concurrently.

Techniques:

  • Lock-Based: 2PL (growing/shrinking), Strict 2PL, Shared (S) and Exclusive (X) locks, prevents dirty read/write. Example: before read acquire S, before write acquire X.

  • Timestamp Ordering: Assign timestamp TS(T), ensure conflict order follows timestamp via W-timestamp/R-timestamp, Thomas write rule for obsolete writes.

  • Validation/Optimistic: Read phase, validation (check conflicts), write phase - no locking, abort if conflict (good for low contention).

  • Multiversion (MVCC): Keep multiple versions for reads without locking, readers read snapshot.

  • Granularity: Multiple granularity locks (IS, IX, SIX) for hierarchy.

Goal: Prevent anomalies: lost update, dirty read, non-repeatable read, phantom. Provide serializable schedule.

Similar questions

Budget AppAndroid App

Pocketly on Android

Log daily food, travel, and hostel expenses instantly. Set monthly spending limits and see where your money goes without complex spreadsheets.