Re: [linux-audio-user] Realtime Audio + Networking

From: Paul Davis <paul@email-addr-hidden>
Date: Wed Jun 07 2006 - 15:53:53 EEST

On Tue, 2006-06-06 at 14:31 -0400, Joshua Boyd wrote:
> setpriority(PRIO_PROCESS, 0, -20);
>
> I was under the impression that that set priority to a "realtime"
> priority, although rereading the man page I don't see any specific
> correlation listed between -20 and realtime.

there is no relationship whatsoever.

> I also do: sched_setscheduler(0, SCHED_FIFO, &sp);

on POSIX-ish operating systems, there are two orthogonal aspects to
scheduling: scheduling class and scheduling priority. priority only
ranks different execution contexts (kernel threads) within the *same*
scheduling class - it has no impact when a scheduling decision has to be
made between two execution contexts in two different classes. put
differently, you can leave yourself in SCHED_OTHER (the default class)
and raise your priority to the maximum, but you will never ever be
scheduled to run if there is a SCHED_FIFO thread ready to run even if
its numerical priority is lower than yours.

there is no reason to use setpriority() for realtime work:
sched_setscheduler's parameter argument defines the priority.

--p
Received on Wed Jun 7 16:15:06 2006

This archive was generated by hypermail 2.1.8 : Wed Jun 07 2006 - 16:15:06 EEST