Newsgroups: comp.realtime,comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!agate!darkstar.UCSC.EDU!news.hal.COM!olivea!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!jfox
From: jfox@netcom.com (Jeff Fox)
Subject: Re: Real-time systems:  Windows-NT or QNX
Message-ID: <jfoxCxzM0p.7AI@netcom.com>
Sender: jfox@netcom.com (Jeff Fox)
Organization: Netcom Online Communications Services (408-241-9760 login: guest)
References: <jfoxCxs677.K3q@netcom.com> <jfoxCxxs76.D3p@netcom.com>
            <bagpiperCxyDBs.F3K@netcom.com>
Date: Thu, 20 Oct 1994 19:55:36 GMT
Lines: 143
Xref: glinda.oz.cs.cmu.edu comp.realtime:7293 comp.robotics:14617

In article <bagpiperCxyDBs.F3K@netcom.com> bagpiper@netcom.com
           (Michael Hunter) writes:
>Jeff Fox (jfox@netcom.com) wrote:
>: In article <id.B2ZD1.QOA@nmti.com> peter@nmti.com (Peter da Silva) writes
>: >In article <tsikesCxtpK5.ICM@netcom.com>,
>: >Terry Sikes <tsikes@netcom.com> wrote:
>
>[snip...]
>
>Lets be honest here....some of these numbers are a little outrageous.

Sure I admit I was just trying to point out the range.  I got the 62 min
number from a different poster.  On one of my computers windows 3.1
will NEVER run this long.  I have gone through everything with the
Microsoft help line and the manufacturer.  Microsoft's solution, buy
another computer, I did.  I just think is insane to consider WINDOWS
in any form for the project described as having a potential for
dissaster if an error occurs.  The 62 minute crash example was meant
to add some humor. :-)

> \ snip \
>On the other hand the estimate of windows crashing every 62 minutes
>is probably a bit long :)
>
> \ snip \
>You could do 10000 context switches during that period of time on a 
>DX266 running QNX.  You software would have to be fairly poorly
>designed to take this long.  We control hardware devices on the
>oterh end of crufty old analog telephone lines with better precision.

This sounds very reasonable for this application,  I think you
are right that QNX would do good job here.

> \ snip \
>: 5. 60 nanoseconds later your Forth hardware robot detects the error
>:     and shuts down.
>
>What kind of RAMS/cache ya' got on this system?  Can't get many instructions 
>in this period of time!  On a 90 Mhz CPU you only get 5.4 clock

Cheap rams, NO  cache !  I am talking about 5 or 10ns instruction times
out of cheap ram, really!  So I am talking about a half dozen to a dozen
cpu instructions executing out of cheap memory with no cache.

>cycles.  On a 66 Mhz CPU you would get *almost* 4 clock cycles.
>Now you said "Forth hardware robot".  I'm going to assume you mean
>one that is mostly digital w/ some Forth in ROM holding it all together.

No.  I do not consider Forth in ROM to be Forth hardware, I think of
this as Forth in firmware.  Forth in hardware means that the CPU
instruction set IS the Forth language.  This is how you can get
100 mips out of cheap memory while drawing 100mw from a $20 chip
that only has 7K transistors!

Next year we will double the cpu performance and combine
multiple chips with on-chip hardware for increased
performance in a multiprocessor arangement.

>I still have a hard time believeing you can do it in 4 cycles unless
>it was such a simple error that your digital electronics caught 
>it and corrected it in which case Forth vs ??? isn't the question.
>

Well in the case of the example I sited I would actually recommend  
adding some custom hardware on the chip to reduce the actual respone
to this error into the 1-2ns range.  This is possible because with
Forth we can design cheap custom high performace chips, and integrate
the hardware and software much more tightly than with other
development environments.

I just am trying to show that if you are making a robot that has
the potential for dissaster in the real world that real-time response
takes on a special meaning.  Maybe a 62 minute to 60 nanosecond
example exagerated the point, but even 60 milliseconds to 60 nanoseconds
is a million to one range.  

It is ok if you robot needs 60ms to figure out that is trapped under
a chair, but laser brain surgery is something else.

>: Take your pick.   (and check with the legal dept about insurance.)
>
>: I had mentioned Forth Inc. in my post because although all of the Forth
>: projects I have done involved 1-4 programmers they have lots of experience
>: with large projects, and large scale applications.  
>
>If an engineer working for me came up with this comarison I would probably
>start discounting his advice.  Sorry.  I like and have used Forth and
>shameless pushing of Forth as you do above is damaging to Forth.

What part would you discount?

Shameless? Sure why not?  Forth gets a lot of bad press for lots
of things, and one of them seem to be that people dismiss Forth
for many reasons.  I just hate to see people trying to solve
problems in the real world make things so difficult for themselves.

There are many advantages to reducing the complexity of hardware and 
software when attacking a problem.  I often see a range of 1000/1  
in hardware requirments, and software performance.  I just wish
people would realize that todays technology offers a VERY wide
range.  If you can do the job with 1000 times less hardware,
1000 times less software, and 1000 times faster, and 1000 times
cheaper why not.  Maybe it does hurt Forth to say that the
"Emperor has no clothes", but thats the way I am.

If this doesn't fit into someone's world view then let them go
ahead and do it there way.  (real-time WINDOWS robots...)

>
>: The original post suggested the potential for a scene like the one above...
>: SO I suggested the kind of code that goes into these critical apps. :-)
>
>: Jeff Fox
>: Ultra Technology
>
>While I don't agree with the detail of Mr. Fox's analysis, something

I couldn't agree more about the original poster needing to do
something along this line of analysis.  It should be pretty
easy to answer an QNX vs WINDOWS for real-time question.  The question is 
a little more involved if you also bring Forth solutions into the
picture.  That all, take it or leave it.  (Should I hang my head
in shame?)

>
>		mph
>-- 
>* Michael Hunter	bagpiper@netcom.com or QUICS: mphunter

I enjoy reading this group.  I enjoy seeing when people figure out
clever ways to make an 8051 or 68hc11 do things that one would have
trouble doing on a 486 in real-time under WINDOWS. :-) I just wince when
I see people hamstring themselves by choosing completely inapropritate
solutions just because it get more advertizing on the Super Bowl
or someone else is doing it that way.

I just want people to know that there are a wide range of choices.  If
it offends people to notice that the emporer has no clothers it isn't
my fault, I just pointed it out.

Jeff Fox
Ultra Technology

