Home arrow Support arrow Forums

Luminary Micro Forums

dereksoftstuff

Expert Boarder

2008/08/09 03:24

Re:add user interrupts on future device

With an event driven system, you could process the event in the ISR, instead of setting a flag and polling later in the thread. This seems like a great idea at first sight, because you get zero latency between interrupt and 'task' execution, and the NVIC does all the pre-emptive scheduling for you, based on the priorities of the interrupts. Unfortunately the downside is that the ISRs take a lot longer to execute, and hence block other lower priority interrupts (i.e. tasks). This could be a problem if your system has to respond to several different interrupts at high frequencies.

Comparing RTOS to non-RTOS systems :-
Ignoring scheduling and overheads for now.

Terminology -
Event (E) = interrupt, exception, trigger, stimulus
Action (A) = task, process, module, function, code block
Time (T) = time duration of Action (continuous)

Lets have a system with 10 Events E1 .. E10
E1 is highest priority, E10 lowest.

example1:
E1 .. E5 all occur approx same time.

Delay Time(D) before actioning E5 =
D:RTOS = T1 + T2 + T3 + T4
D:non-RTOS = x + T1 + T2 + T3 + T4
where x is time for current action to complete

For a balanced system T1 = T2 ... = T10 = 1ms

D:RTOS = 4ms
D:non-RTOS = 4-5ms

For a unbalanced system T1 = T2 ... = T7 = 1ms
T8 = T9 = T10 = 5ms

D:RTOS = 4ms
D:non-RTOS = 4-9ms

So which is real-time?

The RTOS may be able to smooth out the bumps in unbalanced systems, otherwise a simple non-RTOS probably out-performs the overheads/complexity of an RTOS.

What's the difference between a 'background' task and any other 'task'? Priority?, Time? ...

login or register to reply

      Topics Author Date
    thread link
add user interrupts on future device
ppz2005 2008/07/31 02:57
    thread link
thread linkthread link Re:add user interrupts on future device
rocksoft 2008/07/31 08:46
    thread link
thread linkthread linkthread link Re:add user interrupts on future device
ppz2005 2008/08/06 22:22
    thread link
thread linkthread linkthread linkthread link Re:add user interrupts on future device
rocksoft 2008/08/07 02:03
    thread link
thread linkthread linkthread linkthread linkthread link Re:add user interrupts on future device
cb1 2008/08/07 17:36
    thread link
thread linkthread linkthread linkthread linkthread linkthread link Re:add user interrupts on future device
ppz2005 2008/08/07 21:54
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread link Re:add user interrupts on future device
rocksoft 2008/08/08 02:22
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:add user interrupts on future device
dereksoftstuff 2008/08/08 03:13
    thread link
thread linkthread linkthread linkthread linkthread linkthread linkthread linkthread linkthread link Re:add user interrupts on future device
rocksoft 2008/08/08 04:21
    thread link
thread linkthread link Re:add user interrupts on future device
awneil 2008/08/06 16:04
    thread link
thread linkthread linkthread link Re:add user interrupts on future device
ppz2005 2008/08/06 21:26
    thread link
thread linkthread linkthread linkthread link Re:add user interrupts on future device
ppz2005 2008/08/06 22:06
    thread link
thread linkthread linkthread linkthread link Re:add user interrupts on future device
ppz2005 2008/08/06 22:26
    thread link
thread linkthread link Re:add user interrupts on future device
dereksoftstuff 2008/08/09 03:24