Archive for category eCos
eCos interrupt handling
Posted by tread in eCos, embedded, Programming on April 30, 2007
or what makes eCos real time.
I’m trying to use Freemind – this is an initial mindmap of my current understanding of eCos internals:
Interrupt handling is critical to real time systems – and quick handling can be disturbed by atomic activities which run with interrupts disabled. To minimize latencies, eCos has a split interrupt handling system:
- ISR – Interrupt Service Routine
- DSR – Deferred Service Routine
DSRs can be run with interrupts enabled, and ISRs should complete quickly. DSRs execute later when thread scheduling is allowed – this allows higher priority interrupts to umm, interrupt. This also allows them to interact with the kernel.
ISRs can be coded to:
- Disable interrupts till DSR is serviced (typical behaviour).
- Setup counters such that one DSR can service multiple interrupts.
On eCos, thread stack size is defined by CYGNUM_HAL_STACK_SIZE_MINIMUM. Since interrupts are enabled during DSRs, we can have nested interrupts, and this may cause a stack overflow. Hence interrupts have a separate stack, which is large enough to handle some predefined “N” interrupts. Thus each thread needs to hold only one interrupt state, and nested interrupts go on the interrupt stack. Using a separate interrupt stack is configurable, and if not chosen, then the thread stacks have to be larger.
Reference: Redhat eCos reference manual.
-
You are currently browsing the archives for the eCos category.
-
-
- eCos (1)
- embedded (1)
- geekylife (27)
- Humour (29)
- Java (2)
- Linux (15)
- Opensolaris (4)
- Photography (4)
- Programming (22)
- Solaris (4)
- Travel (3)
- Ubuntu (11)
- Uncategorized (3)
- Windows (1)
Archives
- November 2010 (1)
- March 2010 (4)
- February 2010 (4)
- April 2009 (1)
- June 2008 (1)
- May 2008 (9)
- April 2008 (9)
- February 2008 (1)
- December 2007 (2)
- November 2007 (1)
- September 2007 (1)
- August 2007 (4)
- July 2007 (3)
- June 2007 (3)
- May 2007 (7)
- April 2007 (3)
- March 2007 (2)
- February 2007 (8)
Blog at WordPress.com. Theme: Fusion by digitalnature.