Again thank you to everybody!

Brandon, I see no warnings in the documentation regarding privilege requirement for raising a scheduler's priority -- the strings "priv" and "user" are absent, and "su" only appears twice. Also I did not understand until today that while Mac is a variety of Unix, it is not a variety of Linux.

Carter and John, I will try the polling method you suggest. A polling cycle with a period of 20 ms would be fast enough for me. I don't need Haskell to handle audio math, just to send control signals (to Max/MSP). As soon as I figure out how to get UDP from Haskell to Max, I'll run a test. Hopefully the problem I'm seeing derives from print, not threadDelay. (threadDelay accepts its time argument in millionths of a second! That would seem to suggest it was designed to handle at least the speed I'm hoping for ...)

On Sun, Oct 19, 2014 at 2:11 PM, Brandon Allbery <allbery.b@gmail.com> wrote:
On Sun, Oct 19, 2014 at 3:44 PM, Jeffrey Brown <jeffbrown.the@gmail.com> wrote:
You mean I should call chrt from the command line after starting the process, to modify its priority?

Normally you'd use it to run the program. But, as I said at least twice, it's Linux specific.
 
This documentation for the posix-realtime package says that it has a sched_setscheduler function. That supposedly exists on my OS (OS X 10.9). The chrt command, on the other hand,

Does it warn you that you need privileges (probably root) to switch to a higher scheduler level? Normally realtime and other high priority schedulers require elevated privileges, whereas lower priority schedulers such as SCHED_IDLE don't.

I should note that I see no manpage for sched_setscheduler on 10.9.5, nor do I find it in any of the dylibs in /usr/lib.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net