Thread suspension system and method using trapping instructions
Abstract
By encoding an exception triggering value in storage referenced by an instruction in an otherwise unused slot (e.g., the delay slot of a delayed control transfer instruction or an unused instruction position in a VLIW-based architecture) coinciding with a safe point, an efficient coordination mechanism can be provided for multi-threaded code. Because the mechanism(s) impose negligible overhead when not employed and can be engaged in response to an event (e.g., a start garbage collection event), safe points can be defined at call, return and/or backward branch points throughout mutator code to reduce the latency between the event and suspension of all threads. Though particularly advantageous for thread suspension to perform garbage collection at safe points, the techniques described herein are more generally applicable to program suspension at coordination points coinciding with calls, returns, branches or calls, returns and branches therein.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 19 · Forward citations: 34.
Claims (3 — 1 Independent, 2 Dependent)
- Claim 1Independent Claim
A computer program product encoded in at least one computer readable medium, the computer program product comprising: mutator code executable by a processor and including an instruction that coincides with a safe point in an execution path thereof, the instruction explicitly encoding parallelism amongst multiple component operations thereof, wherein, based on a settable state of the processor, one of the operations of the instruction selectively triggers suspension of the mutator code at the safe point.
- Claim 2Depends on #1
The computer program product of claim 1 , wherein the suspension triggering operation includes a conditional trap operation; and wherein the settable state is encoded in storage accessed on execution by the conditional trap operation.
- Claim 3Depends on #1
The computer program product of claim 1 , wherein the processor includes a very long instruction word-type
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (15 of 34 total)
References Cited — Backward Prior Art (19)
Non-Patent Literature (5)
- "MAJC(TM) Architecture Tutorial" Sun Microsystems, Inc., White Paper, Sep. 1999, 18 pages [online], Retrieved from the Internet, printed Oct. 29, 2002 <URL: http://www.sun.com/processors/whitepapers/ipdps<SUB>-</SUB>Sudhafinal.pdf>.
- Appel, "Modern Compiler Implementation in C: Basic Techniques", Cambridge University Press (1998), pp. 125-149 and pp. 291-297.
- Boehm, Hans J; "Simple Garbage-Collector-Safety", p. 89-98, ACM 1996, retrieved Dec. 7, 2004.
- De Gloria, Alessandro; Faraboschi, Paolo; "A Programmable Instruction Format Extension to VLIW Architectures", p. 35-40, 1992 IEEE, retrieved Dec. 7, 2004.
- Jones & Lins, "Garbage Collection: Algorithms for Automatic Dynamic Memory Management," Wiley (1996), pp. 1-41.