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: interrupt and scheduling


Martini Stefano <martini@sci.univr.it> writes:

> Hi all,
> I have some questions about the ecos kernel.
> 
> Is the RealTimeclock::dsr called immediately after
> the RealTimeclock::isr or is it scheduled by the
> scheduler?

If the interrupt occurs while the current thread has the scheduler
locked then the DSR is deferred (hence the name) until the thread
unlocks the scheduler. If the scheduler is not locked, then the DSR
will be run immediately as part of the exit from the interrupt.

> 
> When the dsr is executed, the real-time counter is
> incremented and the allarms list is checked for
> allarms. If an alarm in the list expires, is it
> executed immediately or is it insered into the
> ready queue?

Alarms are called directly from the clock DSR, there is no further
scheduling. Alarms are just routines that get called, not full
threads.

> 
> Ecos is multi-thread, so the scheduler selects the
> thread to run. When does the scheduler execute this
> task? (when timeslice expire? When an alarm has
> expired?)

Whenever a thread is made ready to run, whether by the actions of
another thread or as a result of an ISR/DSR, the scheduler is run and
if the thread is now the highest priority then it is resumed
immediately.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


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


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