On Tue, Feb 22, 2000 at 02:50:56PM +0000, Stuart Hughes wrote:
> [EMAIL PROTECTED] wrote:
> > 
> > On Tue, Feb 22, 2000 at 09:49:41AM +0000, Stuart Hughes wrote:
> > > Hi Victor,
> > >
> > > Why not implement POSIX 1003.1c fully and have normal mutexes and
> > > condition variables.  What you propose here is so close to that, it seem
> > > strange that you don't implement standard POSIX.  Note that the POSIX
> > > 1003.1c mutexes and convars are SMP safe.  In posix, the normal
> > > proceedure is (from Butenhof):
> > 
> > We are going to have condition variables, but I think they are a poor
> > solution requiring a multi-step operation where one step would be
> > simpler and clearer.
> > 
> > I'm thinking that there must be a better solution: preferrably using
> > the POSIX API. Any suggestions?
> 
> Hi Victor,
> 
> The observation I was making was that the code you proposed using the
> plan9 approach was very very similar to the POSIX mutex/condvar stuff. 
> The mutexes don't really introduce an extra step as they provide the
> necessary locking you need on an SMP system.  This being the case, it
> seems that the 'pure' POSIX approach might work well for everyone (once
> we've swallowed the indigestible man pages :-)

Compare:
condvar method
    get mutex
    call condvar_wait
                         

plan9 method:
     call sleep


The complexity is hidden in the plan9 method and the efficiency
can be vastly improved. Note that there are 2 wait queues in using
condvars.



> 
> Regards, Stuart

-- 
---------------------------------------------------------
Victor Yodaiken 
FSMLabs:  www.fsmlabs.com  www.rtlinux.com
FSMLabs is a servicemark and a service of 
VJY Associates L.L.C, New Mexico.

-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to