Show TOC

Reader-Writer LockLocate this document in the navigation structure

Use

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

If a task write-accesses a critical section, the associated reader-writer lock (share lock) blocks this critical section for all other task accesses.

SHARED

If a task read-accesses a critical section, the associated reader-writer lock (share lock) blocks this critical section for all task write-accesses but allows other task read-accesses.

More Information

Concepts of the Database System, Working Memory Areas

SQL Reference Manual, SHARELOCKINFORMATION, SHARELOCKSTATISTICS, SHARELOCKWAITINGTASKS