摘要:
A copying garbage collector evacuates to a to space the objects in a from space that are referred to by references, including references in previously evacuated objects, that are located outside the from space. It divides the to space into local-allocation buffers (“LABs”), and it adopts one of these as a destination LAB, i.e., as the LAB into which it places the objects that it evacuates. When a destination LAB becomes full, the thread adopts a new LAB as its destination LAB. When a destination LAB's contents fill it to some predetermined fill threshold, that destination LAB becomes the source LAB, i.e., the LAB that the collector scans for references to the collection-set objects. If a previous source LAB's contents has not yet been completely scanned when the collector thus adopts a new source LAB, the previous source LAB is placed on a LAB stack. When no more references to unevacuated collection-set objects remain in its current source LAB, the collector then pops a LAB from its LAB stack on a last-in, first-out basis and adopts that LAB as the source LAB.
摘要:
A garbage collector divides the garbage-collected heap into “cards.” It maintains a table containing a card-object table entry for each card. A card's entry contains information from which the collector can determine where any references in the card are located and thereby identify objects that may be reachable. Specifically, although each entry is smaller than a memory address, it has enough possible values to give the relative location of the object in which the associated card begins or to direct the collector to another entry for that information. But the entries are additionally grouped into sequences of contiguous entries that together are large enough to contain a complete address. When every card associated with a entry in a given (address-sized) entry sequence begins in the same object, that entry sequence is together given a value that the collector can recognize as indicating that object's absolute location.
摘要:
In a garbage collector that employs the train algorithm, remembered sets are employed to record the locations of references to objects in a train car in objects outside the car. During each collection, remembered set entries are processed to find the locations of references into the cars yet to be collected. The found locations are stored in scratch-pad lists, and each entry in that list includes a mode indicator that specifies whether the entry represents a single reference location or the locations of more than one reference. One possible value of the mode indicator indicates that the entry consists of two computer words rather than one, the second computer word containing a list of offsets into a region specified by the first word. Another possible mode-indicator value indicates that a region contains references, but it does not specify where within the region those references occur.
摘要:
A multi-threaded garbage collector operates in increments and maintains, for each of a plurality of car sections in which it has divided a portion of the heap, a respective remembered set of the locations at which it has found references to objects in those car sections. It stores the remembered sets in respective hash tables, whose contents it updates in a scanning operation, executed concurrently by multiple threads, in which it finds references and records their locations in the appropriate tables. Occasionally, one of the threads replaces the hash table for a given car section. Rather than wait for the replacement operation to be completed, a thread that has an entry to be made into that car section's remembered set accesses the old table to find out whether the entry has already been made. If so, no new entry is necessary. Otherwise, it places an entry into the old table and sometimes places an insertion record containing that entry into a linked list associated with that car section. When the reclaiming thread has finished transferring information from the old table to the new table, it transfers information from the linked list of insertion records into the new table, too. In this way, the replacement process is not a bottleneck to other threads' performing update operations.
摘要:
A novel linked-list-based concurrent shared object implementation has been developed that provides non-blocking and linearizable access to the concurrent shared object. In an application of the underlying techniques to a deque, non-blocking completion of access operations is achieved without restricting concurrency in accessing the deque's two ends. In various realizations in accordance with the present invention, the set of values that may be pushed onto a shared object is not constrained by use of distinguishing values. In addition, an explicit reclamation embodiment facilitates use in environments or applications where automatic reclamation of storage is unavailable or impractical.
摘要:
Mechanisms and techniques operate in a computerized device to execute critical code without interference from interruptions. Critical code is registered for invocation of a critical execution manager in the event of an interruption to the critical code. The critical code is then executed until an interruption to the critical code occurs. After handling the interruption, a critical execution manager is invoked and the critical execution manager detects if an interference signal indicates a reset value. If the interference signal indicates the reset value, the critical execution manager performs a reset operation on the critical code to reset a current state of the critical code to allow execution of the critical code while avoiding interference from handling the interruption and returns to execution of the critical code using the current state of the critical code.
摘要:
A garbage collector collects a train-managed heap in accordance with the train algorithm. In doing so, it concentrates into a respective train the heap-located objects that belong to garbage cycles even if those cycles additionally include certain types of objects that are outside the train-managed heap. It does so by using objects within the heap as proxies for those extra-heap objects, and it evacuates into a proxy object's train any collection-set objects referred to by the extra-heap objects for which the proxy object is a proxy. The objects in those garbage cycles containing the extra-heap objects can thereby be collected incrementally despite the extra-heap references to them.
摘要:
A garbage collector collects a generation of a collected heap in accordance with the train algorithm. It employs remembered sets associated with respective car sections to keep track of references into the associated car sections. Each remembered set contains entries that identify respective regions in the generation that contain references into the associated car section. In some collection cycles, the collector collects a collection set of more than one car section. When it does, it processes the remembered-set entries by searching the regions specified thereby not only for references into the associated car sections but also for references into other car sections in the collection set. The collector further treats the generation as divided into segments, for each of which it maintains a Boolean value that indicates whether the segment has been searched during the current collection cycle. If it has, the collector does not search it in response to a subsequently encountered remembered-set entry that identifies a region in which that segment is included.
摘要:
A garbage collector that employs the train algorithm identifies popular objects by a count of references to them and places such objects into special, single-object car sections that are normally smaller than the car sections employed for objects that are less popular. When such cars are part of the collection set and evacuated, the evacuation occurs by relinking, without relocating the objects and memory. References to such popular objects therefore do not need to be updated as a result of evacuation. A limit is imposed on the number of entries in the remembered sets used to keep track of references to objects and such popular-object car sections, and any popular-object car section whose remembered set has more than a threshold number of entries is treated as reachable and still popular without having the memory regions that those entries identify searched for valid references.