The Artima Developer Community
Sponsored Link

Java Community News
Multi-Tasking the Java Platform: What's the Big Deal?

3 replies on 1 page. Most recent reply: Nov 30, 2006 9:33 AM by Frank Sommers

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Multi-Tasking the Java Platform: What's the Big Deal? Posted: Nov 29, 2006 1:04 PM
Reply to this message Reply
Summary
In addition to running multiple threads within one application, many use-cases call for running multiple applications inside a single JVM. Such JVM-level multi-tasking is important not only in mobile applications where resources are at a premium, but also on the desktop and the server. Mark Lam provides an implementor's view of Java multi-tasking.
Advertisement

The ability to execute multiple concurrent threads within a Java program has been possible since Java 1.0. However, multi-threading within an application is different from multi-tasking—the ability to execute concurrently running Java applications within the same JVM.

Concurrent program execution within a JVM is important in resource-constrained mobile devices, where a single JVM would have to run multiple midlets or even multiple applications within a small memory footprint.

However, recent trends indicate that such JVM-level multitasking may become common on the desktop and the server as well. For instance, some JVM implementations, such as some by Apple, facilitate quick application launching by loading new Java applications into an already-running JVM.

On the server, an InternetNews.com article, BEA To Shift Into Virtualization Software, last week pointed to BEA's new initiative, the WebLogic Server Virtual Edition (WLS-VE) 1.0, a Java EE server that will bypass a traditional operating system and will instead run directly on a hypervisor, or a virtual-machine monitor. Such systems will require that a single JVM execute multiple Java applications.

While multi-tasking gives greater control over Java applications to a JVM implementor, it is also much more complex to implement, and thus is expected to be supported only in a limited fashion, according to a recent blog post by Mark Lam, Multi-tasking the Java platform: What's the Big Deal?.

Lam points to four areas that a JVM will need to support to provide true multi-tasking. He compares these to how operating systems support multi-tasking:

  • Concurrency: Multiple applications can run on the same device at the same time. The OS may also ensure fair allocation of resources between the applications.
  • Isolation: Each application has its own VM environment. An application must not be able to interfere with other concurrently running apps, and vice versa. Bugs and misbehaviors are quarantined in the bad app's environment.
  • Reliable Termination: When an application misbehaves, the application manager must be able to terminate the bad applications and reclaim its resources reliably.
  • Efficiency: Reduce redundancy in resource usage and maximize sharing between applications. Also, reduce redundancy in initialization time of the Java VM for each application.

Lam points out that several of those goals are defined also in JSR 121, the Application Isolation API. That API attempts to define a compartmentalized JVM environment that will let multiple applications co-exist in the same VM.

Since JVM startup time and VM memory use are among the biggest outstanding complaints about Java performance, to what extent do you think a multi-tasking Java environment is important on the desktop and on the server?


Achilleas Margaritis

Posts: 674
Nickname: achilleas
Registered: Feb, 2005

Re: Multi-Tasking the Java Platform: What's the Big Deal? Posted: Nov 30, 2006 6:51 AM
Reply to this message Reply
...in other words, Java is to become a fully fledged operating system...no surprise there, becoming an O/S is the final stage for any software before its death...

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Multi-Tasking the Java Platform: What's the Big Deal? Posted: Nov 30, 2006 8:23 AM
Reply to this message Reply
> ...in other words, Java is to become a fully fledged
> operating system...no surprise there, becoming an O/S is
> the final stage for any software before its death...

Just like Unix, Linux, Windows, OSX, etc...

Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Re: Multi-Tasking the Java Platform: What's the Big Deal? Posted: Nov 30, 2006 9:33 AM
Reply to this message Reply
> ...in other words, Java is to become a fully fledged
> operating system...no surprise there, becoming an O/S is
> the final stage for any software before its death...

Actually, the point of the original blog was that implementing multi-tasking is not trivial, and therefore OS-type multi-tasking will not likely happen. Also, OSs are about much more than just multi-tasking. But some form of multi-tasking for the VM is really useful - even on the desktop, many people would prefer a single JVM that shares its static resources between various Java apps to having to start up a VM for every single application on one host.

Flat View: This topic has 3 replies on 1 page
Topic: Spring's New Configuration Option Previous Topic   Next Topic Topic: YourKit Profiler Prepares for 6.0 Release

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use