This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Multiple runnable DSR's


"Gary D. Thomas" <gary.thomas@mind.be> writes:

> On Fri, 2003-01-24 at 04:00, Ian Gilmour wrote:
> > 
> > My copy of "Embedded Software Development with ECOS" dropped on my desk
> > yesterday. I've started skimming through it and I've already got a question
> > that hopefully one of you can answer. 
> > 
> > It isn't clear from the book (or maybe I just haven't hit the relevant bit
> > of text yet :-)) but from the email archive it appears as though a DSR
> > associated with a low priority ISR can hold up the execution of a DSR
> > associated with a high priority ISR.
> > 
> > Is this correct?
> > 
> > Are DSR's assigned priorities (presumably they could be based on ISR
> > priorities in some way)?
> > 
> > If yes - do higher prioritised DSR's run ahead of lower priority DSR's if
> > both are runnable?
> > 
> > Or are DSR's simply shoved on a time ordered pending DSR queue and processed
> > in time order ahead of any user threads?
> 
> Correct.  We discussed having prioritized DSRs (years ago),
> but decided that the most correct way to handle this is to
> use threads.  This implies that DSR processing should be
> short - if a "low priority" DSR is getting in the way of
> a "higher priority" one, then that processing should really
> be deferred to a thread which can be scheduled as necessary.
> 

To expand on this a little. My original intention for DSRs was that
they should contains relatively small amounts of code: just signal a
condition variable, post to a semaphore, send a message. They are all
mostly still like this. The only DSR that does anything more
substantial is that for the timer, running alarm functions, and then
those should also conform to the DSR model and be minimal.

The pupose of a DSR is to act as an intermediary between the ISR world
and the thread world. The real effect of running a DSR is to cause a
thread to be scheduled. Since all DSRs will be run before any thread
gets to start, it really does not matter what order they run in.

-- 
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]