Wednesday, December 07, 2005

Oracle: lock - enqueue

A latch is an internal Oracle mechanism used to protect data structures in the SGA from simultaneous access. Atomic hardware instructions like TEST-AND-SET are used to implement latches. Latches are more restrictive than locks in that they are always exclusive. Latches are never queued, but will spin or sleep until they obtain a resource, or time out.

Enqueues and locks are different names for the same thing. Both support queuing and concurrency. They are queued and serviced in a first-in-first-out (FIFO) order.

Semaphores are an operating system facility used to control waiting. Semaphores are controlled by the following Unix parameters: semmni, semmns and semmsl. Typical settings are:

semmns = sum of the "processes" parameter for each instance
(see init.ora for each instance)
semmni = number of instances running simultaneously;
semmsl = semmns

0 Comments:

Post a Comment

<< Home