Reader-writer locks (share locks) are special database semaphores. The system uses them to synchronize tasks when they access critical sections of the working memory (both exclusive and non-exclusive access).
Name |
Used for |
Description |
---|---|---|
Region |
Data Cache |
EXCLUSIVE When a task accesses a critical section, the associated region blocks this critical section for all other tasks. |
Reader-writer lock (share lock) |
Catalog Cache Shared SQL Cache |
EXCLUSIVE or SHARED If a task write-accesses a critical section, the associated reader-writer lock (share lock) blocks this critical section for all other write-accesses but allows other read-accesses. If a task read-accesses a critical section, the associated reader-writer lock (share lock) blocks this critical section for all write-accesses but allows other read-accesses. |
Concepts of the Database System, Working Memory Areas
SQL Reference Manual, SHARELOCKINFORMATION, SHARELOCKSTATISTICS, SHARELOCKWAITINGTASKS