Automated discovery of scoped memory regions for real-time Java

Automated discovery of scoped memory regions for real-time Java
复制标题

自动发现实时 Java 的作用域内存区域

DOI:
10.1145/512429.512433
复制
发表时间:
2002
影响因子:
7.2
通讯作者:
R. Cytron
R. Cytron
中科院分区:
工程技术1区
文献类型:
--
作者:
Morgan Deters;R. Cytron

文献摘要

被引文献

相似文献

操作系统和语言的进步使经过合理结合的执行时间的理想接近开发人员,这些开发人员需要对实时和嵌入式系统应用程序进行此类保证。最近,已在新兴标准中提出了针对Java库和虚拟机的扩展名,该标准提供了释放时间,执行成本和限制性类别线程的截止日期的规格。要使用此类功能,线程中执行的代码绝不能参考可能受到垃圾收集的存储。新标准为垃圾收集和交易量忽略了类似区域的,堆栈分配的区域(范围)的存储区域。现在,开发人员适应普通的Java代码使用实时Java范围内的内存区域。不幸的是,很难手动确定如何将对象实例映射到范围内。此外,如果修改了普通的Java代码以实现范围的实例化,则结果代码很难读取,维护和重复使用。静态分析可以产生所有程序执行中正确的范围,但是这种分析本质上必然是保守的。如果在此类分析下似乎永远存在太多的对象,那么开发人员不能仅依靠静态分析来形成合理的范围。在本文中,我们提出了一种方法,用于自动确定Java对象的适当存储范围,基于动态分析---观察到对象寿命和对象引用行为。尽管在所有程序执行中,这种分析也许不安全,但我们的分析可以与静态分析相结合,以验证对象的寿命,而事实则位于介于两者之间。我们提供的实验结果显示了我们技术发现的记忆区域。
Advances in operating systems and languages have brought the ideal of reasonably-bounded execution time closer to developers who need such assurances for real-time and embedded systems applications. Recently, extensions to the Java libraries and virtual machine have been proposed in an emerging standard, which provides for specification of release times, execution costs, and deadlines for a restricted class of threads. To use such features, the code executing in the thread must never reference storage that could be subject to garbage collection. The new standard provides for region-like, stack-allocated areas (scopes) of storage that are ignored by garbage collection and deallocated en masse. It now falls to the developer to adapt ordinary Java code to use the real-time Java scoped memory regions.Unfortunately, it is difficult to determine manually how to map object instantiations to scopes. Moreover, if ordinary Java code is modified to effect instantiations in scopes, the resulting code is difficult to read, maintain, and reuse. Static analysis can yield scopes that are correct across all program executions, but such analysis is necessarily conservative in nature. If too many objects appear to live forever under such analysis, then developers cannot rely on static analysis alone to form reasonable scopes.In this paper we present an approach for automatically determining appropriate storage scopes for Java objects, based on dynamic analysis---observed object lifetimes and object referencing behavior. While such analysis is perhaps unsafe across all program executions, our analysis can be coupled with static analysis to bracket object lifetimes, with the truth lying somewhere in between. We provide experimental results that show the memory regions discovered by our technique.