Process priority

I’m testing an old system that was written with a set of processes
running at priority 10 that do a lot of polling. They essentially eat
up the machine unless another priority 10 process is started.
I don’t really care that they are eating up the machine(the programs
have since been rewritten to block but there are a couple of systems
that are still running this old code).

My problem is that when I start up ‘more’ or ‘vi’ they never run.
If I run ‘sin’ I find that they are running at priority 9. I’m trying
to figure out how that happens. I expected them to run at priority
10. I’ve seen these programs work in this environment before so
I’m trying to figure out what changed. I have total control over this
machine so I know no one has changed the configuration or the
executables except me. I’ve checked sysinit, etc/profile, and
…profile. I can’t find anything that would alias these programs.
Other programs such as cat and ls work as expected.

Anyone have any ideas what might be going on?

Thanks,
Carlos

I do not have a system here to test but probably more or vi run with
adaptive type process scheduling, and because your other processes are
always ready, the priority of vi or more are “decayed” to 9.

Oscar E. Soto

Control Adaptable SA de CV

Tel:+ 52 (81) 8399-0180
Fax:+ 52 (81) 8399-0162
Cel: +52 (81) 8396-6327
“Carlos Clarke” <carlos@ptdprolog.net> escribió en el mensaje
news:67glg01bk32688a9e5fo7p7f4mtrua4tu0@4ax.com

I’m testing an old system that was written with a set of processes
running at priority 10 that do a lot of polling. They essentially eat
up the machine unless another priority 10 process is started.
I don’t really care that they are eating up the machine(the programs
have since been rewritten to block but there are a couple of systems
that are still running this old code).

My problem is that when I start up ‘more’ or ‘vi’ they never run.
If I run ‘sin’ I find that they are running at priority 9. I’m trying
to figure out how that happens. I expected them to run at priority
10. I’ve seen these programs work in this environment before so
I’m trying to figure out what changed. I have total control over this
machine so I know no one has changed the configuration or the
executables except me. I’ve checked sysinit, etc/profile, and
.profile. I can’t find anything that would alias these programs.
Other programs such as cat and ls work as expected.

Anyone have any ideas what might be going on?

Thanks,
Carlos

That makes sense. On the systems where the processes block
‘more’ stays at priority 10,

I tried an experiment where I ‘reniced’ one process at a time to
priority 9. I found that I had to renice two particular processes
before ‘more’ or ‘vi’ would run. I didn’t expect that. I figured
that if I lowered the priority of all of the processes to 9 that
‘more’ would drop to 8. Is there a limit to how low a process will
drop with adaptive scheduling?

Thanks for the help.
Carlos

On Fri, 30 Jul 2004 17:51:32 -0500, “Oscar E. Soto” <osoto@att.net.mx>
wrote:

I do not have a system here to test but probably more or vi run with
adaptive type process scheduling, and because your other processes are
always ready, the priority of vi or more are “decayed” to 9.

Oscar E. Soto

Control Adaptable SA de CV

Tel:+ 52 (81) 8399-0180
Fax:+ 52 (81) 8399-0162
Cel: +52 (81) 8396-6327
“Carlos Clarke” <> carlos@ptdprolog.net> > escribió en el mensaje
news:> 67glg01bk32688a9e5fo7p7f4mtrua4tu0@4ax.com> …
I’m testing an old system that was written with a set of processes
running at priority 10 that do a lot of polling. They essentially eat
up the machine unless another priority 10 process is started.
I don’t really care that they are eating up the machine(the programs
have since been rewritten to block but there are a couple of systems
that are still running this old code).

My problem is that when I start up ‘more’ or ‘vi’ they never run.
If I run ‘sin’ I find that they are running at priority 9. I’m trying
to figure out how that happens. I expected them to run at priority
10. I’ve seen these programs work in this environment before so
I’m trying to figure out what changed. I have total control over this
machine so I know no one has changed the configuration or the
executables except me. I’ve checked sysinit, etc/profile, and
.profile. I can’t find anything that would alias these programs.
Other programs such as cat and ls work as expected.

Anyone have any ideas what might be going on?

Thanks,
Carlos

Carlos Clarke wrote:

Anyone have any ideas what might be going on?

QNX 4 support 3 types of scheduling for processes at the same priority
level:

  1. “Fifo”: when a process gets the CPU, it leaves it only if an higher
    priority one became READY

  2. “Round Robin”: process gets the CPU for a timeslice and then leaves
    it to other processes at the same priority in READY state

  3. “Other”: like round robin one, but if a process stay READY for a
    whole timeslice, its priority gets decremented to one level less than
    the original value

You can see the scheduling mode running “sin”, looking at the letter
behind the priority value (f, r, o)

Default priority for processes launched from a shell is 10-other, so
after one timeslice your process will decay to prio 9.

Davide