home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / misc / 27365 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  2.9 KB

  1. Xref: sparky comp.os.os2.misc:27365 comp.os.os2.programmer:4218
  2. Path: sparky!uunet!usc!sdd.hp.com!swrinde!ringer!mlevis
  3. From: mlevis@ringer.cs.utsa.edu (Mike Levis)
  4. Newsgroups: comp.os.os2.misc,comp.os.os2.programmer
  5. Subject: Re: Request for info about kernel pre-emption and priorities
  6. Message-ID: <1992Aug14.072549.22915@ringer.cs.utsa.edu>
  7. Date: 14 Aug 92 07:25:49 GMT
  8. References: <1992Aug13.221616.7894@ttinews.tti.com> <1992Aug14.054245.25657@nuscc.nus.sg>
  9. Organization: University of Texas at San Antonio
  10. Lines: 54
  11.  
  12. In article <1992Aug14.054245.25657@nuscc.nus.sg> eletanjm@nuscc.nus.sg (TAN JIN MENG) writes:
  13. >terence@tanru.tti.com ( Terry) writes:
  14. >: I looked in my copy of "The Design of OS/2" for the answers to the
  15. >: aforementioned questions and learned a number of things, including that
  16. >: the kernel is indeed non-preemptible but can be interrupted.  Also, that
  17. >                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  18. >HUH? explicate please ...?
  19. >Do you mean that the kernel can receive interruptsss but delays the task
  20. >wakeup until the current kernel task finishes?
  21.  
  22. Pages 134 and 135 of _The Design of OS/2_ discuss this.
  23. When a time-critical thread is ready to run, the thread in
  24. the kernel yields the processor (but only at certain places
  25. in the kernel, see below).  The yielding thread receives
  26. control of the processor again after all the time-critical
  27. thread(s) have completed, since OS/2 gives the yielding thread
  28. a priority just below the lowest time-critical thread.
  29.  
  30. Actually, the OS/2 kernel is voluntarily preemptable (rather
  31. than non-preemptible).  The thread in the kernel can be
  32. preempted by time-critical threads *at certain places in the
  33. kernel* (interrupted), but it cannot be preempted by other
  34. (non-time-critical) threads.
  35.  
  36. IBM is working on making the kernel to be fully preemptible
  37. (reentrant).  Since this would allow preemption *anywhere* in
  38. the kernel, a thread in the kernel would be allowed to be
  39. preempted by any thread (time-critical or not), and allow
  40. multiple threads in the kernel.
  41.  
  42. >: process can have their priority boosted under different conditions.
  43. >: Another question we had concerning real-time issues was answered:
  44. >: Time-critical tasks have a maximum reschedule time of 6 ms after they're
  45. >: ready to run.  This was also important to us.
  46. >
  47. >6ms to reschedule a time critical task? Seems a little high to me - or
  48. >is this timing related to the fact that the kernel is non preemptible?
  49.  
  50. Actually, my copy of _The Design of OS/2_ says 4ms (not 6ms).
  51.  
  52. Most of the kernel is designed so threads can complete rapidly.
  53. But parts of the kernel are time consuming.  These areas are
  54. designed so that they voluntarily yield the processor to
  55. time-critical threads (if any).  See my statements above for
  56. the details.
  57.  
  58. >jin meng
  59.  
  60.  
  61. -- 
  62. ==== Mike Levis   mlevis@ringer.cs.utsa.edu ====
  63. ::   ftp ftp.cs.widener.edu (147.31.254.132)  ::  .--.
  64. ::   for ``The Simpsons'' information.  Get   :: (OS/2)
  65. :::: ``Simpsons'' FAQL in dir /pub/simpsons ::::  ~--~
  66.