Path: utzoo!attcan!uunet!nih-csl!lhc!ncifcrf!haven!uflorida!rex!wuarchive!decwrl!elroy.jpl.nasa.gov!ames!coherent!next!gk From: gk@next.com (Gregg Kellogg) Newsgroups: comp.sys.next Subject: Re: Can the NeXT do real time A/D? Keywords: NeXT, Realtime Message-ID: <259@next.com> Date: 10 Oct 90 01:03:39 GMT References: <1990Sep27.222026.18112@wam.umd.edu> Reply-To: gk@NeXT.COM (Gregg Kellogg) Organization: NeXT, Inc. Lines: 35 In article <1990Sep27.222026.18112@wam.umd.edu> rgc@wam.umd.edu (Ross Garrett Cutler) writes: >Hello, >The subject says it all...does the NeXT support real time A/D acquisition? >If so, do you do it at the DSP level (since Mach, I believe, doesn't >provide priority-driven pre-emptive task scheduling, as does QNX for example)? >Thanks much for any info! >-- >Please email -- I'll summarize. >Ross Cutler >University of Maryland, College Park >Internet: rgc@wam.umd.edu Most A/D acquisition is done using the DSP on NeXT. The DSP provides a great realtime environment allowing you full access to it's serial port and quite a bit of processing power. Higher-level, less time critical software is then done on the 68000. Doing this, we're able to sustain some pretty good rates of data I/O with the DSP processing each byte that's sent or received. Mach does in fact to priority-driven pre-emptive task scheduling, as do almost all versions of UNIX that I've ever worked with. The problem is that UNIX kernels tend to spend a lot of time in the kernel where they're not preemptable. Some versions of UNIX have fixed this, but it's an inherently hard problem given the structure of the UNIX kernel. Most realtime systems on the market don't do kernel preemption either, they just ensure that they don't spend more than a fixed amount of time in the kernel. In my opinion, this is the answer for Mach as well. Many groups are moving to a "pure" or "micro" kernel, in which the UNIX functionality is contained in a user-level task (or tasks). This may not help tasks that need to serialize through the compatibility task, but it does allow you to create an environment in which you can control this, by simply not relying on UNIX services in you time-critical task. Gregg