Oracle database maintains integrity through internal locks and latches, these are not controlled by users/applications. Latches are low-level serialization mechanisms to shared data structure. The term serialization means one by one access, so each request are lined up and processed.

In 11g there are nearly 600 latches available, query v$latch to know the address and names of the latches. We monitor latch misses, sleeps, and gets to monitor latch contentions.
Eg:
select latch#, name, gets, misses, sleeps from v$latch where name=’latch: cache buffer chains’;

We see the  output like below:
LATCH# NAME                                   GETS       MISSES     SLEEPS
———- —————————————-
177 cache buffers chains                            2504777        1       1

Latch “cache buffers chains”  is responsible to maintain the lru list, i.e add, or remove, or search. It maintains the list in hash table, so when a process need a buffer it has to acquire the latch and get the information. If it gets the latch, thats what we see in the above query.  Latch contention occurs if several server processes are waiting on this latch. The number of child latches depends on the number of hash tables.  The most likely cause for this latch contention is hot blocks, need to identify the block and tune accordingly.

In the same way, we have multiple latches that protect memory structure and queues all the requests in a serial. Any delay in acquiring these latches a server process to wait, and causes contention.  We have to identify the session holding the latch and trouble shoot further.

Tanel has explained this very well:
http://blog.tanelpoder.com/files/Oracle_Latch_And_Mutex_Contention_Troubleshooting.pdf

 

Views that help for diagnosis:
v$latchesv$latch_children
v$latch_parent
v$latchholder
v$latchname
v$latch_misses

Based on the type of latch, we take further steps in addressing the event.