[PD] -rt for whom?

chris clepper cgc at humboldtblvd.com
Mon Jul 5 23:57:47 CEST 2004

On Jul 5, 2004, at 3:24 PM, Larry Troxler wrote:

> On Monday 05 July 2004 13:57, chris clepper wrote:
>> A few notes about -rt mode:
>> First, -rt is different on OSX compared to Linux.  On Linux, the flag
>> sets the priority of the pd process just like nice or renice
> Sorry if I somehow have a basic misunderstanding about how POSIX  
> real-time
> scheduling works on Linux,  but I think  you're very wrong (or else the
> behavior of "nice" has changed a bit since the last time I researched  
> it).

I think you completely missed the point I was making, which concerns  
the difference between the way processes are represented in the two  
systems.  You may indeed be right that (re)nice won't do exactly the  
same thing as calling the POSIX scheduling API, but the point is that  
treating scheduling on OSX just like Linux is worthless because the  
kernel looks at tasks and threads differently.  More to the point, Pd  
has no actual real-time scheduling enabled on OSX, so the -rt flag is a  
misnomer to begin with.  Real-time scheduling would be done using the  
Mach kernel thread API as outlined in this document:


The section under 'Using the Mach Thread API to Influence Scheduling'  
contains the relevant info.  Setting priority to FIFO doesn't appear to  
do anything at all related to 'real-time' scheduling.  By 'real-time' I  
mean that exact amounts of time in cycles are set aside for a given  
process per second and having the kernel agree to only do that task in  
those cycles.  Just setting a high priority for a thread won't do that,  
and also has some nasty side-effects as evidenced by GEM.  Again, this  
is apparently completely and totally different from Linux 'real-time',  
and implementations should reflect that.

More information about the Pd-list mailing list