home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / ada / 2162 < prev    next >
Encoding:
Text File  |  1992-07-21  |  2.2 KB  |  51 lines

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