Lambda the Ultimate

inactiveTopic Ada and Java: real-time advantages
started 11/12/2003; 10:57:26 AM - last post 11/13/2003; 10:41:56 AM
Chris Rathman - Ada and Java: real-time advantages  blueArrow
11/12/2003; 10:57:26 AM (reads: 11240, responses: 8)
Ada and Java: real-time advantages
I'm fixing to be moonlighting on a project that involves data analysis from output produced by an embedded system. Thought a look at the main languages involved in the arena might be of interest to others here abouts.

Although C wins the popularity contest as the language most typically chosen for real-time embedded systems, other languages are worth considering. One of them, Ada, offers advantages over the C family, especially in high-reliability environments. Another, Java (as extended with real-time enhancements), may be especially attractive in highly dynamic systems.

In this article, I'll review the language features you'll need for real-time and embedded applications and look at how C, Ada, and Java's real-time extensions address these requirements. I'll use a typical example to describe and compare the Ada and Java approaches.
Posted to general by Chris Rathman on 11/12/03; 10:59:09 AM

Ehud Lamm - Re: Ada and Java: real-time advantages  blueArrow
11/12/2003; 11:09:35 AM (reads: 606, responses: 0)
Ben is real expert on these matters, so I suggest listening carefully to what he has to say. Note: I haven't read the article myself yet...

Chris - Re: Ada and Java: real-time advantages  blueArrow
11/12/2003; 8:55:34 PM (reads: 565, responses: 1)
Does anyone have any papers or experience using a functional programming language for real-time and/or embedded systems? Wasn't Miranda(TM) used for some French trains systems?

I did find the following paper on CiteSeer, but I haven't read it yet:

"Directions in Functional Programming for Real(-Time) Applications"

Karl Reitschuster - Re: Ada and Java: real-time advantages  blueArrow
11/12/2003; 11:36:18 PM (reads: 552, responses: 1)
Hi, i like this article very much, why? Because there have been used very good understandble examples to point the issue; great


Ehud Lamm - Re: Ada and Java: real-time advantages  blueArrow
11/13/2003; 1:22:26 AM (reads: 542, responses: 0)
What I like abut Ben's work is that he doesn't try to evangelize either of the languages (at least not directly).

andrew cooke - Re: Ada and Java: real-time advantages  blueArrow
11/13/2003; 2:00:21 AM (reads: 541, responses: 0)
apart from erlang? :o)

there was a commercial language mentioned here in a discussion of real-time systems ages ago, i think (the discussion was about gc and resposniveness), but i can't remember the link or find it.

Dominic Fox - Re: Ada and Java: real-time advantages  blueArrow
11/13/2003; 4:35:41 AM (reads: 510, responses: 1)

From the article:

The main issue with Java derives from its foundation in object-oriented programming. The problem isn't so much with efficiency—the overhead of dynamic binding needn't be more than an extra level of indirection on the method call—but rather with the apparent unpredictability or latency incurred by garbage collection. The approach taken in the RTSJ is to allow the program to define memory areas that aren't subject to garbage collection and to define certain kinds of threads that aren't allowed to access the garbage-collected heap; such threads may preempt the garbage collector.

This is very like the way unmanaged code is handled in C#, although I don't know if C# has the specialised threads mentioned here. It's still a surprise to see a VM/bytecode based language mentioned in the context of real-time processing, but perhaps by now it shouldn't be.

Patrick Logan - Re: Ada and Java: real-time advantages  blueArrow
11/13/2003; 10:41:56 AM (reads: 455, responses: 0)
Just a quick mention that there have been several real-time systems implemented in various implementations of Smalltalk over many years. (Here's one from a few years ago, and more recently here's another, Microlingua.)

Tektronix had (may still) oscilloscopes that ran Smalltalk. (Quote from Ward Cunningham... "There was an AI workstation that ran Smalltalk because I taught it to the guys in the AI lab. There was also an oscilloscope that ran Smalltalk because I taught Smalltalk to the guys in the instrument group.")

Another approach for real-time systems built using dynamic languages is "whole program optimization". Another reason to get out of the current mentality that everything should run in a virtual machine, everywhere, all the time.

Chris - Re: Ada and Java: real-time advantages  blueArrow
11/13/2003; 10:43:12 AM (reads: 463, responses: 0)
Real-time software doesn't have to be fast. It just has to be "real". :-) Assuming real means bounded response time.