TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: DENIS TONN
from: IVAN TODOROSKI
date: 1998-11-23 21:15:00
subject: Poking inside the kernel

YESSS!!! Thanks man! By poking that priority table inside the kernel I
  finaly managed to change the priorities of PM drawing, and now my
  applications don't freeze when I drag windows around! Cool...

  But, by doing that, I also lost some things. :(

  So, to make a long story short, I'll just sumarize the result of my
  experiments, and try to draw some conclusions...

1)
  PRIORITY=ABSOLUTE
  PMSHELL thread priorities: default
  OS/2 kernel: unmodified

  Dragging windows around freezes other applications. It seems there is
  a boost applied, even though priority is set to ABSOLUTE.


  No change.

2)
  PRIORITY=DYNAMIC
  PMSHELL thread priorities: default
  OS/2 kernel: unmodified

  Same as the above.

3) (Now this is interesting)
 PRIORITY=DYNAMIC
 PMSHELL thread priorities: default
 OS/2 kernel: *modified*

  The kernel modification is the simplest one I could think of.
  I changed the priority table to look like this:

+----------------------------------------------------------------------+
|Starved         08 --------------------------------------------------+|
|Device I/O      10 -------------------------------------------------+||
|Foreground      20 ------------------------------------------------+|||
|Window          40 -----------------------------------------------+||||
|VDM Interrupt   80 ----------------------------------------------+|||||
|============================================================     ||||||
|Not Keyboard (04)             | Keyboard (04)                    ||||||
|Server  Idle    Regular TC    | Server  Idle    Regular TC       IWFDS|
|0x300,  0x100,  0x200,  0x800,| 0x300,  0x100,  0x200,  0x800,// -----|
|0x300,  0x100,  0x200,  0x800,| 0x300,  0x100,  0x200,  0x800,// ----S|
|0x300,  0x100,  0x200,  0x800,| 0x300,  0x100,  0x200,  0x800,// ---D-|
|0x300,  0x100,  0x200,  0x800,| 0x300,  0x100,  0x200,  0x800,// ---DS|
|0x300,  0x100,  0x200,  0x800,| 0x300,  0x100,  0x200,  0x800,// --F--|

   ..... etc.

 IOW, I made every row in the table exactly the same as the first, thus
 eliminating EVERY priority boost. You may think that this is the same
 as PRIORITY=ABSOLUTE (I did at first), but it is not so.

  When I drag application windows around (not WPS windows like folders,
  properties notebooks etc), other applications don't freeze anymore,
  but simply slow down, which is the behavior I expect. So far so
  good...

  But when I tried to drag WPS windows, even small folders, applications
  froze again... :(

  Application windows didn't manifest this type of behaviour, and the
  applications to which they belonged had Regular, delta 0 priorities.
  It was obvious that no boosts are being applied, so I concluded that
  the reason for this is within PMSHELL.EXE. Many of its threads run at
  Server and TimeCritical priority.

PMSHELL thread priorities: changed to regular, delta 0

  I changed the priority of all the threads in PMSHELL.EXE (second
  instance) to Regular, delta 0 (thread #2 could not be changed,
  because it was constantly reseting its priority to Time Critical,
  delta 31). And that finaly did it!

  Now everything works OK. Application don't stop when I drag windows
  around, although they slow down noriceably (but this is to be
  expected)!

  The conclusion is that PM drawing operations get a priority boost,
  even when PRIORITY=ABSOLUTE, and that's why they run at higher
  priority than the calling program.

  One can argue that this is because the window you're dragging is in
  the foreground, and that it is actually the foreground boost that is
  causing this, but at PRIORITY=ABSOLUTE there is no foreground boost,
  and yet applications freeze when a window is dragged.

  I guess that this misterous boost may be that "window boost" you
  described... I'll try to devise a pattern of modifying the priority
  table in such a way that will eliminate ONLY the window boost, and
  leave all other boosts intact, and see if this will have any effect.

  I'm more or less satisfied with the way my system operates now, and I
  plan to stick with this modified version of my kernel.

  But, I'm feeling a bit uneasy because I also lost all the other
  boosts... I'll fiddle around with it some more, to see if I can be
  more selective about which boosts to eliminate. I'll notify you if I
  succeed. If you're interested, of course.

                                                            - Ivan -

.!. If it ain't broke, you can probably still fix it!
--- 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™.