Re: [linux-audio-dev] SCHED_FIFO versus SCHED_RR

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] SCHED_FIFO versus SCHED_RR
From: John Lazzaro (lazzaro_AT_CS.Berkeley.EDU)
Date: Tue Nov 27 2001 - 03:52:26 EET


> > sufficient for what?

> Sufficient to not lock people out of their machine.

Sfront is more paranoid than this -- it uses signals to implement a
watchdog timer which, if it goes off, relinquishes SCHED_FIFO. The
timer gets reset every time sfront returns from blocking I/O. This
catches the case of your program computing audio just "fast enough"
to avoid overruns, but not fast enough to cause blocking on audio
reads or writes. It also catches naive SAOL programmers who write
infinite loops ...

See the code in sfront/src/lib/asys/linux.c for more details, search
for the SCHED_FIFO function primitives to see what's going on ...

-------------------------------------------------------------------------
John Lazzaro -- Research Specialist -- CS Division -- EECS -- UC Berkeley
lazzaro [at] cs [dot] berkeley [dot] edu www.cs.berkeley.edu/~lazzaro
-------------------------------------------------------------------------


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Nov 27 2001 - 03:50:57 EET