This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: interrupt and scheduling
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Martini Stefano <martini at sci dot univr dot it>
- Cc: ecos discuss <ecos-discuss at sources dot redhat dot com>
- Date: 26 Feb 2004 16:05:55 +0000
- Subject: Re: [ECOS] interrupt and scheduling
- References: <1077808158.20400.87.camel@cdc07.sci,univr.it>
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