[concurrency-interest] difference latch and lock

Jean Morissette jean.morissette at gmail.com
Wed Aug 30 17:43:47 EDT 2006


In the database context, locks are related to transactions, while
latchs are short lived locks used, by example, to access the indices.

Jean Morissette

2006/8/30, David Holmes <dcholmes at optusnet.com.au>:
> Peter,
>
> Depends exactly what you mean by "latch". A latch or gate is a
> synchronization barrier that is either open or closed. If open anyone can
> pass, if closed no one can pass. A Lock is intended to let through one
> thread at a time.
>
> I don't know what they meant by a latch being more lightweight than a lock
> ???
>
> David Holmes
>
> > -----Original Message-----
> > From: concurrency-interest-bounces at cs.oswego.edu
> > [mailto:concurrency-interest-bounces at cs.oswego.edu]On Behalf Of Peter
> > Veentjer
> > Sent: Thursday, 31 August 2006 6:14 AM
> > To: concurrency-interest at cs.oswego.edu
> > Subject: [concurrency-interest] difference latch and lock
> >
> >
> > Who can tell me what the difference between a Latch and a Lock is. I
> > have read multiple times that a Latch is considered a more lightweight
> > lock than the lock (maybe only in the context of databases and heavy
> > weight locks).
> >
> > But in Java all Locks and synchronized blocks are lightweight.. so are
> > there differences?
> > _______________________________________________
> > Concurrency-interest mailing list
> > Concurrency-interest at altair.cs.oswego.edu
> > http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>


More information about the Concurrency-interest mailing list