【24h】

Plan B: A Buffered Memory Model for Java

机译:计划B:Java的缓冲内存模型

获取原文

摘要

Recent advances in verification have made it possible to envision trusted implementations of real-world languages. Java with its type-safety and fully specified semantics would appear to be an ideal candidate; yet, the complexity of the translation steps used in production virtual machines have made it a challenging target for verifying compiler technology. One of Java's key innovations, its memory model, poses significant obstacles to such an endeavor. The Java Memory Model is an ambitious attempt at specifying the behavior of multithreaded programs in a portable, hardware agnostic, way. While experts have an intuitive grasp of the properties that the model should enjoy, the specification is complex and not well-suited for integration within a verifying compiler infrastructure. Moreover, the specification is given in an axiomatic style that is distant from the intuitive reordering-based reasonings traditionally used to justify or rule out behaviors, and ill suited to the kind of operational reasoning one would expect to employ in a compiler. This paper takes a step back, and introduces a Buffered Memory Model (BMM) for Java. We choose a pragmatic point in the design space sacrificing generality in favor of a model that is fully characterized in terms of the reorderings it allows, amenable to formal reasoning, and which can be efficiently applied to a specific hardware family, namely x86 multiprocessors. Although the BMM restricts the reorderings compilers are allowed to perform, it serves as the key enabling device to achieving a verification pathway from bytecode to machine instructions. Despite its restrictions, we show that it is backwards compatible with the Java Memory Model and that it does not cripple performance on TSO architectures.
机译:验证方面的最新进展使得可以设想现实世界语言的受信任实现。具有类型安全性和完全指定的语义的Java似乎是理想的选择。然而,生产虚拟机中使用的翻译步骤的复杂性使其成为验证编译器技术的具有挑战性的目标。 Java的主要创新之一是其内存模型,这对这种努力构成了重大障碍。 Java内存模型是一种以可移植的,与硬件无关的方式指定多线程程序的行为的雄心勃勃的尝试。尽管专家对模型应具有的属性有直观的了解,但规范很复杂,不适合在验证的编译器基础结构中进行集成。而且,该规范是以公理的方式给出的,它与传统上用于证明或排除行为的基于直观的基于重排序的推理相去甚远,并且不适合希望在编译器中采用的那种操作推理。本文退后一步,介绍了Java的缓冲内存模型(BMM)。我们在设计空间中选择一个实用性的点,以牺牲通用性为基础,选择一种模型,该模型在其允许的重排序方面完全表征,可以进行形式推理,并且可以有效地应用于特定的硬件系列,即x86多处理器。尽管BMM限制了允许编译器执行的重新排序,但它是实现从字节码到机器指令的验证路径的关键启用设备。尽管有其限制,但我们证明它与Java内存模型向后兼容,并且不会降低TSO体系结构的性能。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号