Thread synchronization in a computer controlled by an object-based program
Abstract
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.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 16 · Forward citations: 24.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method for controlling operations on an object in a computer operating under control of an object-based program, said object having an object header, an associated operation, and an associated state characteristic, the object header being integrally associated with the object, said method comprising: establishing the object in a memory region, wherein a portion of the memory region is associated with the object header; placing a predetermined pattern into the portion of the memory region associated with the object header using a first thread, wherein placing the predetermined pattern into
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