Newsgroups: comp.realtime,comp.os.qnx,comp.os.ms-windows.advocacy,comp.robotics
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!MathWorks.Com!europa.eng.gtefsd.com!howland.reston.ans.net!pipex!uunet!sparky!kwiudl.kwi.com!netcomsv!netcomsv!netcom.com!bbutler
From: bbutler@netcom.com (Bryan Butler)
Subject: Re: Real-time systems:  Windows-NT or QNX
Message-ID: <bbutlerCxo6Js.7L@netcom.com>
Followup-To: comp.realtime,comp.os.qnx,comp.os.ms-windows.advocacy,comp.robotics
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
X-Newsreader: TIN [version 1.2 PL1]
References: <FriOct14102309EST1994@eric>
Date: Fri, 14 Oct 1994 15:47:52 GMT
Lines: 99
Xref: glinda.oz.cs.cmu.edu comp.realtime:7131 comp.os.qnx:2197 comp.os.ms-windows.advocacy:40372 comp.robotics:14363

Bernie Kirby (bernie@ecr.mu.OZ.AU) wrote:
> MS-DOS is out of the question, though some people here (I suppose they
> include myself) think it might be a good choice if for no other reason
> than it's robustness.
What!? WHen I think messy-DOS, I don't think robust. It's amazing that as
old as it is, it's still horribly unreliable unless you have just the 
basics installed.

> Anyway I've narrowed it down to two (or three) operating systems:
> Microsoft Windows, Windows NT, and the QNX operating system from Quantum
> Computer systems.  What I'm really seeking is knowledgeable advice on the
> best approach, or failing that peoples opinions on how best to do what
> we are trying to do.
Don't even consider Windoze. It runs on top of DOS, so you'll have all the
old DOS problems, plus all the new Windows problems.

I had looked at QNX at my previous job. To me, their biggest deficiency is
they only target the Intel market. I wanted something more portable to
other platforms, including, but not limited to, Intel. Otherwise, I was
rather impressed.


> I understand QNX use a strategy called pre-emptive scheduling where a
> highest priority task runs where as Windows and Windows/NT have a
> different approach called (I think- but dont quite me :-]) threads (I don't
> quite know how they work so if someone could compare the two that would be
> very helpful).  

I believe QNX also has threads. The two are not mutually exclusive. Threads
are multiple paths of execution in the same process space. They can be 
useful, but at the same time you have to be aware of potential interference,
eg if both threads try to modify a linked list and end up getting the list
hopelessly screwed up. 


> One of the most important considerations is ease of writing device
> drivers.  We don't really want to get bogged down in this area. Both
> systems claim some level of POSIX compatibility so I guess devices are
> accessed in both by open/read/write etc calls. How do the systems compare
> in terms of ease of writing device drivers for things like A/D boards
> Digital I/O boards, etc. Are drivers readily available?

I don't believe POSIX says anything about drivers, although I could be
wrong on this. I think POSIX only defines the user interface to the OS, and
drivers are on the other side of the OS from the user (what would you call
it?) Drivers are always a pain to debug, no matter what type of system you
are on, so be prepared.

For simple things like analog and digital I/O, you might consider mapping the
board into the process space, and letting the process handle I/O. This will
be much easier to debug. If you really want a driver, you can eventually move
it.

> When it comes to the windowing tasks I suspect that windows has the
> performance advantage since that's what it's really designed for.  What we
> need to make sure of here is that the processor doesn't get bogged down
> updating the screen or running the user  interface when the servo control
> tasks must run.  That would lead to big problems with the controller. Is
> preemption or threads the better suited strategy here. Would windows be
Yes, this is what preemption is for.

> better or QNX? What are the key things to look at. Does QNX have a
> windowing system or do we need by one from some other seller. Do they
> exist at all? I suppose Windows is the de-facto standard for Graphical user
> interfaces (correct me if I'm wrong)
No, I wouldn't say this. X windows also has a strong following. Maybe not
as many users, but certainly a considerable amount of work behind it.

I believe QNX supports X. The advantage here is that you can have 2 machines,
one running process control, and the other acting as a display. The process
control machine sends displays to the display controller, which performs
the task of putting pixels on the screen. Thus, the process controller has
a lot less work than if it had to do the display as well.

> The intended application for the robot is hazardous and if the software
> failed the potential for disaster is great. I know we have to take
> responsibility for our own bugs but which systems is more reliable
> or robust. Is there any type of certification for computer systems that
> must run in hazardous environments. Does either windows NT or QNX have
> such certification. Failing that, it would be nice to know which operating
> systems has the best track record. Are there well known examples where
> each is used in a dangerous environment.

I suspect you are going to find disclaimers on both saying the developers
are not liable for accidents, and not to use it in life critical or medical
instruments controlling life support. You will also find it on your
hardware, unless you buy special hardware.

With that said, and with little real experience with QNX or NT, I would tend
to trust QNX more. I wouldn't trust NT farther than I could throw it.

If you don't have it already, ask QNX for their Producs and Consultants
Directory. I think that may help you find some of the things you're looking
for.

--
-------
Bryan Butler
bbutler@netcom.com
