home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / os2 / misc / 37161 < prev    next >
Encoding:
Text File  |  1992-11-20  |  1.9 KB  |  47 lines

  1. Newsgroups: comp.os.os2.misc
  2. Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!eagle!lims01.lerc.nasa.gov!smbrush
  3. From: smbrush@lims01.lerc.nasa.gov (Andy Brush @Sverdrup)
  4. Subject: Re: How do I set priority
  5. Message-ID: <20NOV199208290470@lims01.lerc.nasa.gov>
  6. News-Software: VAX/VMS VNEWS 1.41    
  7. Sender: news@eagle.lerc.nasa.gov
  8. Nntp-Posting-Host: lims01.lerc.nasa.gov
  9. Organization: NASA Lewis Research Center
  10. References: <oDLiuB1w165w@tcscs.UUCP>
  11. Date: 20 Nov 1992 08:29 EST  
  12. Lines: 33
  13.  
  14. In article <oDLiuB1w165w@tcscs.UUCP>, zeta%tcscs@src.honeywell.com writes...
  15. >What I needto find out is how to set the priority of programs.
  16. The only way *I* know of is to start the programs from within a "C"
  17. program.  If you call DosSetPriority() from a process, then all the 
  18. subsequent threads and DosExecPgm()'s will be at the priority specified.  
  19. Further, the parent process is allowed to re-set the child's priority later
  20. , unless the child sets its own priority.
  21.  
  22. There are two ways I have considered approaching this:
  23.  
  24. 1)  Write a dedicated C program for starting a particular application at a 
  25. certain priority.  I then associate the program with the application's Icon
  26.   I have done this, and it works.  You can't re-set the app's priority 
  27. later, because the parent has exited, and you can only re-prioritize 
  28. decendant processes.
  29.  
  30. 2)  Write a "shell-within-the-WPS-shell" which you then use to start 
  31. applications.  I haven't done this yet, but I'm thinking that this would 
  32. permit later tuning of the default priorities of the processes started by 
  33. the mini-shell.
  34.  
  35. I have seen ads for a product for 1.3 that looked a lot like the solution 
  36. in 2).  I don't know if it is available for OS/2 2.0, or who was selling 
  37. the product.
  38.  
  39. Good Luck!
  40.  
  41. Andrew S. Brush             | SMBRUSH@LIMS01.lerc.nasa.gov
  42. Sverdrup Technology         | 2001 Aerospace Parkway
  43. NASA LeRC Group             | Brook Park, OH 44142
  44. "Opinions are Mine, Only"   | (216) 826-6770
  45.