线程笔记

Chapter 20 of Inside the Java Virtual Machine
Thread Synchronization

 

 

 

1.Java's monitor supports two kinds of thread synchronization: mutual exclusion and cooperation.

 

2.. On a Java virtual machine implementation that doesn't time slice, however, a higher priority thread that is never blocked will interfere with any lower priority threads, even if none of the threads share data.

 

3.The form of monitor used by the Java virtual machine is called a "Wait and Notify" monitor.

 

4.monitor 模型

 

 

5.The Java virtual machine offers two kinds of notify commands: "notify" and "notify all." A notify command selects one thread arbitrarily from the wait set and marks it for eventual resurrection. A notify all command marks all threads currently in the wait set for eventual resurrection.

 

6.To a great extent, the manner in which a Java virtual machine implementation selects the next thread from the wait or entry sets is a decision of individual implementation designers.平台不同性

 

 

7.Java programs need to coordinate multi-threaded access to two kinds of data: o instance variables, which are stored on the heap o class variables, which are stored in the method area Programs never need to coordinate access to local variables, which reside on Java stacks, because data on the Java stack is private to the thread to which the Java stack belongs.

 

 

8. In Java, there are two kinds of monitor regions: synchronized statements and synchronized methods.

 

9.Note that as a Java programmer, you never explicitly lock an object. Object locks are internal to the Java virtual machine

 

 

java虚拟机的运行机理的详细介绍 Inside the Java Virtual Machine Bill Venners $39.95 0-07-913248-0 Inside the Java Virtual Machine Acknowledgments Introduction Part One: Java's Architecture 1 Introduction to Java's Architecture Why Java? The Architecture The Java Virtual Machine The Class Loader Architecture The Java Class File The Java API The Java Programming Language Architectural Tradeoffs Future Trends On the CD-ROM The Resources Page 2 Platform independence Why Platform Independence? Java's Architectural Support for Platform Independence Scalability Factors that Influence Platform Independence The Java Platform Native Methods Other Factors Seven Steps to Platform Independence The Politics of Platform Independence The Resources Page 3 Security Why Security? The Sandbox The Class Loader Architecture The Class File Verifier Phase One: Internal Checks Phase Two: Verification of Symbolic References Safety Features Built Into the Java Virtual Machine The Security Manager and the Java API The Security API Security Beyond the Architecture The Resources Page 4 Network-mobility Why Network Mobility? A New Software Paradigm Java's Architectural Support for Network-Mobility The Applet: An Example of Network-Mobile Java The Resources Page Part Two: Java Internals 5 The Java Virtual Machine What is a Java Virtual Machine? The Lifetime of a Java Virtual Machine The Architecture of the Java Virtual Machine Data Types Word Size The Class Loader Subsystem Loading, Linking and Initialization The Primordial Class Loader Class Loader Objects Name Spaces The Method Area Type Information The Constant Pool Field Information Method Information Class Variables A Reference to Class ClassLoader A Reference to Class Class Method Tables An Example of Method Area Use The Heap Garbage Collection Object Representation Array Representation The Program Counter The Java Stack The Stack Frame Local Variables Operand Stack Frame Data Possible Implemen
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值