Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 SMI; site sun.uucp Path: utzoo!linus!decvax!decwrl!sun!shannon From: shannon@sun.uucp (Bill Shannon) Newsgroups: net.unix-wizards Subject: Re: unix & real time -- is a rewritten UNIX still UNIX? Message-ID: <1792@sun.uucp> Date: Tue, 13-Nov-84 15:57:08 EST Article-I.D.: sun.1792 Posted: Tue Nov 13 15:57:08 1984 Date-Received: Fri, 16-Nov-84 00:47:05 EST References: <39@uwvax.UUCP>, <5633@brl-tgr.ARPA> <9785@watmath.UUCP> <5727@brl-tgr.ARPA> Organization: Sun Microsystems, Inc. Lines: 31 To most people, real-time means guaranteed maximum response time to interrupts. With UNIX's use of spl's to provide critical sections, it is hard enough just reducing the time spent at high priority, let alone guaranteeing that you'll only be at high priority for some maximum time considering all the possible unanticipated combinations of critical sections calling critical sections being interrupted by higher priority devices calling who knows what. Everyone has to cooperate to keep the interrupt response time as low as possible. Right from the start UNIX is not cooperating. A good example of real-time requirements in many newer UNIX systems is being able to handle 9600 baud asynchronous input with little or no hardware buffering. On the Sun our approach to guaranteeing that we could service the interrupt as soon as possible was to make the UARTs interrupt at a priority higher than the system used for anything else, even the clock. The interrupt routine does the absolute minimum amount of processing, just reading the character and saving it away in a buffer in memory and triggering a software interrupt at a lower priority to actually process the character. VMS takes a similar, but more general, approach to the problem. On VMS the interrupt routines save away only the absolute minimum amount of state for the device and reschedule a lower priority "process" to handle the interrupt. It's often possible to construct a special version of UNIX to solve a specific real-time problem but it's much more work to restructure the system so that a general solution to a whole class of real-time problems is possible. Bill Shannon