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]
Other format: [Raw text]

Re: : Is eCos Hard Real Time OS ??




Andrew Lunn wrote:

On Fri, Jun 24, 2005 at 05:11:47PM +0530, R Vamshi Krishna wrote:


On Fri, 24 Jun 2005, Andrew Lunn wrote:



On Fri, Jun 24, 2005 at 04:37:42PM +0530, R Vamshi Krishna wrote:


Is eCos a Hard Real Time OS ?


No, its a soft real time system. It never give guarantees that task X
will finish by time Z, which is the normal definition of hard real
time. eCos will do its best to ensure that the high priority task gets
to run before the low priority task, which for most embedded systems
is enough.

Andrew




Then what parts do I re-write to make it hard-real time ?
Because I want to use eCos but also I need a hard real-time
OS.



You have to think, what exactly does hard real time mean to you? Do
you need 80.000% and 20.000% or will 78.1% and 19.2%, plus some lost
to interrupts be OK? Does the system have to be completely
deterministic or is some randomness in timing allowed?


Yeah, Interrupts are fine ..

Actually this is problem statement to some extent ...

There are various threads, say p1,p2,p3 ...

now p1 has actual execution time of 5 msec.
      p2 has actual execution time of 11 msec.
      p3 has actual execution time of 18 msec.

Now I set the periodicity of these 3 threads as 50msec.

What I mean is that I divide the time into 50 msec blocks and
I need to run the thread once in every 50 msec block.

the slack time of 16 msec left can be used to service interrupts or other chores but,
I need to run the threads once every 50 msec.


The scheduler is the obvious one that you need to look at.

Interrupt handling will upset hard real time, so you need to re-write
all the device drivers you want to use so that they don't use
interrupts. You need to do polled IO from within your threads.


Ok.

You need to think how you handle the timer interrupt. Do you need it
at all?


Ok. I have to think about it.

You might want to consider disabling the caches. The cache gives you
none deterministic behavior.



This definitely has to be done.


I'm sure there are many more issues to consider, but it will largely
depend on what you actually mean by hard real time.

Andrew


Thanks a lot.


-- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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