A primary benefit of shared memory is the ability of database server threads to share access to disk pages stored in the shared-memory buffer pool. The database server maintains thread isolation while it achieves this increased concurrency through a strategy for locking the data buffers.
The database server uses two types of locks to manage access to shared-memory buffers:
Each of these lock types enforces the required level of thread isolation during execution.
A buffer is in share mode, or has a share lock, if multiple threads have access to the buffer to read the data but none intends to modify the data.
A buffer is in exclusive mode, or has an exclusive lock, if a thread demands exclusive access to the buffer. All other thread requests that access the buffer are placed in the wait queue. When the executing thread is ready to release the exclusive lock, it wakes the next thread in the wait queue.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]