Priority Questions

Hello,
I have an applicatoin that is composed of three processes–a real time
data acqusition process, a user interface process, and a graphical
display process. The system runs with the real time process priority
set high, the user interface set at the shell priority, and the
graphical display set at the shell priority -1. The graphical display
and user interface processes both use Photon (1.14, QNX 4).

The high priority data acquisition process runs for a small amount of
time on every acquisition interrupt. The user interface runs when the
user interacts with the interface, and the graphic display process
uses most of the cpu cycles continuiously updating the display. This
all works fine. Good user interface response, good hardware
servicing, etc. If the graphical display gets behind, it can figure
out how to catch up (calling PtFlush() less etc.).

This doesn’t work so well when other users - via telnet, ftp, etc.
interact with the system. Their processes (running at shell priority)
slow the graphical process way down (it is at a lower priority).

I have tried one strategy to fix this: I have raised the priority of
my user interface process and graphical display process by two. Now
the user interface runs at 12, the graphical at 11 and the real time
at 20+. Initially, this didn’t work because I hadn’t raised Photon,
the graphic drivers, pwm, pdm, input etc. When I raised all of these
routines by two priority units, everything worked as I wanted. My
routines worked fine, all other users got the left over cpu cycles.
This is what I want.

One problem here is that if there are problems with my system, I
cannot slay it, as shells won’t get any cpu cycles (lower than my
system priorities). Also, raising the priorities of all these system
routines is somewhat clumbsy from a programming point of view.

Another option would be to lower the priorities of shells created by
telnet, ftp, etc. How would one do this?

Is there a way to have a particular account logon with a higher (or
lower) priority–that way I could have a account to log on to kill
problematic routines with priorities of 12. Or, only certain accounts
would get priority 10.

Any thoughts on how one might do this.

Thanks,
Greg Laird

“Greg Laird” <glaird@teleport.com> wrote in message
news:3a849052.38852839@inn.qnx.com

Hello,
I have an applicatoin that is composed of three processes–a real time
data acqusition process, a user interface process, and a graphical
display process. The system runs with the real time process priority
set high, the user interface set at the shell priority, and the
graphical display set at the shell priority -1. The graphical display
and user interface processes both use Photon (1.14, QNX 4).

The high priority data acquisition process runs for a small amount of
time on every acquisition interrupt. The user interface runs when the
user interacts with the interface, and the graphic display process
uses most of the cpu cycles continuiously updating the display. This
all works fine. Good user interface response, good hardware
servicing, etc. If the graphical display gets behind, it can figure
out how to catch up (calling PtFlush() less etc.).

This doesn’t work so well when other users - via telnet, ftp, etc.
interact with the system. Their processes (running at shell priority)
slow the graphical process way down (it is at a lower priority).

I have tried one strategy to fix this: I have raised the priority of
my user interface process and graphical display process by two. Now
the user interface runs at 12, the graphical at 11 and the real time
at 20+. Initially, this didn’t work because I hadn’t raised Photon,
the graphic drivers, pwm, pdm, input etc. When I raised all of these
routines by two priority units, everything worked as I wanted. My
routines worked fine, all other users got the left over cpu cycles.
This is what I want.

One problem here is that if there are problems with my system, I
cannot slay it, as shells won’t get any cpu cycles (lower than my
system priorities). Also, raising the priorities of all these system
routines is somewhat clumbsy from a programming point of view.

Another option would be to lower the priorities of shells created by
telnet, ftp, etc. How would one do this?

All theses services are started by inetd and inherit its priority. If
you start inetd at lower priority that will do it.

on -p8 inetd

Is there a way to have a particular account logon with a higher (or
lower) priority–that way I could have a account to log on to kill
problematic routines with priorities of 12. Or, only certain accounts
would get priority 10.

Any thoughts on how one might do this.

Thanks,
Greg Laird

Thanks Mario.

This may be a good solution. I have another question as I try to
understand how this all works:

Is there a way to somehow set the shell priority of particular users
when logging in via phlogin. I have tried replacing the /bin/sh
shell entry in the passwd file with a ‘/usr/bin/hipri’ script that
does an on -p12 /bin/sh.

This works fine when logging in from the console but phlogin will not
accept it (phlogin fails to work at all after the particular user name
with the hipri script is entered).


Thanks again,
Greg Laird


On Sun, 11 Feb 2001 09:29:08 -0500, “Mario Charest”
<mcharest@void_zinformatic.com> wrote:

“Greg Laird” <> glaird@teleport.com> > wrote in message
news:> 3a849052.38852839@inn.qnx.com> …
Hello,
I have an applicatoin that is composed of three processes–a real time
data acqusition process, a user interface process, and a graphical
display process. The system runs with the real time process priority
set high, the user interface set at the shell priority, and the
graphical display set at the shell priority -1. The graphical display
and user interface processes both use Photon (1.14, QNX 4).

The high priority data acquisition process runs for a small amount of
time on every acquisition interrupt. The user interface runs when the
user interacts with the interface, and the graphic display process
uses most of the cpu cycles continuiously updating the display. This
all works fine. Good user interface response, good hardware
servicing, etc. If the graphical display gets behind, it can figure
out how to catch up (calling PtFlush() less etc.).

This doesn’t work so well when other users - via telnet, ftp, etc.
interact with the system. Their processes (running at shell priority)
slow the graphical process way down (it is at a lower priority).

I have tried one strategy to fix this: I have raised the priority of
my user interface process and graphical display process by two. Now
the user interface runs at 12, the graphical at 11 and the real time
at 20+. Initially, this didn’t work because I hadn’t raised Photon,
the graphic drivers, pwm, pdm, input etc. When I raised all of these
routines by two priority units, everything worked as I wanted. My
routines worked fine, all other users got the left over cpu cycles.
This is what I want.

One problem here is that if there are problems with my system, I
cannot slay it, as shells won’t get any cpu cycles (lower than my
system priorities). Also, raising the priorities of all these system
routines is somewhat clumbsy from a programming point of view.

Another option would be to lower the priorities of shells created by
telnet, ftp, etc. How would one do this?

All theses services are started by inetd and inherit its priority. If
you start inetd at lower priority that will do it.

on -p8 inetd


Is there a way to have a particular account logon with a higher (or
lower) priority–that way I could have a account to log on to kill
problematic routines with priorities of 12. Or, only certain accounts
would get priority 10.

Any thoughts on how one might do this.

Thanks,
Greg Laird