| By Paul Hohensee | Article Rating: |
|
| March 2, 2009 08:35 AM EST | Reads: |
10,724 |
The RTGC runs fully concurrent with application threads, and thus can be preempted at any time. There is no need to run the RTGC at the highest priority, and there are no stop-the-world application thread pauses. On a multiprocessor, one CPU can be doing some GC work while an application thread is making progress on another CPU.
Therefore, the RTGC is very flexible. While other real-time GCs must be executed as incremental, periodic, and high-priority activities (or else induce an allocation-time overhead), the Java RTS RTGC can execute according to many different scheduling policies.
Instead of trying to ensure determinism for all the threads of the application, the RTGC ensures hard real-time behavior for critical real-time threads only while offering soft real-time behavior for threads below the critical level. Total RTGC overhead is thus reduced and critical thread determinism is not impacted by the addition of new low-priority application threads. In addition, configuration is easier because there is no need to study the allocation behavior of an application in its entirety in order to configure the RTGC. You must consider only the behavior of critical tasks when designing the system. It’s unnecessary to reconfigure the RTGC when you add a new non-critical component or when the machine load changes.
The RTGC tries to recycle memory quickly enough for the non-critical real-time threads, but without offering any guarantees for them. If the non-critical load increases, the RTGC might fail to recycle memory fast enough to satisfy all threads’ allocation demand. Critical threads will not, however, be disrupted as long as enough memory is reserved to service them. Only non-critical real-time threads will be blocked and temporarily suffer jitter. The amount of memory to reserve is a key parameter that must be set by a programmer.
Finally, the RTGC has an auto-tuning mechanism that tries to find the best balance between determinism and throughput. Expert users can configure the auto-tuning system in order to improve that balance.
Conclusion
Real-time systems such as Java RTS and non-real-time systems such as Java SE can be configured to produce more or less degrees of predictability. True determinism can be obtained only from systems that bound jitter, which only a true real-time virtual machine can do.
If your application can tolerate some degree of non-determinism, then use a non-real-time virtual machine and tune it to obtain the response time you need, down to perhaps a 20 millisecond latency or so, but be aware that there will be occasional response time outliers. If you need response times below 20 milliseconds, even down to 30–70 microseconds, use Java RTS and its RTGC.
Achieving any degree of predictability requires trading off application throughput in various ways. Virtual machine selection and configuration therefore occurs along a predictability spectrum. As virtual machines evolve, we can expect to be able to specify a desired level of predictability and have the system configure itself automatically to achieve it. Until then, a degree of manual configuration will be necessary. Using Java RTS and RTGC minimizes the effort necessary to achieve sub-millisecond levels of predictability.
References
Published March 2, 2009 Reads 10,724
Copyright © 2009 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Paul Hohensee
Paul Hohensee is a senior staff engineer at Sun Microsystems where he is the Java Platform Standard Edition JVM Technical Lead. His primary focus is JVM performance along with hardware and platform support for Java and other dynamic languages. Earlier in his career he worked on dynamic binary translation as well as optimizing compilers and libraries for the first symmetric multiprocessors.
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- How PowerBuilder Got Its Groove Back
- The Cloud Has Cross-Border Ambitions
- Ulitzer Names The World's 30 Most Influential Virtualization Bloggers
- Ulitzer Named "New Media" Partner of Greatly Anticipated iStrategy Event in Berlin
- Risks and Enterprise Mobility?
- Steps for Success in Enterprise Mobility?
- Are Mobile Luddites Resisting Mobility?
- The Difference Between Web Hosting and Cloud Computing
- Sybase CTO to Speak at 4th International Cloud Computing Expo
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo and The End of Tech Recession
- The Transition to Cloud Computing: What Does It Mean For You?
- Five Reasons to Choose a Private Cloud
- Seeding The Cloud: The Future of Data Management
- The Threat Behind the Firewall
- Economy Drives Adoption of Virtual Lab Technology
- Tips for Efficient PaaS Application Design
- A Rules Engine Built in PowerBuilder
- Sybase Named “Silver Sponsor” of iPhone Developer Summit
- Where Are RIA Technologies Headed in 2008?
- PowerBuilder History - How Did It Evolve?
- The Top 250 Players in the Cloud Computing Ecosystem
- Custom Common Dialogs Using SetWindowsHookEx
- DDDW Tips and Tricks
- OLE - Extending the Capabilities of PowerBuilder
- DataWindow.NET How To: Data Entry Form
- Book Excerpt: Sybase Adaptive Server Anywhere
- Sybase ASE 12.5 Performance and Tuning
- Working with SOA & Web Services in PowerBuilder
- Office 2003 Toolbar: A New Look For Your Old PowerBuilder App
- Dynamically Creating DataWindow Objects


































