TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: ALL
from: IVAN TODOROSKI
date: 1998-11-13 00:36:00
subject: PM drawing priorities...

What really made me do all that experimenting with priorities
  described in the previous message has to do with the priority of PM
  operations.

  I noticed recently (and I wonder how I never noticed it before) that
  when you drag a bigger sized window accross the desktop (with full
  window dragging enabled) most applications in the background simply
  stop. Try typing DIR /S in an OS/2 command window and drag the window
  around... you'll notice how the listing stops while you're dragging
  it. Same happens if you drag other windows.

  But if instead of the OS/2 window you start another PM program which
  draws repeatedly on the screen (like an animated gif viewer, or
  animation viewer), you'll notice that it doesn't stop when you drag
  its window or other windows around (looks very impressive). So, once
  again we come down to the question of priorities.

  It seems that no matter what the priority of the PM program is, when
  it calls a PM API for drawing to the screen or message processing, the
  API call seems to execute at a higher priority than the calling
  process, which seems kind of strange to me.

  So, I tried once again to measure the priority of PM drawing
  operations, and guess what?

  It falls RIGHT BETWEEN 0x41F (Foreground Server, level 31) and 0x300
  (Time Critical, level 0), just like the foreground priority boost.

  So, this means that either your programs will stop running when you
  drag windows around (or when some other PM program does extensive
  screen I/O) which is very bad for communications programs etc, or
  you'll be forced to run them at Time Critical priority to prevent
  this, which isn't a good idea either because you can easily hang your
  system that way, and what's more, you'll have to use third party
  utilities, because OS/2 does not provide any means to start programs
  at given priority out of the box.

  If only there was a "Startup priority" spin-box somewhere in the
  WPProgram's properties notebook...

  To test this, start some not very CPU consuming text mode program (I
  use "ping localhost") in a window and start draging a biger window
  with full-window draging enabled.

  If you run the ping process at any lower priority than Time Critical
  (doesn't matter if it's Regular, Idle, or Foreground Server) you'll
  notice it stops while you're draging the window, while if you run it
  at Time Critical, you'll notice that it multitasks pretty smoothly.

  So, this poses several questions:

   1) Why do PM operations run at a different priority than the calling
      program?

   2) Where exactly is the code for these operations located?
      PMSHELL.EXE, the PM*.DLL libraries, where?

   3) Is it possible to adjust the priority of these operations so that
      they run at 0x200? (this is the only way to prevent the background
      programs from stoping when doing heavy PM screen I/O)

  Regarding the 3rd question, I tried changing the priorities of the
  threads of the second instance of PMSHELL.EXE (Process Commander
  wouldn't touch the first instance), but it didn't have any effect on
  the drawing operations (or any other operation for that matter).

  As a final note, I tried this on a Win98 system at my friend's home,
  and when you type DIR /S and move the window (or move other windows)
  with full window draging, the listing of directories doesn't stop, and
  behaves just as you would expect (slows down a little). It looks
  rather nice when you move the window with directories scrolling by in
  it.

  Although Win98 is very messy, unstable, and inconsistent, its choice
  of assigning priorities to various operations is MUCH BETTER! That is,
  if Win98 actually HAS any priority assignment to processes...

  I would appreciate very much if someone could answer to all these
  questions, especially the one about manipulating the priorities of PM
  drawing operations.

  I have also XFree86/OS2 installed (the GNU X Windowing environment
  ported to OS/2), and it has a completely separate graphics subsystem
  built on top of the base OS/2 API (doesn't use the PM API), and it
  also has a much better distribution of priorities, i.e. programs in
  the background don't stop when you drag windows around.

     And it is also much better in one other respect, completely
     unrelated to priorities, which is the subject of my next message.

                                                            - Ivan -

.!. Winerr 011 - Orwell Not Found; You Must Use MSN
--- 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/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™.