home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / realtime / 1483 < prev    next >
Encoding:
Text File  |  1992-12-28  |  2.2 KB  |  49 lines

  1. Newsgroups: comp.realtime
  2. Path: sparky!uunet!gatech!destroyer!cs.ubc.ca!newsserver.sfu.ca!toseyb
  3. From: toseyb@fraser.sfu.ca (Joseph Robert Tosey)
  4. Subject: Re: Real_time systems
  5. Message-ID: <1992Dec28.185035.17186@sfu.ca>
  6. Sender: news@sfu.ca
  7. Organization: Simon Fraser University, Burnaby, B.C., Canada
  8. References: <1992Dec22.041024.25911@megadata.mega.oz.au> <Bzy362.zo@quadsys.com>
  9. Date: Mon, 28 Dec 1992 18:50:35 GMT
  10. Lines: 37
  11.  
  12. : I have come to the conclusion that preemption is to be
  13. : avoided *if at all possible*, since it carries a lot of
  14. : baggage with it.
  15.  
  16. I've worked with two proprietary RT OS's, and one which is a hybrid
  17. (half proprietary, that is).  I agree--even for very complex systems,
  18. preemption is undesirable but unavoidable.  We use an unconventional
  19. system to minimize preemption, which I'll summarize below since
  20. there is such interest in this area.
  21.  
  22. We allow (encourage) engineers to create tasks for our application
  23. whenever such makes for a clean design.  As a result, we are currently
  24. running about 500,000 lines of code and 100 - 1000 real time tasks on
  25. a 68030.  Quite simply, we partition the tasks into priorties,
  26. create a single task for each priority (mostly, anyway) and run a loop as
  27. described previously within this task.  Thus hundreds of tasks fold into a
  28. few more than half a dozen 'real' preemptive tasks.
  29.  
  30. The effect is dramatic.  The latency for task switching within a priority
  31. is little more than a procedure call.  No interrupt or switch through
  32. supervisor state required.  Few semaphores or other complex mechanisms are
  33. required, because even our timers run within the same scheme.  The savings
  34. are everywhere.
  35.  
  36. The savings in memory is dramatic too.  Why, given a savings of 300 real
  37. tasks, we save at minimum 300 * 2k/stack = 600k.
  38.  
  39. Thus complexity and cost is way, way down, but we still have the benefit
  40. of preemption in the (rare) situations we need it.
  41.  
  42. By the way, our system provides an application, supports about 16 terminals,
  43. three network (via serial or satellite lines), handles 50 phone calls
  44. per second and supports a database of 500,000 subscriber records.
  45.  
  46. Not bad for a 68030.  The clincher is that we have enough ummph in the
  47. system and soft deadlines to boot, so we've never had to do any sort of
  48. technical scheduling analysis.
  49.