dbTalk Databases Forums  

Advisory v Pessimistic locking

comp.databases.pick comp.databases.pick


Discuss Advisory v Pessimistic locking in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike Preece
 
Posts: n/a

Default Advisory v Pessimistic locking - 01-25-2007 , 09:38 AM






Hi folks

I just heard the term "advisory locks" used for the first time to
describe a lock taken by a READU. I have always called these
"pessimistic locks" - to distinguish them from "optimistic locks". So -
can anyone tell me what an advisory lock is exactly, and whether a lock
taken by a READU is more correctly an "advisory" or "pessimistic" lock?

Cheers,
Mike.


Reply With Quote
  #2  
Old   
dtsig
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-25-2007 , 11:44 AM






This is really a matter of symantics .. like table or file, attribute
or field.

ReadU does a 'real' lock, normally called a pessimistic lock. I
*think* advisory lock is more of a c term. If i am wrong I am sure
there will be plenty of corrections <G>

On Jan 25, 7:38 am, "Mike Preece" <mich... (AT) preece (DOT) net> wrote:
Quote:
Hi folks

I just heard the term "advisory locks" used for the first time to
describe a lock taken by a READU. I have always called these
"pessimistic locks" - to distinguish them from "optimistic locks". So -
can anyone tell me what an advisory lock is exactly, and whether a lock
taken by a READU is more correctly an "advisory" or "pessimistic" lock?

Cheers,
Mike.


Reply With Quote
  #3  
Old   
dtsig
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-25-2007 , 11:47 AM



I forgot to mention that 'advisory locks' (flock in c? or is it uinx?)
allow other processes to access files that are locked but can give
information about that lock. SO the behavior is very similar to ReadU.

On Jan 25, 9:44 am, "dtsig" <d... (AT) hotmail (DOT) com> wrote:
Quote:
This is really a matter of symantics .. like table or file, attribute
or field.

ReadU does a 'real' lock, normally called a pessimistic lock. I
*think* advisory lock is more of a c term. If i am wrong I am sure
there will be plenty of corrections <G

On Jan 25, 7:38 am, "Mike Preece" <mich... (AT) preece (DOT) net> wrote:

Hi folks

I just heard the term "advisory locks" used for the first time to
describe a lock taken by a READU. I have always called these
"pessimistic locks" - to distinguish them from "optimistic locks". So -
can anyone tell me what an advisory lock is exactly, and whether a lock
taken by a READU is more correctly an "advisory" or "pessimistic" lock?

Cheers,
Mike.


Reply With Quote
  #4  
Old   
alpy
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-25-2007 , 01:05 PM



It is a sign of extreme laxity that the words 'advisory' and
'pessimistic' have become part of your diction relating to what you
discuss.


Reply With Quote
  #5  
Old   
Mark Brown
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-25-2007 , 02:28 PM



I could be wrong. It certainly wouldn't be the first time.

I believe the LOCKED clause in conjunction with the SYSTEM(0) function
changes the READU from purely pessimistic to advisory in that it will tell
you who actually holds the lock.

The difference is between

READU x FROM filevar,itemid THEN

If a lock is in place, your terminal just beeps and won't let you do
anything.

READU x FROM filevar,itemid LOCKED PRINT SYSTEM(0):' Has the item lockd'

will display some info to the user so they can get up, walk over to the
offender's desk and smack them in the back of the head.

Mark Brown


"Mike Preece" <michael (AT) preece (DOT) net> wrote

Quote:
Hi folks

I just heard the term "advisory locks" used for the first time to
describe a lock taken by a READU. I have always called these
"pessimistic locks" - to distinguish them from "optimistic locks". So -
can anyone tell me what an advisory lock is exactly, and whether a lock
taken by a READU is more correctly an "advisory" or "pessimistic" lock?

Cheers,
Mike.




Reply With Quote
  #6  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-26-2007 , 01:04 AM



Sort of a shame that this inquiry was posted in at least two places at
the same time and there are good answers posted in both forums which
people in the other forums may never find.

Someone needs to aggregate all of the Pick forums - LOL

"Mike Preece" wrote:

Quote:
Hi folks

I just heard the term "advisory locks" used for the first time to
describe a lock taken by a READU. I have always called these
"pessimistic locks" - to distinguish them from "optimistic locks". So -
can anyone tell me what an advisory lock is exactly, and whether a lock
taken by a READU is more correctly an "advisory" or "pessimistic" lock?

Cheers,
Mike.


Reply With Quote
  #7  
Old   
Mike Preece
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-26-2007 , 04:52 AM





On Jan 26, 7:04 am, Tony Gravagno
<g6q3x9lu53... (AT) sneakemail (DOT) com.invalid> wrote:
Quote:
Sort of a shame that this inquiry was posted in at least two places at
the same time and there are good answers posted in both forums which
people in the other forums may never find.

Someone needs to aggregate all of the Pick forums - LOL


Do you have a blog entry on the subject of locks Tony?



Quote:
"Mike Preece" wrote:
Hi folks

I just heard the term "advisory locks" used for the first time to
describe a lock taken by a READU. I have always called these
"pessimistic locks" - to distinguish them from "optimistic locks". So -
can anyone tell me what an advisory lock is exactly, and whether a lock
taken by a READU is more correctly an "advisory" or "pessimistic" lock?

Cheers,
Mike.- Hide quoted text -- Show quoted text -


Reply With Quote
  #8  
Old   
Tony Gravagno
 
Posts: n/a

Default Re: Advisory v Pessimistic locking - 01-27-2007 , 12:59 AM



"Mike Preece" wrote:

Tony wrote:
Quote:
Someone needs to aggregate all of the Pick forums - LOL

Do you have a blog entry on the subject of locks Tony?


Funny, I wasn't sure and had to check! duh. I try to write about
stuff that other people don't. So no, since this is already out there
I probably won't blog it. Good idea though - why didn't you ask last
month?

Regards,
T


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.