Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: latches or semaphores

Re: latches or semaphores

From: Ricky Sanchez <rsanchez_at_more.net>
Date: Wed, 14 Nov 2001 15:23:45 GMT
Message-ID: <3BF28CD5.F1FE239@more.net>


Danisment-

Correct, Oracle does not use semaphores to implement latches. Semaphores are too big and slow for that purpose. I think all supported platforms use test-and-set or compare-and-swap operations now, but prior to their availability such mechanisms as latches and semaphores were typically implemented using Dekker's Algorithm. You can probably find an example on the web somewhere, just google "dekkers algorithm". It is very clever, but eats up lots of cpu cycles and just isn't fast enough for a highly scalable product such as Oracle.

When you refer to "latch positing", you presumably meant "latch posting", but I am still not sure what you mean by that? There is a mechanism for a latch holder to notify a waiter when a latch is freed, but that generally applies only to long-held latches such as the Shared Pool latch. No matter, there is still no queuing mechanism for latch posting to guarantee a particular waiter will get the latch next. So, what exactly do you mean by "latch posting"?

danisment wrote:
>
> Hello,
>
>
> If Oracle doesn't use, how is the latch positing implemented ? Which
> IPC mechanism is used ? There are two options other than semaphores:
>
> - message queues
> - shared memory
>
Received on Wed Nov 14 2001 - 09:23:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US