Subject: Re: Hard realtime scheduling
To: None <>
From: Joerg Sonnenberger <>
List: tech-kern
Date: 04/05/2005 10:01:49
On Tue, Apr 05, 2005 at 04:20:23PM +0900, SODA Noriyuki wrote:
> >>>>> On Mon, 4 Apr 2005 11:21:23 -0700 (PDT),
> 	Dave <> said:
> > As I stated earlier, realtime scheduling, especially not requiring root
> > access, will be a boon to good quality audio support.  I'm hoping that
> > we'll have something that can be used by JACK.  I never got any comments
> > on this at the time.  Can I get some now?
> Not requiring special privilege is problematic, since a realtime
> process can occupy whole CPU resource.
> Is there any prior art about such feature in UNIX-based OSes?

You should differentiate between RT scheduling and CPU usage. It makes
sense to support bounded notification times after an event occured
(e.g. new audio data, part of a buffer written for cdrecord, etc.).
This can be done by giving the processes a chance to hold back CPU time
by blocking (early reschedule) and using that on demand. If the process
doesn't have any CPU time left when the RT event is triggered, it has
to wait until it's time slice is over.