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