Embedded Technology

Embedded Languages:

The discussion presented below is purely specific to Embedded technology.
Criteria 1. Execution Speed
Language On-line Interpreter Off-line Compiler +
On-line Interpreter
Off-line Compiler
(E.g.) BASIC Java C
You ask the
bearer for slices
of toasted

slice by slice
Eating toasted bread

The bearer arranges a
toaster in front of you
with fresh loves of bread.

You will have to toast
each slice of bread with
the toaster and then eat.

The bearer arranges a
hot plate in front of you
with pre toasted bread.

You will have to heat
each slice of bread with
the hot plate and then

The bearer brings finely
toasted slices of hot

You just will have to eat
slices of bread.



Real Sense:



Here for every piece of
logic executed,
interpretation goes on-line

Here lot of time is
wasted by the interpreter


Hot plate

Here the logic is
converted into byte
code with an off-line
compiler,and then while
getting executed it goes
through the interpreter
(Virtual machine) on-line

Here again time is
wasted, but slightly



Here the logic is
converted into machine
code with an off-line
compiler and the code
straight a way runs on
the target machine

Here nothing is wasted

correctness of
Source code
Source code

Source code
Which one for
Criteria 2. Flexibility
Embedded development calls for integrating new devices with the development system . And in such cases it is required to write new device drivers & virtual peripherals. Which involves work at the machine core level (usually done in assembly level) manipulating the HW resource. This in turn effects the balance between the HW & SW resources pooled to bring in an effective device interface.

Using C, it is possible to write code to respond & capture events at high speeds (Time precision) demanded by the device interfaced with.
But imagine the case of BASIC & Java, which does not allow HW to be accessed directly & it is only possible through the interpreter services. This leads to latency in response.

And finally,
With C the developer writes program over a High speed HW core (Real machine), but with Java it is over a slothful SW interpreter (Virtual machine). surely the virtual machine is much slower than the Real machine & lags the flexibility needed to write device drivers.

Criteria 3. Portability
Portability is not a criteria that separates Java from C. Any case both C & Java are portable across platforms. Here again Java adds an initial problem of developing virtual machine for the native Platform. Which is equal in complexity as to port the C HW specific code across platforms.
Criteria 4. Reliability
This point alone complements Java for the security offered, even though this is of least importance in the Embedded scenario. The reliability is solely ensured by the interpreter, because this is the only piece of code that is going to run in the machine. Where as in C reliability lies in the hands of the developer, because every piece of code is going to run directly in the machine.

This is the risk taken counting on the advantages foreseen out of "C".
C shows sure possibility with a risk, where as Java shows impossibility.

If you have any point for or against the preceded discussion, please feel free to email me.

Micro controller Embedded Technology Real time O S CowBull Game
About me Feedback Links Home

All materials in this Web page are as per the author's understanding & perception. So if you find any aspect contradicting with that of others, please do detail it to the author : MichaelAnburaj@hotmail.com. This will help in perfecting the technical reach.

All rights reserved.
Contacts: Michael Anburaj

Hosting by WebRing.