all transactions to execute concurrent read/write operations and determines whether or not the result of execution is serializable
multiversion concurrency control (MVCC)
guarantees a consistent view of DB at some point in past (timestamp)
pessimistic/conservation concurrency control (PCC)
timestamp ordering
read value with timestamp < max_write_timestamp -> abort transaction of reads
write with timestamp < max_read_timestamp -> conflict with recent reads
locking
two phase locking - 2PL
growing phase: all locks are acquired
shrinking phase: all locks are released
deadlock
timeout + abort long-running transactions
locks (logical) & latches (physical)
lock isolates and schedules overlapping transactions and manage DB contents -> is held for duration of transaction (visible to user)
latch guards physical representation (leaf-page contents are modified during operations, page contents and tree structure) -> is held for duration of physical operation (hidden from user)
latch crabbing
grab all latches on road from root to target node (straightforward but not practical)
LC holds latches for less time and release them ASAP (not require anymore)
reader-write lock (RWL)
multiple readers access object concurrently, only writes have to obtain exclusive access to object
readers acquire shared latch (SH), and write acquires exclusive latch (EX, EX only is held by 1 thread)