[comp.sys.next] Realtime?

rw2w+@andrew.cmu.edu (Robert William Weiman) (11/02/90)

I work on a psychology-experiment running on the Macintosh. Realtime
is a must (and Mac realtime is close enough without doing too much
to the system, :->). UNIX machines are not known for their realtime 
processing in general. Can the NeXT be used for realtime processing?

Thanks,
Matthew
(I know - it says "Robert..."; it's a mild personality disorder,
 but I've accepted it and I know I'll pull through......)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|Internet:                 | May I introduce myself?                        |
|     rw2w@andrew.cmu.edu  | I'm the prince of fools.                       |
|BITnet: rw2w@cmuccvma     | The question is, whose fool are you?           |
|UUCP: Who knows??         |   - Kerry Livgren/AD                           |
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

dennisg@kgw2.bwi.WEC.COM (Dennis Glatting) (11/03/90)

In article <EbA5mgi00WBNE26LUF@andrew.cmu.edu>, rw2w+@andrew.cmu.edu (Robert William Weiman) writes:
|> I work on a psychology-experiment running on the Macintosh. Realtime
|> is a must (and Mac realtime is close enough without doing too much
|> to the system, :->). UNIX machines are not known for their realtime 
|> processing in general. Can the NeXT be used for realtime processing?
|> 
|> Thanks,
|> Matthew

ah, a subject to which i can reply.  i've written software over 13 years and
have authored several RT OSs.  my current project includes two NeXT cubes 
in a redundent configuration communicating with several satellite transceivers.

first question.  what is real time?  2 sec?  100mS?  1mS?
in many machines of which NeXT is classified there is no garenteed response
time.  the question becomes "what is good enough".  for example, in my system
i offloaded the serial interface to my transceivers to an external terminal
server.  it got all of those nasty character interrupts and handled the
hardware handshaking.  as long as my processes responded to a request within
10 sec everything was fine.  my protocol was such that the 10 sec response
had to be "i got it.  hold tight.".

there was one communications task to serial port on the terminal server.  
therefore there were several copies of this task.  threads you say!  well in
each task there were multiple threads and a thread was forked for every
serial sequence received.  (seperate tasks were used for "special" 
requirements of the assigned port which were configured with command line
parameters.)

these tasks were simply protocol management tasks.  they interfaced with a higher
entity which interfaced with a higher entity.

lots of tasks were written for this system.  31 unique apps with four ported
from other sources.

so, as you can see, my system is somewhat complex and has a lot of work to 
do.  my design was such that the time critical functions were off-loaded to
other hardware, terminal servers, custom hardware for satellite communications,
etc.  in its heaviest loading i found the system quite responsive (especially
with all the database work it was doing).

so what is real-time?  can the time-critical tasks be offloaded to i/o
products available for the NeXT or must the NeXT be time critical?  if the
NeXT must be time critical then you must go to a custom OS which implies
semi-custom hardware (plug-and-play vme boards for example).

one such os that runs on PC hardware is QNX.  i dumped it for Mach and NeXT.
i don't recommend it.


--
 ..!uunet!kgw2!dennisg      | Dennis P. Glatting
 dennisg@kgw2.bwi.WEC.COM   | X2NeXT developer