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: Ivica Bukvic (ico_AT_fuse.net)
Date: Mon Nov 26 2001 - 23:52:01 EET


Wow, exactly the topic I am stuck at. So, I guess I'll use this
opportunity to ask an additional question regarding this topic and that
is that in my application I am currently experimenting with SCHED_RR,
but every time I set the thread to run this way, the thread does
absolutely nothing, even though the program compiles without errors. Is
this due to fact that I need to run the app as a superuser? I am pretty
sure that I do not need LL patches for this thing to run since pthreads
have been designed to run on regular linux machines (please do correct
me if I am wrong).

I'd greatly appreciate any help on this issue! Sincerely,

Ivica Ico Bukvic, composer, audio sculptor, programmer & computer
consultant
http://meowing.ccm.uc.edu/~ico/
ico_AT_fuse.net
============================
"To be is to do" - Socrates
"To do is to be" - Sartre
"Do be do be do" - Sinatra
"I am" - God

-----Original Message-----
From: owner-linux-audio-dev_AT_music.columbia.edu
[mailto:owner-linux-audio-dev_AT_music.columbia.edu] On Behalf Of Phil Burk
Sent: Monday, November 26, 2001 2:11 PM
To: linux-audio-dev_AT_music.columbia.edu
Subject: [linux-audio-dev] SCHED_FIFO versus SCHED_RR

Hello,

I am working with a group on PortAudio, a simple cross-platform
open-source
audio API. We currently support Windows, Mac, BeOS, SGI, and, of course,
Unix.

Folks have been reporting audio glitches even with a buffer size
equivalent
to 100 msec. I have experimented with setting my thread priority to the
max
for SCHED_FIFO and that seems to eliminate the glitches. I can get down
to
around 5 or 10 msec latency on RedHat 7.2, even without any low-latency
patches. But I have to run as superuser.

I have heard reports that SCHED_FIFO has several bugs. I have searched
the
web and read many posts about this but there are still unanswered
questions.

Q: Do the SCHED_FIFO bugs prevent a simple use of sched_setscheduler()
to
bump the priority of a thread that is reading and writing to OSS? I want
the
code to work on old systems as well as new.

Q: Does SCHED_RR work better than SCHED_FIFO? Fewer bugs?

Q: I have code that throttles back if I consume too much CPU time. Is
that
sufficient?

Q: Can I safely use the value from sched_get_priority_max(SCHED_FIFO) or
should I use less?

Thanks,
Phil Burk
JSyn,pForth,DSP,ASIC - http://www.softsynth.com
Portable Audio I/O - http://www.portaudio.com
Interaction Server - http://www.transjam.com


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

This archive was generated by hypermail 2b28 : Mon Nov 26 2001 - 23:39:38 EET