IT lexicon › Database › Shared Lock

Shared Lock

Database På svenska → Updated: 2026-11-11

A lock type that allows multiple readers to access the same data concurrently but prevents writes.

When a transaction reads data, it typically holds a shared lock. Many transactions can hold shared locks on the same resource at the same time without conflict. However, another transaction cannot acquire an exclusive lock (for writing) on that data while shared locks are active.

Shared locks are fundamental to allowing parallel reads while guaranteeing that the data doesn't change mid-read. They're combined with exclusive locks in protocols like two-phase locking to ensure transaction isolation. Early systems like hierarchical and network databases used this distinction to manage concurrent access.

← Back to the lexicon