help on Writing Real Time efficient code in C/C++ 
Author Message
 help on Writing Real Time efficient code in C/C++

Hi.

Do you have some idea how to write code in C/C++
that is Real Time efficient ?.

I.E - Can you recommend on certain ways of writing C/C++
       that will take MINIMUM time or LIMITED time?

Is there any book about it ?

  Regards,

Doron Kaminetsky     _/_/_/_/ _/_/_/_/ _/       _/_/_/    _/_/_/  _/_/_/  
CPM Software Design    _/    _/       _/       _/    _/ _/    _/ _/    _/
                      _/    _/_/_/   _/       _/_/_/_/ _/_/_/_/ _/     _/
Tel: 972-8-9774220   _/    _/       _/       _/   _/  _/    _/ _/     _/  
Fax: 972-8-9273487  _/    _/_/_/_/ _/_/_/_/ _/    _/ _/    _/ _/_/_/_/    



Sat, 27 Mar 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++


Quote:
>Hi.
>Do you have some idea how to write code in C/C++
>that is Real Time efficient ?.
>I.E - Can you recommend on certain ways of writing C/C++
>       that will take MINIMUM time or LIMITED time?
>Is there any book about it ?
>  Regards,
>Doron Kaminetsky     _/_/_/_/ _/_/_/_/ _/       _/_/_/    _/_/_/  _/_/_/  
>CPM Software Design    _/    _/       _/       _/    _/ _/    _/ _/    _/
>                      _/    _/_/_/   _/       _/_/_/_/ _/_/_/_/ _/     _/
>Tel: 972-8-9774220   _/    _/       _/       _/   _/  _/    _/ _/     _/  
>Fax: 972-8-9273487  _/    _/_/_/_/ _/_/_/_/ _/    _/ _/    _/ _/_/_/_/    


Thats a tough question because real-time to me whos been building
embedded software for years may mean response times down from
microseconds up to milliseconds.

Good books worth buying on the C++ end to learn good style is Scott
Meyers books Effective C++ and More Effective C++. The later book I
feel goes into questions that you may be interested in.
        \|/
       (o o)
--oOOO--(_)--OOOo-------------------------------------------------------


   .oooO         9 Curley St, East Brighton, 3187, Australia
   (   )   Oooo. Tel. 95929398 (Melb. Australia)
