| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Poking inside the kernel |
On Friday, 27 November 1998,
DENIS TONN wrote to IVAN TODOROSKI about Poking inside the kernel
IT>> 1)
IT>> PRIORITY=ABSOLUTE
IT>> PMSHELL thread priorities: default
IT>> OS/2 kernel: unmodified
IT>>
IT>> Dragging windows around freezes other applications. It seems there is
IT>> a boost applied, even though priority is set to ABSOLUTE.
DT> I doubt it. I suspect what you are seeing here is related to the
DT> non-preemtable portions of the driver.
DT> I have looked at the internal priorities when PRIORITY=ABSOLUTE, and
DT> they never change except under application control. The scheduler will
DT> do a pure "look for the highest priority, ready to run" thread, an
DT> dispatch it.
DT> Keep in mind that the PM "drawing thread" will be
involved here, and
DT> it may have a higher priority.
Well I tried to do my best to isolate and take into consideration all
these effects.
Just consider the following results:
In all cases the priority of the PMSHELL threads was set to Regular,
delta 0 (checked, re-checked, triple-checked), so this source is
eliminated.
Non-preemptivity of driver operations has no observable effect here
because if you raise the priority of the background process to Time
Critical it won't freeze, it WON'T EVEN SLOW DOWN, not even a little,
when you drag other windows around. So some portions of the redrawing
of the window surely are non-preemptive, but they're so finegrained
that the effect is negligible. If the non-preemptivity of driver
operations was the major reason for this freezing, then changing the
priority of the background process would not have changed a thing, but
it did.
So, what did I do?
Remember, all threads of PMSHELL.EXE are set to Regular, delta 0 in
the following experiments.
1) Default kernel, PRIORITY=ABSOLUTE
Applications freeze when you drag windows around.
2) Default kernel, PRIORITY=DYNAMIC
Applications freeze when you drag windows around.
3) "Flat" kernel, PRIORITY=ABSOLUTE
Applications freeze when you drag windows around.
4) "Flat" kernel, PRIORITY=DYNAMIC
Applications *DON'T* freeze when you drag windows around.
What conclusions would you draw from this?
IT>> The conclusion is that PM drawing operations get a priority boost,
IT>> even when PRIORITY=ABSOLUTE, and that's why they run at higher
IT>> priority than the calling program.
DT> No, the PM drawing threads do NOT get "boosted". They
may be setting
DT> themselves to a higher level (temporarily) or passing off the work to
DT> high priority threads (more likely), but they are NOT boosted with
DT> PRIORITY=ABSOLUTE.
Maybe so, maybe it's not an actual "boost", but all other things being
equal, drawing operations do have a higher priority in case 1) then in
case 4) above. So cases 1) and 4) are not totally equivalent, which
means that setting PRIORITY=ABSOLUTE is NOT the same as "flattening"
the kernel priority table. How else could these 4 experiments be
explained?
DT> Your experiments in this area are doing more to expose the behaviour
DT> of PM and the graphics driver than they are in exposing the behaviour
DT> of priority adjustment. Keep this FIRMLY in mind with the above "test
DT> scenerio".
DT> If you wish to actually play with testing the priority boosting of
DT> the kernel, you need to eliminate these variables from your
DT> experiments.
Well ALL things are equal, only things that are varied is the PRIORITY
setting and the kernel priority table.
And I did some of those tests with applications and threads you
proposed (I was using OREXX, not C, but it souldn't matter, since
OREXX has a RexxUtil function to set the priority), and everything
works absolutely as expected, there seem to be no anomalies in the
priority scheduler, which puzzles me even more!
I would be extremely interested in your educated guess about the
reason for case 4) above.
P.S. I checked out the IBM Developers site. Now there is one cool site!
I downloaded something called "OS/2 Debugging Handbook" last night.
Hope it's the right one... Gonna go read it later tonight, thanks
for the tip!
- Ivan -
.!. As I said before, I never repeat myself.
--- Terminate 5.00/Pro [OS/2]
þ TerMail/QWK þ
* Origin: GET ALL YOUR FIDO HERE! telnet://bbs.docsplace.org (1:3603/140)SEEN-BY: 396/1 632/0 371 633/260 267 270 371 635/444 506 728 639/252 670/218 @PATH: 3603/140 396/1 633/260 635/506 728 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.