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