Re: Please Help Me
Date: 1 Aug 2001 23:19:40 -0700
Message-ID: <57da7b56.0108012219.7d5ff11c_at_posting.google.com>
sekh_at_rediffmail.com (Sekhar Hari) wrote in message news:<ebb4eab3.0108010653.cf410e6_at_posting.google.com>...
>         1.Actually,what is meant by two phase locking ?
Two phase locking is the name given to the practice whereby, in transactional systems using pessimistic concurrency control that guarantee serializable isolation levels, locks are acquired and released in two distinct phases. In the first phase, locks are acquired by the transaction processing system as it reads or updates records. Once all of the transaction's operations are completed, and only then, in phase two the locks are released.
The theory behind this intuitively pretty obvious algorithm is actually pretty sophisticated, although the boys & girls at mySQL believe it can be improved upon. (Hi there!)
>         2.What is meant by locks/latches ? Are they same as database
> locks ?
  
No. The difference between a lock and a latch in a transactional system is that a latch can be released before the transaction completes. Latches are more typically used to coordinate access to a shared resource; a single page, a memory buffer, or even a lock block. Latches are obtained for the period of time during which a task modifies the shared structure. Latches differ from semaphores in that they are usually more light-weight, and are typically attached to the object being "latched".
Practically any text book on DBMS internals should have these entries in its index.
Hope this helps!
KR
                 Pb
Received on Thu Aug 02 2001 - 08:19:40 CEST
