JMM与double/long变量同步方法探究  

Study on JMM and Methods for Synchronizing Double and Long

在线阅读下载全文

作  者:俞松[1] 郑骏[1] 杨云[1] 

机构地区:[1]华东师范大学计算中心,上海200062

出  处:《微处理机》2010年第1期79-82,85,共5页Microprocessors

摘  要:Java存储模型是Java语言和Java虚拟机研究中的核心关键部分。Java语言规范规定:所有对基本类型的操作,除了对double/long类型的操作之外,都必须是原子级的。Java提供的volatile关键字可以使double/long变量实现变量级同步,但仍不能保证线程间同步。针对这些不足,结合实例分析了Java内存模型,synchronized方法,引入了硬件原语(CAS),给出了非阻塞算法的同步策略。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 variable- sync 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 algorithms for synchronizing non - atomic treatment of double and long is proposed.

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

分 类 号:TP3[自动化与计算机技术—计算机科学与技术]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象