Oracle database - What is the difference between locks, latches, enqueues and
semaphores? posted by Babu
Kunwar
What is the difference between locks, latches, enqueues and semaphores?
Semaphores: Inside Oracle database there are many processes or threads are
running and for successful running they need to communicate with each other.
The process through which they communicate with each other is known as
semaphores. It is just like a signal which tells the thread that when to run
and stop. There is a semaphore for every Oracle server process.
Locks and Latches: There are several processes inside Oracle System Global Area
that needs to be accessed concurrently by many different database processes.
And it is very important that only one process is able to modify particular
data structure at a time. Oracle does this with the help of Locks and Latches.
Latches: Latches are the more restrictive mechanism, because they do not allow
multiple processes to inspect the protected data structure at the same time.
Latches do not support queuing. Oracle uses latch for the data is accessed in
details.
Locks: Locks allow for better concurrency, because they may be held in a shared
mode when the data structure is simply being inspected. Queuing is supported by
Latch. Locks are used by Oracle for performance tuning.
Enqueues: Many of the Locks in Oracle are known as Enqueues locks. To enqueue a
lock request is to place that request on the queue for its resource.
More links
Overview of Data Manipulation Language
Explain how to retrieve information using SELECT.
Add information using INSERT
Change information using UPDATE
Remove information using DELETE
Use Subqueries as your search condition.............
|