Real time unix

Steve Nuchia steve at nuchat.UUCP
Sat Jul 28 10:31:13 AEST 1990


In article <LARRY.90Jul27140311 at focsys.uucp> larry at focsys.uucp (Larry Williamson) writes:
>An excellent package is produced by VenturCom in the US. They use

Excellence is in the eye of the beholder.  It does work, but
you should really be very careful using it for "hard" realtime.
For soft realtime it has everything you should need.  The dividing
line here seems to be about 500 usec.

>Interactive's Unix (2.0.2) as the basis and then add a driver and
>modify a couple of kernel functions to provide the real time response.

Bzzzzt.  They change the scheduler and add a filesystem, they change
the way supervisor/user mode is handled, though I'm not sufficiently
imtimate with the 386 to guess how.  They claim to have diddled the
spl mechanism, and a few other things, in addition to their driver
and dozen or so new system calls (which actually multiplex through
a single trap, but so what?)

>They call their system RTX (They may have recently started to call it
>Venix/386, but I'm not sure).

The product name seems to be venix, the shorthand form seems
to be rtx (ie, #include <rtx.h>).  Seems to be in transition.

>Some additional features they have included are:
>. millisecond timers

Millisecond resolution in the program interface spefication,
actual resolution is 10 ms (HZ=100) and discoverable through
one of their calls.

>. direct physical memory access from user processes
>. direct io port access from user processes

They appear to just hand over supervisor mode to the user task,
you have to be (effectively) root to turn it on, then you can setuid.

>. Very fast interrupt response time

Uhm, they may have sped it up some but I wasn't that impressed.

>. Memory locking

The memory locking call also allows you to pre-allocate both data
and stack space which brk and sbrk then play around in as you
might hope.  Semantics when brking past the preallocated part
are reasonable, but semantics with respect to shared memory are
unspecified.

>. Real time synchronization

Not sure what you or they mean by this.  They allow you to use
a fixed-priority scheduler, which has a specified discipline to
yield round-robin fasion to other processes at the same level.
They also have a cpu-fraction scheduling feature, implementing
approximately standard nice(2) semantics within scheduling groups,
and fractional distribution between groups.  The proportional
scheduler's policies with regard to balancing long-term and
short-term usage are not specified, and in fact its semantics are
not well defined at all.  Normal processes are scheduled in the
"default group", which by default has 100% of the cpu
(after fixed-priority tasks get done with it).  Flexible enough,
but I haven't needed it so haven't actually wrung it out.

>. Asynchronous I/O

Only for driver that have been modified to support it.  The required
modifications appear to be straightforward, but (at the risk of
flaggelating a not-altogether-healty horse) not well documented.

>. High performance file system

So far this doesn't look like much of a win, especially since
it has some really unfortunate semantics.  Like you can't use
cp(1) to copy files in it ...   If you need to get closer to
the raw disk throughput than you can get with asynch io to
a normal file, you should probably buy a faster disk subsystem.

>We have had no compatiblity problems with any application we've run
>with this system. It is as pure Interactive Unix System V 3.2 as you
>can get.

Until you turn on the real-time features you can't tell the difference.

>They have some excellent documentation on performance metrics for
>their system. 

I dissagree, violently.  As has become customary, they tell
you almost everything you might care to know about syntax,
and almost nothing about semantics.

Their performance puff-piece has some gaping holes.  If you really
need relaible real-time performance you *must* avoid doing/using
certain things, and they don't do a very good job of enumerating them.

I won't bore you with the list, because a) it's at a client shop and
b) if you need that kind of performance I trust you're smart enough
to read between the lines yourself.

Their "excellent documentation" appears to consist of the half-crate
from Interactive plus a ~100 page pamplet attempting to document
their additions/changes, a small stack of "release notes" correcting
and updating that pamplet, and the afore-mentioned puff piece.

In conclusion:

If you have a "real-time" job to do and it doesn't demand real
iron and real software, this stuff is pretty good.  It adds the
few things you are likelty to really need, and it adds them
inobtrusively.  I would never use it for a safety-critical system
in which sub-milisecond deterministic response was required, but
it is well-suited to a very large class of tasks for which raw
interactive is not.
-- 
Steve Nuchia	      South Coast Computing Services      (713) 964-2462
"To learn which questions are unanswerable, and _not_to_answer_them;
this skill is most needful in times of stress and darkness."
		Ursula LeGuin, _The_Left_Hand_of_Darkness_



More information about the Comp.unix.i386 mailing list