Concurrency Control via Locking




CS157b

Chris Pollett

Apr 12, 2023

Outline

Locking

More on Locking

Two Phase Locking (2PL)

Why two-phase locking works

In-Class Exercise

Different types of Lock Modes

Compatibility Matrix

Upgrading Locks

Update Locks

Update Lock Compatibility Matrix

Increment Locks

Compatibility Matrix for Increment Locks

Lock Scheduler Architecture

A Two Part Scheduler

A Lock Table Entry

Diagram of Lock Table Entry

Handling Locking

Handling Unlocking