public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil>
Cc: kravetz@us.ibm.com, lse-tech@lists.sourceforge.net,
	linux-kernel@vger.kernel.org,
	Davide Libenzi <davidel@xmailserver.org>
Subject: Re: [Lse-tech] Re: Real Time Runqueue
Date: Sat, 17 Nov 2001 00:41:15 -0800	[thread overview]
Message-ID: <3BF622AB.8EEF8D9D@mvista.com> (raw)
In-Reply-To: <200111162241.QAA98422@tomcat.admin.navo.hpc.mil>

Jesse Pollard wrote:
> 
> Mike Kravetz <kravetz@us.ibm.com>:
> >
> > As you may know, a few of us are experimenting with multi-runqueue
> > scheduler implementations.  One area of concern is where to place
> > realtime tasks.  It has been my assumption, that POSIX RT semantics
> > require a specific ordering of tasks such as SCHED_FIFO and SCHED_RR.
> > To accommodate this ordering, I further believe that the simplest
> > solution is to ensure that all realtime tasks reside on the same
> > runqueue.  In our MQ scheduler we have a separate runqueue for all
> > realtime tasks.  The problem is that maintaining a separate realtime
> > runqueue is a pain and results in some fairly complex/ugly code.
> >
> > Since I'm not a realtime expert, I would like to ask if my assumption
> > about strict ordering of RT tasks is accurate.  Also, is anyone aware
> > of other ways to approach this problem?
> 
> I used to do real-time (seismic survey navigation - sea, land and aircraft
> based systems). I've always admired some of the approaches used by the old
> VAX system (we did an adaptation for PDP-11/73 systems).
> 
> The operation provided a mixed environment of RR and fixed priority operation.
> The core scheduler is based on a bit vector of no larger than 64 fixed priority
> queues. Each queue could then be handled in a FIFO or RR manner. Selection
> of the queue was done by a "first bit set" selection. This identified the
> queue that the process was to be selected. Each queue had a selection fuction
> that could implement any choses scheduling algorithm, but we only used FIFO
> and RR. Several properties were required:
> 
> 1. Only runnable processes are permitted to exist in the queues.
> 2. An empty queue had the corresponding bit value of zero.
> 3. Any queue with pending processes had the corresponding bit set to 1.
> 
> Our adaption took the bit vector, converted it to floating point, and
> subtracted the exponent bias from the exponent. This gave us the "first bit
> set" in the vector. This index can then be used to select the queue and
> the selection algorithim. The return value is always the process to run.
> If the current process matches the original value, then return to the
> already loaded context; otherwise a context swich was called for. Also note
> that the current context contained the queue identifier. This makes it
> simple to save the current context. Of course, if the vector were zero then
> the idle task was invoked.

Take a look at http://sourceforge.net/projects/rtsched/ to see a linux
scheduler that uses very much this same thing.  No floating point, but
there are find first bit instructions on most machines.


> 
~snip
-- 
George           george@mvista.com
High-res-timers: http://sourceforge.net/projects/high-res-timers/
Real time sched: http://sourceforge.net/projects/rtsched/

  parent reply	other threads:[~2001-11-17  8:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16 22:41 Real Time Runqueue Jesse Pollard
2001-11-17  0:13 ` Davide Libenzi
2001-11-17  8:41 ` george anzinger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-11-16 23:47 Mike Kravetz
2001-11-17  0:28 ` Davide Libenzi
2001-11-17  0:32   ` Mike Kravetz
2001-11-17  8:08     ` [Lse-tech] " george anzinger
2001-11-19 20:23       ` Matthew Dobson
2001-11-19 16:30     ` Andi Kleen
2001-11-19 17:06       ` Davide Libenzi
2001-11-19 18:23       ` Richard Gooch
2001-11-19 19:07         ` Mike Kravetz
2001-11-19 18:32       ` george anzinger
2001-11-19 18:40         ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3BF622AB.8EEF8D9D@mvista.com \
    --to=george@mvista.com \
    --cc=davidel@xmailserver.org \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=pollard@tomcat.admin.navo.hpc.mil \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox