On Tue, May 23, 2000 at 10:27:20AM +0100, Stuart Hughes wrote:
> [EMAIL PROTECTED] wrote:
> > I think that priority inheritance is for people who want to build
> > complex critical realtime systems  that sometimes work.
> 
> Hi Guys,
> 
> Much of todays software today is complex, and cannot be fully tested. 
> It is a fact that the software in avionics flight boxes today can only
> be exercised through a limited range of all its potential paths.  Next
> time you're on a plane that is on final approach, be glad the designers
> used all the available mechanisms to ensure you get down in one piece,
> they may never need the defensive parts of the design, but things can
> wrong in unpredicable ways.  

I think this is exactly the kind of design that should not be made to 
rely on priority inheritance but instead should use reliable and safe
programming methods. To avoid priority inversion does not require
brilliant programming, it requires use of well known, time-tested 
methods such as flip buffers and message queues (or RTfifos). 
The semantics for a semaphore are quite clear
           semaphore_lock == while (atomic_test_and_lock() == ALREADY_LOCKED)
                                suspend the current thread 

That is, semaphores involve the possibility of  _unbounded_ delay. 
It's terribly dangerous  to try to pretend otherwise and it's
totally unnecessary.  
The rules are very simple:
                     use a "handshake" method when suspending the thread
                         is ok.
                     use an asynchronous method when the thread must not
                         block.

                     safety requires simplicity and simplicity is hard.

The utility of priority inheritance is that it allows unsafe programming
to work well enough to pass acceptance tests.  Bill the customer, 
cash out, move on. I'm perhaps too stupid to appreciate this method
of doing business.


-- 
---------------------------------------------------------
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