Subject: Re: Hard realtime scheduling
To: Eduardo Horvath <eeh@NetBSD.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 04/05/2005 17:55:50
On Tue, Apr 05, 2005 at 04:04:47PM +0000, Eduardo Horvath wrote:
> On Mon, Apr 04, 2005 at 01:06:32PM -0700, Jonathan Stone wrote:
> 
> > An illustrative point: Solaris. if memory serves, when Solaris added
> > real-time scheduler hooks, one of the changes made was going through
> > the kernel source, manually identifying all "long-running" codepaths.
> > Checks were inserted into each such path, to check for nearly-overdue
> > real-time tasks, and go switch to the real-time task if required.
> 
> No, I believe that was the original SVR4.  Sunos 5.x was always
> fully preemptive, although it simulated older behavior on timeshare
> processes through scheduler magic.

The SVR4 kernel only became preemptive when the fine-grain MP locking
went in.  Basically as soon as you allow code to run concurrently on
more than one CPU, you might as well allow preemption at the same place.
So preemption is basically (IIRC) blocked whenever a spinlock is held.

The SVR4 RT scheduler just gives processes a fixed priority that is
higher than any non-RT process.  If you put a RT process into an infinite
loop you really want a dual-cpu system so you can kill it.

	David

-- 
David Laight: david@l8s.co.uk