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!news.duke.edu!news-feed-1.peachnet.edu!gatech!howland.reston.ans.net!spool.mu.edu!sgiblab!munnari.oz.au!cs.mu.OZ.AU!eric!bernie
From: bernie@ecr.mu.OZ.AU (Bernie Kirby)
Subject: Real-time systems:  Windows-NT or QNX
Message-ID: <FriOct14102309EST1994@eric>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
Date: Fri, 14 Oct 1994 00:23:09 GMT
Lines: 99
Xref: glinda.oz.cs.cmu.edu comp.realtime:7109 comp.os.qnx:2181 comp.os.ms-windows.advocacy:40265 comp.robotics:14326

Greetings Fellow Netters,

I am currently charged with the task of investigating and comparing
different operating systems for the development of a real-time robot
controller. I'm new to the problems associated with robot control so I'm
rather confused about what is required from an operating system for this
type of work, but I think the broad specifications should be fairly common
to a wide variety of real-time controller situations. The first thing is
it must run on an IBM PC so this rules out systems based on other
architectures like VxWorks.  The second point is that we're doing the work
for a company who is trying to develop this work commercially so we'd
prefer a commercial system so they'd have someone to blame when things go
wrong.  Third the system should be able to run multiple tasks so I guess
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.

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.

In essence what we want to do is run a variety of tasks some at very regular
intervals, so for these determinacy is a key issue, and others
when certain events take place such as a key-hit. Each of these tasks might
correspond to a conceptual level in the controller. We will be dealing
with the control task from very low levels to high levels. At the very
lowest levels will be control loops such as PID loops for robot joints.
Force control will be at the next level and trajectory generation at a
higher level and so on. The highest level would be a graphical user
interface of some type though its not quite clear what is required at that
level. The lowest levels (PID loops and force control loops) would be the
most important parts of the system so they would have to get priority.
They need to run at rates between 1000 to 2000 Hz so I suppose accurate
facilities for timing are needed. Should these tasks run inside interrupts
connected to a clock or should they run as separate tasks?  Is it best
to have a rate generator board or can be the PC's clock be used?

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).  Is "preemption" a good strategy for this type problem? I
guess it must take some time for tasks to be swapped back to the processor
so that must be a key-factor, though if I run my servo-loops as interrupt
service routines that surely would be the overcome any problems  with
context switching times. Are there any disadvantages of the interrupt
service routine approach. I'd sure be interested to know what people think
is the most sensible strategy for doing this type of real-time
programming. Robustness is an important consideration so bearing this in
mind which scheduling approach is best suited to our problem.

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?

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
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) so how close is QNX to windows in
this area?

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.

QNX calls isself a real-time operating system whereas Windows and Windows
NT seem to be much more general and broader operating systems that provide
facilities for real time control. Is is better to go for the generality
wide spread applicability and large software base of Windows or do you
think that QNX is better suited for the type of work we intend to do?  Of
course almost everyone uses windows to some extent or another but I want
to know which system is the best all-round choice for real-time control
where the controller must also run a graphical user interface. I would
really like to know the pros and cons of each system and whether there is
general consensus that one is better than the other. I have an open mind
but I don't have the experience necessary to make the best decision.  So
in summary what I'm asking is which operating system is better for the
work we are going to do. Does anyone else  use either of these operating
systems for real-time control of robots.

Any thoughts what-so-ever would be greatly appreciated.

Bernie.
