Default Scheduling Policy

How does one set the default scheduling policy for a system? During the
investigation of another problem, I noticed that all my threads seem to be
round-robin scheduled, e.g. 10r. I have also seen them scheduled as other,
e.g. 10o. How do I force all my application threads, as well as the other
active threads on the processor to be FIFO scheduled?

Thanks,
Dave Kuechenmeister

David Kuechenmeister <david.kuechenmeister@viasat.com> wrote:

How does one set the default scheduling policy for a system? During the
investigation of another problem, I noticed that all my threads seem to be
round-robin scheduled, e.g. 10r. I have also seen them scheduled as other,
e.g. 10o. How do I force all my application threads, as well as the other
active threads on the processor to be FIFO scheduled?

Scheduling policy is inheritted.

As the threads in Proc run Round-Robin, this will be inheritted by
everything else.

In the +script section of your build file, you can specify priority
and scheduling algorithm for programs you run… if you specify it
for all of them, including your starter script/program, then everything
in your system will inherit that new scheduling algorithm.

e.g.
[pri=27f] sh

would run the shell, and everything that inherits scheduling algorithm
from it, with the scheduling algorithm of FIFO.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Thanks.
…dk

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:atqshg$lu5$1@nntp.qnx.com

David Kuechenmeister <> david.kuechenmeister@viasat.com> > wrote:
How does one set the default scheduling policy for a system? During the
investigation of another problem, I noticed that all my threads seem to
be
round-robin scheduled, e.g. 10r. I have also seen them scheduled as
other,
e.g. 10o. How do I force all my application threads, as well as the
other
active threads on the processor to be FIFO scheduled?

Scheduling policy is inheritted.

As the threads in Proc run Round-Robin, this will be inheritted by
everything else.

In the +script section of your build file, you can specify priority
and scheduling algorithm for programs you run… if you specify it
for all of them, including your starter script/program, then everything
in your system will inherit that new scheduling algorithm.

e.g.
[pri=27f] sh

would run the shell, and everything that inherits scheduling algorithm
from it, with the scheduling algorithm of FIFO.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

This brings up another question I’ve been meaning to ask for some time.
A minor point, but still a curiosity.

How come the default for procnto is 10r, yet the QNX-supplied boot files
use “[pri=10o]” when they start diskboot?

In other words, is there some reason that it was deemed important to
change the default scheduling algorithm for the rest of the system?

Thanks,

lew

Lewis Donzis <lew@nospam.donzis.com> wrote:

This brings up another question I’ve been meaning to ask for some time.
A minor point, but still a curiosity.

How come the default for procnto is 10r, yet the QNX-supplied boot files
use “[pri=10o]” when they start diskboot?

In other words, is there some reason that it was deemed important to
change the default scheduling algorithm for the rest of the system?

The default QNX install and boot is intended for a desktop/development
type system. In such a system, SCHED_OTHER (when it becomes adaptive)
makes sense. So, that choice is made for the particular application
(desktop/development) that the boot file is intended to run.

For a real-time oriented system, you do not want the priority decay
of SCHED_OTHER, so Proc runs as SCHED_RR.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.