home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!think.com!linus!linus.mitre.org!linus!mbunix!eachus
- From: eachus@Dr_No.mitre.org (Robert I. Eachus)
- Subject: Re: 1 millisecond tasking on a Mips
- In-Reply-To: elliottm@beach.csulb.edu's message of 18 Jul 92 05:59:58 GMT
- Message-ID: <EACHUS.92Jul21142228@Dr_No.mitre.org>
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: dr_no.mitre.org
- Organization: The Mitre Corp., Bedford, MA.
- References: <ELLIOTTM.92Jul17225954@beach.csulb.edu>
- Date: Tue, 21 Jul 1992 19:22:28 GMT
- Lines: 37
-
-
- In article <ELLIOTTM.92Jul17225954@beach.csulb.edu> elliottm@beach.csulb.edu (Elliot Michael) writes:
-
- We are considering an embedded application in Ada, running on a Mips
- chip (speed yet unspecified) which will require at least one task to
- be run at 1 KHz. Is this reasonable? I've heard lots of rumors about
- how much overhead is involved in Ada tasking.
-
- Is it possible? Yes, but the issue is the design of the underlying
- hardware and run-time environment.--I assume you are not going to use
- Unix. Some run-times (and processor designs) do allow task switches
- in about 20 microseconds.
-
- Is it a good idea? Probably not. If you really do have a
- requirement to do some (simple) operation every millisecond, put it in
- an interrupt handler. If the task is more complex, dedicate a
- processor. With modern chip architectures caching and data
- consistency overheads can kill you outside the actual task switch
- times. For example, if an interrupt handler needs to flush the cache,
- the distributed cost of reloading the cache--incurred by all running
- tasks--may overwhelm any other cost associated with the interrupt
- processing.
-
- Of course, none of this is really specific to Ada, and that is
- really my point. Current Ada compilers add little unnecessary
- overhead to the services provided by the hardware and run-time
- environment. (The necessary overhead occurs when exiting a scope
- which has dependent tasks, but that should never happen in real-time
- code ohter than during system shutdown.)
-
- --
-
- Robert I. Eachus
-
- with STANDARD_DISCLAIMER;
- use STANDARD_DISCLAIMER;
- function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
-