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]

Re: Some newbie questions


> > eCos is not a hard real time OS. There is no deadline scheduling, no
> > guarantees. Everything it best effort. You do have priorities per
> > thread, so you can priorities your CAN bus handler above everything
> > else to improve is responce time.
> 
> But there is no doubt that a thread will be preempted by a interrupt
> regardless of its priority, right?

Yes, unless the thread has turned interrupts off. But where is your
code to processes the request? Probably in a thread? Your ISR calls a
DSR, and the DSR calls the thread. Under some conditions this is not
imeadiate, eg if there are other DSRs already running, or waiting to
run etc. 

> My definition of response time is the time between receiving a CAN
> message from node A and sending back our response to node A. So, within
> 40us we have to read the CAN message, generate a response message and
> send it  back to node A again. 

Whats the worse case time to generate the responce? From that you can
work out how much time you have to receive and send from the chip. You
can then decide if to do it all in the ISR, or have a DSR or thread. 

        Andrew


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