Today , I will tell you some basic Differences Between Latches and Lock
Latches
|
Locks
|
Latches Provide only exclusive access to
protected data structures
|
Locks Allow serialized access to some
resources
|
Request are not queued, if a request fails,
process may try later
|
Requests for locks are queued and serviced
in order
|
Latches have Simple data structure
|
Locks have a Complex data structure , that
is further protected by latch
|
Protect resources that are briefly needed
(LRU list)
|
Protect resources needed for a longer time
(e.g. tables)
|
Less efficient
|
Very efficient
|