W. Pugh
{"title":"The Java memory model is fatally flawed","authors":"W. Pugh","doi":"10.1002/1096-9128(200005)12:6%3C445::AID-CPE484%3E3.0.CO;2-A","DOIUrl":null,"url":null,"abstract":"The Java memory model described in Chapter 17 of the Java Language Specification gives constraints on how threads interact through memory. This chapter is hard to interpret and poorly understood; it imposes constraints that prohibit common compiler optimizations and are expensive to implement on existing hardware. Most JVMs violate the constraints of the existing Java memory model; conforming to the existing specification would impose significant performance penalties. \n \nIn addition, programming idioms used by some programmers and used within Sun's Java Development Kit is not guaranteed to be valid according to the existing Java memory model.Furthermore, implementing Java on a shared-memory multiprocessor that implements a weakmemory model poses some implementation challenges not previously considered. Copyright © 2000 John Wiley & Sons, Ltd.","PeriodicalId":199059,"journal":{"name":"Concurr. Pract. Exp.","volume":"16 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2000-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"92","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Concurr. Pract. Exp.","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1002/1096-9128(200005)12:6%3C445::AID-CPE484%3E3.0.CO;2-A","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 92
Java内存模型存在致命缺陷
Java语言规范第17章中描述的Java内存模型给出了线程如何通过内存交互的约束。这一章很难解释和理解;它施加了限制,禁止通用的编译器优化,并且在现有硬件上实现成本很高。大多数jvm违反了现有Java内存模型的约束;遵从现有的规范将会带来严重的性能损失。此外,一些程序员使用的和Sun的Java开发工具包中使用的编程习惯并不能保证根据现有的Java内存模型是有效的。此外,在实现弱内存模型的共享内存多处理器上实现Java会带来一些以前没有考虑到的实现挑战。版权所有©2000约翰威利父子有限公司
本文章由计算机程序翻译,如有差异,请以英文原文为准。