首页 | 官方网站   微博 | 高级检索  
     

JMM与double/long变量同步方法探究
引用本文:俞松,郑骏,杨云.JMM与double/long变量同步方法探究[J].微处理机,2010,31(1):79-82,85.
作者姓名:俞松  郑骏  杨云
作者单位:华东师范大学计算中心,上海,200062
摘    要:Java存储模型是Java语言和Java虚拟机研究中的核心关键部分。Java语言规范规定:所有对基本类型的操作,除了对double/long类型的操作之外,都必须是原子级的。Java提供的volatile关键字可以使double/10ng变量实现变量级同步,但仍不能保证线程间同步。针对这些不足,结合实例分析了Java内存模型,syllchmnized方法,引入了硬件原语(CAS),给出了非阻塞算法的同步策略。

关 键 词:Java内存模型  Double/long变量  Volame关键字  synchronized方法  非阻塞算法

Study on JMM and Methods for Synchronizing Double and Long
YU Song,ZHENG Jun,YANG Yun.Study on JMM and Methods for Synchronizing Double and Long[J].Microprocessors,2010,31(1):79-82,85.
Authors:YU Song  ZHENG Jun  YANG Yun
Affiliation:YU Song,ZHENG Jun,YANG Yun(Computer Center,East China Normal University,Shanghai 200062,China)
Abstract:Java memory model(JMM) is an important topic in Java language and Java virtual machine(JVM) design.The Java Language Specification provides that all the primitive types of operations must be atomic except double/long types of operations.The Keywords-volatile can achieve variablesync for double/long variables,but still can not guarantee synchronization between threads.Based these deficiencies,this paper analyses Java Memory Model(JMM), synchronized methods and CAS.The strategy to design nonblocking algorithm...
Keywords:JMM  Double/long  Volatile  Synchronized  Nonblocking algorithms  
本文献已被 CNKI 维普 万方数据 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司    京ICP备09084417号-23

京公网安备 11010802026262号