Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jan 1999 13:43:35 -0700
From:      Nate Williams <nate@mt.sri.com>
To:        Narvi <narvi@haldjas.folklore.ee>
Cc:        Nate Williams <nate@mt.sri.com>, Terry Lambert <tlambert@primenet.com>, Wes =?iso-8859-1?Q?Peters=D4?=?=?iso-8859-1?Q?=40=21=EA?=? <wes@softweyr.com>, bright@hotjobs.com, hackers@FreeBSD.ORG
Subject:   Re: question about re-entrancy.
Message-ID:  <199901052043.NAA09607@mt.sri.com>
In-Reply-To: <Pine.BSF.3.96.990105223702.5112Y-100000@haldjas.folklore.ee>
References:  <199901052008.NAA09332@mt.sri.com> <Pine.BSF.3.96.990105223702.5112Y-100000@haldjas.folklore.ee>

next in thread | previous in thread | raw e-mail | index | archive | help
> > > [snip]
> > > 
> > > > >       The problem with object locks is that it puts
> > > > > 	objects that don't really need to be in a contention
> > > > > 	domain into one in order to satisfy contention in what
> > > > > 	are usually very small critical sections having to do
> > > > > 	with list manipulation of pointers to the object.
> > > > 
> > > > So you're claiming that the 'Big Giant Lock' is the better way?  You
> > > > can't have it both ways.
> > > > 
> > > > 
> > > > 
> > > > Nate
> > > 
> > > The third way (about which Terry did talk) is to have locks around
> > > critical sections.
> > 
> > That *is* what an 'object lock' in RTEMS is.
> > 
> 
> An "object lock" is a lock associated with some object. In order to access
> the object, you acquire the lock.
> 
> A "critical section" lock is a lock associated with a certain critical
> section of code. In order to enter that specific section of code, you
> acquire the lock.

A 'critical section of code' is a portion of the code that is accessing
a shared resource, which can be protected by using an object lock.  Or,
better put you 'aquire a lock' before you enter the 'critical section'
and 'release the lock' after you leave the critical section.
(semaphores).

Like I said, it's the same thing, just different terminology.



Nate

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901052043.NAA09607>