From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7555 invoked by alias); 24 Jun 2005 12:52:30 -0000 Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Received: (qmail 7286 invoked by uid 22791); 24 Jun 2005 12:52:01 -0000 Received: from smtp2.iitb.ac.in (HELO smtp1.iitb.ac.in) (203.197.74.149) by sourceware.org (qpsmtpd/0.30-dev) with SMTP; Fri, 24 Jun 2005 12:52:01 +0000 Received: (qmail 2927 invoked from network); 24 Jun 2005 18:21:56 +0530 Received: from unknown (HELO ldns1.iitb.ac.in) (10.200.12.1) by smtp1.iitb.ac.in with SMTP; 24 Jun 2005 18:21:56 +0530 Received: (qmail 5085 invoked by uid 509); 24 Jun 2005 12:48:08 -0000 Received: from 10.6.202.53 by ldns1 (envelope-from , uid 501) with qmail-scanner-1.25 (clamdscan: 0.85.1/955. spamassassin: 3.0.2. Clear:RC:1(10.6.202.53):. Processed in 0.020839 secs); 24 Jun 2005 12:48:08 -0000 Received: from unknown (HELO ?127.0.0.1?) (10.6.202.53) by ldns1.iitb.ac.in with SMTP; 24 Jun 2005 12:48:07 -0000 Message-ID: <42BC0204.5080900@cse.iitb.ac.in> Date: Fri, 24 Jun 2005 12:52:00 -0000 From: "R. Vamshi Krishna" User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) MIME-Version: 1.0 To: ecos-discuss@sources.redhat.com References: <20050624112732.GA7187@lunn.ch> <20050624123829.GB7187@lunn.ch> In-Reply-To: <20050624123829.GB7187@lunn.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [ECOS]: Is eCos Hard Real Time OS ?? X-SW-Source: 2005-06/txt/msg00238.txt.bz2 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