Subject: Re: auto-spl simple locks
To: None <email@example.com>
From: Bill Sommerfeld <firstname.lastname@example.org>
Date: 07/30/1999 15:15:24
> Aren't approximately the semantics Chuck describes (particularly "locks
> must be released in the reverse order...") pretty much characteristic of
> almost all Unix kernels that support SMP with fine-grained locking?
It's entirely reasonable to do locking protocols where locks aren't
strictly nested, just as long as the locks are always acquired in the
for instance: you have a cache with entries in it which are locked. a
reasonable way to operate here is to acquire the cache lock, look up
and lock an entry, then release the cache lock, then operate on the
entry, then release the entry lock.
so, you're single-threaded on the cache lock only while doing the
lookup, and multiple entries can be operated on in parallel.