Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > embedded systems...

Reply
Thread Tools

embedded systems...

 
 
merodeshpyarocha
Guest
Posts: n/a
 
      04-20-2004
Hi,
I just want to know whether Java
a) Is as good as C/C++ for embedded and real time systems? JVM handles
the memory allocation/deallocation in Java, so does this impose any
restrictions on real time and embedded systems?
b)Has anyone ever written device drivers in Java? If so, could you
emphasize on the experience u had?
c)
 
Reply With Quote
 
 
 
 
Chris Smith
Guest
Posts: n/a
 
      04-20-2004
merodeshpyarocha wrote:
> I just want to know whether Java
> a) Is as good as C/C++ for embedded and real time systems? JVM handles
> the memory allocation/deallocation in Java, so does this impose any
> restrictions on real time and embedded systems?


You would certainly not use plain Java for this. There is a
specification for real-time extensions to Java, which includes (among
other things) the ability to manually allocate and de-allocate
uncollected memory. I'm not very familiar with this area, actually.

> b)Has anyone ever written device drivers in Java? If so, could you
> emphasize on the experience u had?


Unfortunately, the phrase "device driver" doesn't have a lot of clear
delineation of meaning. At the lowest level, you couldn't write a
device driver in Java; Java can only do computation plus those things
for which an API exists already. Step a level up, though, and you could
certainly write something that may be reasonably called a "device
driver" that sits on top of the Comm API, for example, and talks to a
specific device through a serial port. That wouldn't be very difficult
at all.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 
Reply With Quote
 
 
 
 
chris
Guest
Posts: n/a
 
      04-21-2004
merodeshpyarocha wrote:

> Hi,
> I just want to know whether Java
> a) Is as good as C/C++ for embedded and real time systems? JVM handles
> the memory allocation/deallocation in Java, so does this impose any
> restrictions on real time and embedded systems?


Define "as good".

Java has a lot of good qualities, and some of them are valuable in embedded
systems, where e.g. stale pointers or memory leaks can be even more harmful
than in desktop or server systems.

If you want to do direct access to memory-mapped devices and stuff like
that, then Java is not the obvious way to do it; although the so-called
Real-Time extensions do allow you do do that.

On embedded systems you generally don't have the resources to do the things
which server-side implementations use to improve performance, so expect
things to run slower; unless you pre-compile all your Java to native code,
as can be done with gcj or Aicas' proprietary build chain. In the case of
gcj you will probably then find that the resulting binary is too big :-/
(this is being worked on).

With most implementations garbage collection leads to a level of timing
"jitter" which may or not be acceptable, depending on your real-time
requirements. Here again Aicas' toolchain can help, in that it allows you
to specify an acceptable response time and calculate the heap size (if any)
that will allow you to achieve this.

> b)Has anyone ever written device drivers in Java? If so, could you
> emphasize on the experience u had?


Chris Smith already answered this pretty well. I'd just add that some
"real-time" implementations do allow physical access - Aicas, NewMonics,
TimeSys come to mind.

> c)


See the puff I just write for a trade show:
<http://www.kiffer.be/k/whitepaper.pdf>.

--
Chris Gray http://www.velocityreviews.com/forums/(E-Mail Removed)
/k/ Embedded Java Solutions

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Embedded <divs> with events: How to prevent the parent div's eventfrom being fired when the embedded div's event is fired? Num GG Javascript 2 11-17-2008 08:56 PM
Embedded vs. Non-embedded Tests Trans Ruby 11 09-05-2007 11:22 AM
Embedded languages based on early Ada (from "Re: Preferred OS, processor family for running embedded Ada?") Colin Paul Gloster VHDL 48 04-10-2007 10:31 AM
How to display images embedded in e-mail as embedded, not attachments Jim Firefox 4 12-11-2004 05:36 AM
Databind an embedded control in an embedded datagrid Thomas Dodds ASP .Net Datagrid Control 0 07-26-2004 08:20 PM



Advertisments