Skip to main content

2 docs tagged with "concurrency"

View all tags

Locks and isolation levels — controlling concurrent execution

This chapter explains shared and exclusive locks, the four transaction isolation levels and three read anomalies, the choice between optimistic and pessimistic locking, and the causes and avoidance of deadlocks. It covers how to hold a version column in the table and why raising the isolation level alone doesn't prevent contention without locks.

Processes and threads — split or share?

This chapter organizes the difference between processes and threads by "split resources or share them". It covers child processes being created as copies of the parent, why environment-variable copies are one-way, that pipe stages run concurrently, race conditions from shared memory, distinguishing CPU-bound from I/O-bound, and terminating with signals.