Real-time computer “garbage collector”
First Claim
1. A method for performing real-time computer garbage collection, for use with a plurality of data objects and with one or more mutator programs, each one of said mutators having a corresponding thread and each one of said mutator threads having a corresponding thread state separate from said plurality of data objects, said method comprising the following steps:
- commencing a new garbage collection cycle;
temporarily restricting execution of said mutators while processing the corresponding thread state for each one of said mutators;
permitting each one of said mutators to resume unrestricted execution, as soon as said mutator'"'"'s own corresponding thread state has been processed;
completing the garbage collection cycle by identifying each one of said objects that is currently accessible to at least one of said mutators.
4 Assignments
0 Petitions
Accused Products
Abstract
The present invention provides a novel method and apparatus for performing real-time computer garbage collection, in a manner that offers unprecedented low bounds on the worst-case frequency and duration of the collection task. The invention is used with a plurality of data objects and with one or more mutator programs. The mutators and a garbage collector run on one or more processors. The mutators each have a corresponding thread with a corresponding thread state. In the present invention, execution of all mutators is temporarily restricted at the start of each new garbage collection cycle. However, unrestricted execution of a mutator is quickly resumed, as soon as that mutator'"'"'s thread state is processed. The remainder of the garbage collection cycle may be performed concurrently with the mutators. In another feature of the present invention yielding important performance benefits, the mutators are executed subject to a protective write barrier, but the write barrier does not have to be applied to the modification of mutator thread states.
87 Citations
17 Claims
-
1. A method for performing real-time computer garbage collection, for use with a plurality of data objects and with one or more mutator programs, each one of said mutators having a corresponding thread and each one of said mutator threads having a corresponding thread state separate from said plurality of data objects, said method comprising the following steps:
-
commencing a new garbage collection cycle;
temporarily restricting execution of said mutators while processing the corresponding thread state for each one of said mutators;
permitting each one of said mutators to resume unrestricted execution, as soon as said mutator'"'"'s own corresponding thread state has been processed;
completing the garbage collection cycle by identifying each one of said objects that is currently accessible to at least one of said mutators. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. An apparatus for performing real-time computer garbage collection, for use with a plurality of data objects and with one or more mutator programs, each one of said mutators having a corresponding thread and each one of said mutator threads having a corresponding thread state separate from said plurality of data objects, said apparatus comprising:
-
a garbage collector for processing the corresponding thread states of said mutators at the beginning of a garbage collection cycle, and for identifying each one of said data objects that is accessible to at least one of said mutators during said cycle;
one or more processors for executing said garbage collector and said mutators; and
scheduling means coupled to said processors for scheduling execution of said garbage collector and said mutators on said processors, said scheduling means being operative to temporarily restrict execution of said mutators while the corresponding thread state is being processed for each one of said mutators, and to permit each one of said mutators to resume unrestricted execution as soon as said mutator'"'"'s own corresponding thread state has been processed. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16, 17)
-
Specification