Executive shutdown
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Tue Jul 6 14:25:37 UTC 2004
brian wrote:
> Joel,
>
> Thank you for your reply,
>
> As part of my studies I am looking at the reuse of an application that was
> crafted directly to a processor and looking at how it could be moved to a
> more modern platform. Because of the close coupling possible it usd a 2ms
> interrupt to drive it.
With anything but POSIX signals, 2 milliseconds wouldn't be a big deal.
A more proper RTEMS solution would be to switch to Classic API Events
and set up a server task to receive them. Much lower overhead.
> I have already found that a different processor/OS combintaion couldnot
> cope, the singals generated from the interrupt were being missed by the
> application because it could not keep up.
>
> Is there any way to put a trace in to check for stack overflow? and how easy
> is it to increase the stack ?
There is a stack checker in cpukit/libmisc/stackchk. Define
STACK_CHECKER_ON before including confdefs.h. The checks at
each context switch. You might have to insert a force check
at critical points.
> Thank You
>
> ----- Original Message -----
> From: "Joel Sherrill <joel at OARcorp.com>" <joel.sherrill at OARcorp.com>
> To: "Stevens Brian" <BPSTEVENS at qinetiq.com>
> Cc: "'Angelo Fraietta'" <afraiett at bigpond.net.au>; <rtems-users at rtems.com>
> Sent: Friday, July 02, 2004 9:03 PM
> Subject: Re: Executive shutdown
>
>
>
>>Stevens Brian wrote:
>>
>>>I have added a counter and it indicates that the task receives approx
>
> 280
>
>>>signals before failing.
>>
>>Is this a clean exit/shutdown, fatal error, or just a random fault?
>>
>>FWIW the POSIX signals were designed to be safe to be sent from
>>interrupts but their complexity has always made me suspicious of
>>doing so. At your signal rate, you could be overflowing a task
>>stack. Each signal is going to push deeper and deeper onto the
>>interrupted thread's stack.
>>
>>--joel
>>
>>
>>>-----Original Message-----
>>>From: Angelo Fraietta [mailto:afraiett at bigpond.net.au]
>>>Sent: 02 July 2004 09:39
>>>To: Stevens Brian
>>>Cc: 'rtems-users at rtems.com'
>>>Subject: Re: Executive shutdown
>>>
>>>
>>>
>>>Stevens Brian wrote:
>>>
>>>
>>>
>>>>RTEMS version 4.6
>>>>Target PC386
>>>>
>>>>I have written a device driver to use the rtc to generate timer
>
> interrupts
>
>>>>independent of the clock used to drive rtems. I have set the additional
>>>>timer to produce interupts at 122micro second intervals, these are then
>>>>counted and when the required time interval has elapsed a POSIX signal
>
> is
>
>>>>sent to a thread.
>>>>
>>>>If I set the signal to be sent every 2 miliseconds the system
>
> eventually
>
>>>>crashes with an executive shutdown. However, if set to 20ms it works
>
> fine.
>
>>>>
>>>>
>>>After how long does it crash? Do you get a message saying that it shust
>
> down
>
>>
>>--
>>Joel Sherrill, Ph.D. Director of Research & Development
>>joel at OARcorp.com On-Line Applications Research
>>Ask me about RTEMS: a free RTOS Huntsville AL 35805
>> Support Available (256) 722-9985
>>
>>
>
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list