On Fri, 21 Jan 2000 09:33:05 +0530, Nitin Mangtani <[EMAIL PROTECTED]> wrote:

>    Can someone explain me what exactly Optimistic - Pessimistic Locking mean
>in general and if  possible with respect to Oracle DB.
>
>Regards,
>Nitin.

Hi Nitin,

I am not an Oracle-expert, but I studied concurrency control a bit
for my master's thesis. In "Distributed Systems: Concepts and
Design" by Coulouris, Dollimore and Kindberg, three concurrency
control mechanisms are described: Locks, timestamps and optimistic
concurrency control (OCC). Locks and timestamps are pessimistic
in a sense that they assume that collisions happen often. Locks
and timestamps order transactions that access same data items
before transaction is started (in prepare phase? I'm not sure of
this). OCC lets the transaction proceed and the check for collision
is done just before the commit. OCC is thus optimistic approach,
it assumes that collisions rarely happen.

Naturally each approach has it's advantages and disadvantages... :-)


Regards,
Ville

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to