Hi everyone,
With CoreAudio coming up on the list lately, I thought I'd post two links that might clarify what (if anything) LAD folks can learn from the implementation details. This brand new document: http://developer.apple.com/techpubs/macosx/Darwin/IOKit/DeviceDrivers/WritingAudioDrivers/WritingAudioDrivers.pdf tells hardware folks how to write a device driver that works for OS X. In the process, it shows how CoreAudio interconnects with the kernel from the kernel side -- if you combine this document with the earlier CoreAudio userland document, its pretty clear how the whole system works. A second difference under OS X it handles the equivalent of our SCHED_FIFO. Basically, the highest priorities in OS X are reserved for isochronous priorities -- you figure out the Mach thread associated with your process or your Pthread, and you then set the mach thread policy to be THREAD_TIME_CONSTRAINT_POLICY -- this policy is parameterized, you tell the OS about the periodicity of your app and such, and the scheduler does its best to meet your deadlines. The documentation for this is kinda murky right now, if you look on the darwin-developer mailing list archives for a set of posts starting on 8 Oct 2001 by Benjamin Golinvaux, and followups by David A. Gatwood, and a more recent thread on Coreaudio about mpg123 porting by David A. Gatwood, you can piece together the Mach approach to real-time scheduling as implemented in OS X. This is posted just for "comparative systems" purposes -- it's not clear to me that these mechanisms are suitable for Linux to use, but its always good to see how other people try to solve a problem ... --jl ------------------------------------------------------------------------- John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro -------------------------------------------------------------------------