Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!agate!ziploc!eps From: eps@toaster.SFSU.EDU (Eric P. Scott) Newsgroups: comp.sys.next Subject: Re: Realtime Mach Message-ID: <1254@toaster.SFSU.EDU> Date: 30 Jan 91 03:14:41 GMT References: <1991Jan29.102439.6966@canon.co.uk> Reply-To: eps@cs.SFSU.EDU (Eric P. Scott) Organization: San Francisco State University Lines: 47 In article <1991Jan29.102439.6966@canon.co.uk> wu@canon.co.uk (Siu-Fan WU) writes: >Is realtime computing possible on the NeXT? I couldn't find anything >in SysRef Chapter 16 (Mach Operating System). This is addressed in NextAnswers os.623, attached. -=EPS=- ------- real time programming Q: What support does the NeXT environment supply for real-time programs? A: NeXT's support for real-time programming is enhanced in 2.0. This capability is also extended by using the DSP as a dedicated, very programmable serial port. Actual real-time performance for code running on the 68030 or 68040 is not guaranteed, because the Mach kernel itself is not preemptable at this point. This topic is a source of continuing work at NeXT, so that we may achieve some guaranteed real-time responsiveness in the future. The primary support in 2.0 for real-time programming is the addition of scheduling policies that can be set on a per-thread basis. We currently have three scheduling policies: POLICY_TIMESHARE for traditional UNIX scheduling, POLICY_INTERACTIVE designed for interactive behavior for applications, and POLICY_FIXEDPRI for non-degrading realtime priorities. Additionally, thread_switch() can be used to do user-level scheduling among a set of threads. The DSP is inherently a real-time programming environment. It is best used for low-level interrupt processing and data reduction/ expansion. It's currently used this way for real-time expansion of sound before it's played, as well as data reduction of input from the DSP serial port. The DSP can then communicate with a Mach task using the Sound/DSP driver interface. The combination of these features makes the NeXT a suitable platform for a wide range of real-time programming tasks. The key is to require no more than 100ms responsiveness from Mach-level programs with a light virtual memory load. In the future we hope to remove the remaining barriers to Mach- level real-time programming by enhancing the scheduler behavior and supporting user-level wiring of virtual memory resources. QA623