DragonFly BSD
DragonFly kernel List (threaded) for 2004-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: serializing token

From: Dave Leimbach <leimySPAM2k@xxxxxxx>
Date: 24 Apr 2004 21:50:48 -0500

"Justin C. Sherrill" <justin@xxxxxxxxxxxxxxxxxx> writes:

> Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx> wrote in
> news:200404240602.i3O620uD010997@xxxxxxxxxxxxxxxxxxxx: 
> >     If you look at FreeBSD-5, you will notice that
> >     FreeBSD-5 passes held mutexes down the subroutine stack quite
> >     often, in order to allow some very deep procedural level to
> >     temporarily release a mutex in order to switch or block or deal
> >     with a deadlock.  
> [trimmed for brevity] 
> >     You don't have any of that mess with the token abstration but
> >     there is a cost and that cost is that you lose atomicy across
> >     blocking ops. 
> Is this a proper analogy?  Mutexes are like additive door locks, where
> having any door locked in a series of doors makes them all impassable
> during the lock period.  Tokens are like a passcard, which opens a
> single door out of a series, but you have to have the passcard for each
> door to open them all.  Or am I getting too symbolic? 

It's more like a gas-station restroom :).  You have to get the key from the
guy who left before you and hope he didn't stink it up too much.

Now that's going too far :)


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]