发明授权
US6134627A Thread synchronization in a computer controlled by an object-based program 失效
由基于对象的程序控制的计算机中的线程同步

Thread synchronization in a computer controlled by an object-based
program
摘要:
A method for synchronizing threads in a computer operating under control of a program written in an object-based computer programming language provides for a first thread to lock an object by moving the object header to a stack address and replacing the header with the stack address. The first thread unlocks the object by returning the header to its associated memory location. Second and subsequent threads attempting to access a locked object detect the presence of the stack address in the header memory location and suspend their attempts to access the object. When using aligned stacks, all stack addresses will be even, and all object-headers will be odd. Threads efficiently check the status of the object by testing the least significant bit. A preferred method is implemented in a "JAVA" just-in-time compiler of a "JAVA" virtual machine.
信息查询
0/0