June 2001
Intermediate to advanced
688 pages
19h 18m
English
The first component of the infrastructure, deadlock detection, is not so much a requirement specific to transaction-protected applications, but instead is necessary for almost all applications in which more than a single thread of control will be accessing the database at one time. Although Berkeley DB automatically handles database locking, it is normally possible for deadlock to occur. It is not required by all transactional applications, but exceptions are rare.
When the deadlock occurs, two (or more) threads of control each request additional locks that can never be granted because one of the threads of control waiting holds the requested resource.
For example, consider two processes: A and B. Let’s say that A obtains ...