More Locking, Start Time Stamp Scheduling




CS157b

Chris Pollett

Apr 17, 2023

Outline

Introduction

Lock Granularity

Table Locks

Tree of Locks

Warning Lock Compatibility Matrix

Phantoms and Handling Insertions Correctly

The Tree Protocol (Silberschatz Kedem 1980)

Quiz

Which of the following statements is true?

  1. Taking a non-quiescent dump involves flushing an end checkpoint log record to disk.
  2. All serializable schedules are conflict serializable schedules.
  3. The use of locks always guarantees serializability.

Other Concurrency Control Techniques

Timestamps

Physically Unrealizable Behaviors

Problems with Dirty Data

Timestamp-Based Scheduling

Rules for Timestamp-Based Scheduling -- Read and Write

Rules for Timestamp-Based Scheduling -- Commits and Aborts

Multiversion Timestamps (Papadimitriou Kanellakis 1984)

More on Multiversion Timestamps

What kind of writing should be rejected?

Example rejectable schedule

Timestamps versus Locking

Transactions and SQL

SQL Isolation Levels