----\ (----(   )--------------------------------------------------------
     \_)    ) /
           (_/



Wed, 14 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++

It is not enough to write real-time code, you must also have an
operating system that responds with-in your time constraints.

Of course, real-time means different things to different people.

To a Stock Broker, real-time means having stock quotes with-in about 15
minutes of actuality.

To an Accountant, real-time means having access to data through the
close of business yesterday.

To an Engineer, working with a computer that operates a machine,
real-time might be everything that happened with the last 1/1000th of a
second.

Each of these scenarios represent real-time to the participant but would
require very different coding on the part of the programmer.

Alicia Carla Longstreet

P.S. I don't recommend Windows or DOS for CAM.



Fri, 16 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++

Quote:


>>Do you have some idea how to write code in C/C++
>>that is Real Time efficient ?.
>>I.E - Can you recommend on certain ways of writing C/C++
>>       that will take MINIMUM time or LIMITED time?
>>Is there any book about it ?

  My book, "Efficient C/C++ Programming", deals with such issues.

Steve Heller, author and software engineer
http://ourworld.compuserve.com/homepages/steve_heller



Fri, 16 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++



Quote:
>It is not enough to write real-time code, you must also have an
>operating system that responds with-in your time constraints.

>Of course, real-time means different things to different people.

>To a Stock Broker, real-time means having stock quotes with-in about 15
>minutes of actuality.

15 minutes!?  At 3 minutes old, LSE prices are so antediluvian that
you're allowed to distribute them without charge.  The brokers I deal
with get shirty if they're as much as 20 seconds late.

John
--
John Winters.  Wallingford, Oxon, England.



Fri, 16 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++


Quote:
>It is not enough to write real-time code, you must also have an
>operating system that responds with-in your time constraints.
>Of course, real-time means different things to different people.
>To a Stock Broker, real-time means having stock quotes with-in about 15
>minutes of actuality.

  Actually, a stockbroker would be VERY unhappy with such a long
delay. When I worked at a real-time financial information provider,
the system design was specially constructed to make sure that all the
brokers in a given office got the quote information at almost exactly
the same time (I believe the criterion was something like "less than
one second of discrepancy", and I know it was less than 2 seconds). If
that criterion was not met, the ones at the end of the data delivery
chain would get their clocks cleaned by their colleagues.

Steve Heller, author and software engineer
http://ourworld.compuserve.com/homepages/steve_heller



Fri, 16 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++

Quote:


> >Hi.

> >Do you have some idea how to write code in C/C++
> >that is Real Time efficient ?.

> >I.E - Can you recommend on certain ways of writing C/C++
> >       that will take MINIMUM time or LIMITED time?

> >Is there any book about it ?

> >  Regards,

> >Doron Kaminetsky     _/_/_/_/ _/_/_/_/ _/       _/_/_/    _/_/_/  _/_/_/
> >CPM Software Design    _/    _/       _/       _/    _/ _/    _/ _/    _/
> >                      _/    _/_/_/   _/       _/_/_/_/ _/_/_/_/ _/     _/
> >Tel: 972-8-9774220   _/    _/       _/       _/   _/  _/    _/ _/     _/
> >Fax: 972-8-9273487  _/    _/_/_/_/ _/_/_/_/ _/    _/ _/    _/ _/_/_/_/

> Thats a tough question because real-time to me whos been building
> embedded software for years may mean response times down from
> microseconds up to milliseconds.

> Good books worth buying on the C++ end to learn good style is Scott
> Meyers books Effective C++ and More Effective C++. The later book I
> feel goes into questions that you may be interested in.

There's more to "real-time" than simply response time, although that's certainly
an important metric. Otherwise, faster computers would eventually turn Windows,
OS/2, *NIX, et al into real-time systems. The key point to me is if the
application code can be made run-time deterministic, at least in the short term.
This would eliminate any preemptive OS, unless the application could be given an
equal or greater run-time priority than the operating system. From this
perspective, wring efficient real-time code is little different from just
writing efficient code. The same tradeoffs need to be made regarding code size
vs. cycles. Optimize the parts that are most critical (using assembler if
necessary). And so on ...

The original question was about books that deal with real-time issues. In my
(limited) experience, the best ones are from the vendor of the RTOS. There are
often functions built into the RTOS that while unportable, are tuned for
performance. Most of the RTOS vendors are only now moving their compilers from C
to C++ and, at least in one case I won't name, are not nearly as good at
optimizing the more complex C++ code.

Glenn
--
***************************************************************************
                                          Glenn R. Larkin
    _/        _/        _/      _/  _/    Lawrence Livermore National Labs
   _/        _/        _/_/    _/  _/     7000 East Ave.  L-492
  _/        _/        _/  _/  _/  _/      Livermore, CA 94550-9516

_/_/_/_/  _/_/_/_/  _/      _/  _/_/_/_/  (510) 424-2859 (VOICE)
                                          (510) 422-2237 (FAX)
***************************************************************************



Sat, 17 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++


Quote:

>It is not enough to write real-time code, you must also have an
>operating system that responds with-in your time constraints.

>Of course, real-time means different things to different people.

>To a Stock Broker, real-time means having stock quotes with-in about 15
>minutes of actuality.

>To an Accountant, real-time means having access to data through the
>close of business yesterday.

>To an Engineer, working with a computer that operates a machine,
>real-time might be everything that happened with the last 1/1000th of a
>second.

>Each of these scenarios represent real-time to the participant but would
>require very different coding on the part of the programmer.

>Alicia Carla Longstreet

>P.S. I don't recommend Windows or DOS for CAM.

Another definition would be determinate accuracy do a milisecond level.  In
this mode speed, while of importance, is not absolutely critical.  More
important would be to be able to schedule tasks in your program down to a
millisecond level and being assured that they execute at the approproate
times as opposed to a normal OS where they would execute fairly close to
the appropiate time down to a OS dependant error-factor.

Jay



Mon, 19 Apr 1999 03:00:00 GMT  
 help on Writing Real Time efficient code in C/C++

Quote:



> > >Hi.

> > >Do you have some idea how to write code in C/C++
> > >that is Real Time efficient ?.

> > >I.E - Can you recommend on certain ways of writing C/C++
> > >       that will take MINIMUM time or LIMITED time?

> > >Is there any book about it ?

> > >  Regards,

> > >Doron Kaminetsky     _/_/_/_/ _/_/_/_/ _/       _/_/_/    _/_/_/  _/_/_/
> > >CPM Software Design    _/    _/       _/       _/    _/ _/    _/ _/    _/
> > >                      _/    _/_/_/   _/       _/_/_/_/ _/_/_/_/ _/     _/
> > >Tel: 972-8-9774220   _/    _/       _/       _/   _/  _/    _/ _/     _/
> > >Fax: 972-8-9273487  _/    _/_/_/_/ _/_/_/_/ _/    _/ _/    _/ _/_/_/_/

> > Thats a tough question because real-time to me whos been building
> > embedded software for years may mean response times down from
> > microseconds up to milliseconds.

> > Good books worth buying on the C++ end to learn good style is Scott
> > Meyers books Effective C++ and More Effective C++. The later book I
> > feel goes into questions that you may be interested in.
> There's more to "real-time" than simply response time, although that's certainly
> an important metric. Otherwise, faster computers would eventually turn Windows,
> OS/2, *NIX, et al into real-time systems. The key point to me is if the
> application code can be made run-time deterministic, at least in the short term.
> This would eliminate any preemptive OS, unless the application could be given an
> equal or greater run-time priority than the operating system. From this
> perspective, wring efficient real-time code is little different from just
> writing efficient code. The same tradeoffs need to be made regarding code size
> vs. cycles. Optimize the parts that are most critical (using assembler if
> necessary). And so on ...
> The original question was about books that deal with real-time issues. In my
> (limited) experience, the best ones are from the vendor of the RTOS. There are
> often functions built into the RTOS that while unportable, are tuned for
> performance. Most of the RTOS vendors are only now moving their compilers from C
> to C++ and, at least in one case I won't name, are not nearly as good at
> optimizing the more complex C++ code.

Of course when the going gets serious, and you get to safety critical,
real time systems, then the only acceptable solution is to ditch the
OS completely....who needs it anyway....

G.

Quote:
> Glenn
> --
> ***************************************************************************
>                                           Glenn R. Larkin
>     _/        _/        _/      _/  _/    Lawrence Livermore National Labs
>    _/        _/        _/_/    _/  _/     7000 East Ave.  L-492
>   _/        _/        _/  _/  _/  _/      Livermore, CA 94550-9516

> _/_/_/_/  _/_/_/_/  _/      _/  _/_/_/_/  (510) 424-2859 (VOICE)
>                                           (510) 422-2237 (FAX)
> ***************************************************************************

....message ends.....


Mon, 26 Apr 1999 03:00:00 GMT  
 
 [ 9 post ] 

 Relevant Pages 

1. Need C/C++ source code for real time graphing

2. The real serial.cs

3. Newbie: separate big .cs file into small .cs files

4. newbe/cs student, need help w/ code

5. Help!: problem with fast timing for real-time application on PC

6. how to write efficient code using stl?

7. anybody has written a real timing program??

8. Include code in other Cs files

9. Compile CS source code using ICodeCompiler

10. cs source code

11. Wanted: Small sample real-time code

12. Real Time Clock (RTC) in C/C++

 

 
Powered by phpBB® Forum Software