[PD] pd with -jack & -rt

guenter geiger geiger at xdv.org
Mon Jan 19 20:01:21 CET 2004


On Mon, 19 Jan 2004, Miller Puckette wrote:
> Is it certain this doesn't affect behavior when "jack" is not being used?
> If so I can put it in my version -- if not, perhaps I should detect whether
> jack is installed.
>

According to the description of sched_setscheduler the priority is used
to determine which process to run next.
Normal processes with scheduling policy SCHED_OTHER have priority 0.
SCHED_FIFO processes have higher priority, and under Linux it is likely
that pd will be the only process in this group, and therefore it will
have precedence. In this case it is of no use to give it higher
priority than 1, because 1 will be the highest.

If JACK is running, pd's priority will be lower than JACK's. Which
is how it should be.

So, the change should not affect normal realtime behaviour.

Guenter

> Unfortunately, one can't switch back and forth between RT priorities except
> at startup (because you have to shed root permission then.)
>
> cheers
> Miller
>
> >
> > Hi,
> >
> > I couldn't reproduce until now, because my SBLive has a minimum
> > latency setting of 512 samples.
> >
> > Now, using the playback only trick I got down to 256 and ...
> > I have the same behaviour.
> >
> > I had this problem fixed in CVS once, but it seems that it got
> > changed back, but it is quite easy to fix:
> >
> > in s_inter.c, in the function sys_set_priority(int higher)
> > change the line
> >
> > p3 = (higher ? p2 - 1 : p2 - 3);
> >
> > to
> >
> > p3 = (higher ? p1 + 3 : p1 + 1);
> >
> > .. let me know if it works
> >
> > Thanks for reporting,
> >
> > Guenter
> >
> > PS: I will update the CVS as soon as sourceforge lets me.
> >
> >
>





More information about the Pd-list mailing list