摘要:
A computer system employing a plurality of concurrent threads to perform tasks that dynamically identify further similar tasks employs a double-ended queue (“deque”) to list the dynamically identified tasks. If a thread's deque runs out of tasks while other threads' deques have tasks remaining, the thread whose deque has become empty will remove one or more entries from another thread's deque and perform the tasks thereby identified. When a thread's deque becomes too full, it may allocate space for another deque, transfer entries from its existing deque, place an identifier of the existing deque into the new deque, and adopt the new deque as the one that it uses for storing and retrieving task identifiers. Alternatively, it may transfer some of the existing deque's entries into a newly allocated array and place an identifier of that array into the existing deque. The thread thereby deals with deque overflows without introducing additional synchronization requirements or restricting the deque's range of use.
摘要:
Mechanisms and techniques operate in a computerized device to perform a memory management technique such as garbage collection. The mechanisms and techniques operate to detect, within a storage structure associated with a thread, general memory references that reference storage locations in a general memory area such as a heap. The storage structure may be a stack utilized by the thread, which may be, for example, a Java thread, during operation of the thread in the computerized device. The system maintains a reference structure containing an association to the general memory area for each detected general memory reference within the storage structure. The system then operates a memory management technique on the general memory area for locations in the general memory area other than those for which an association to the general memory area is maintained in the reference structure, thus increasing the performance of the memory management technique.
摘要:
A technique provides a remote serialization guarantee within a computerized system. The technique involves (i) receiving a serialization command from a first thread running on a first processor of the computerized system; (ii) running, on a second processor, a second thread up to a serialization point; and (iii) outputting a serialization result to the first thread in response to the serialization command. The serialization result indicates that the second thread has run up to the serialization point. Such operation enables the first and second threads to robustly coordinate access to a shared resource by the first thread incurring both the burden of employing a MEMBAR instruction and the burden of providing the remote serialization command when attempting to access the shared resource, and the second thread not running any MEMBAR instruction when attempting to access the shared resource to enable the second thread to run more efficiently.
摘要:
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.
摘要:
The invention relates to a method for performing generational garbage collection on a heap comprising a plurality of generations. The method involves dividing a young generation of the heap into a first young generation and a second young generation, evacuating the first young generation concurrently with allocating the second young generation, and evacuating the second young generation concurrently with allocating the first young generation and subsequent to fully evacuating the first young generation.
摘要:
A concurrent incremental garbage collector where tracking and summarization of modified references is concurrent with application operations. A card table is arranged with write barriers so that an application's modification of objects in memory cards are memorialized in the card table. The collector performs an atomic operation, e.g., a compare-and-swap (CAS), on the card table to detect modified or written to objects. Card table indicators of dirtied cards are reset or emptied and the corresponding dirtied cards are scanned for the modifications and the remembered sets updated. Another CAS is performed on the same card table and if any dirtied cards are indicated the collector preserves the card table with the dirtied indicators and operates on a distant card table. If the CAS succeeds no modifications were made and the collector operates on the next scheduled card table group.
摘要:
A computer system, method and software for detecting and purging stale entries from remembered sets associated with incrementally collectible regions used in an incremental garbage collection technique like the Trains algorithm is described. Stale entries are detected by a number of techniques, and then purged, eliminated, or scrubbed. These techniques make use of the summarized information about regions such as cards or incrementally collectible regions that indicate age of allocation, time a region was last scanned, last time an entry was inserted into a remembered set, as well as how far forward or backward objects in a given region refer in a generation.
摘要:
A garbage collector for more efficient placement of objects referenced from external references. The expected life times of these objects is measured by trial and error, by the class or type, by how often the object has been evacuated or the external reference processed, by the stability and longevity of the root source, or by the prolificness of the class or type of object. The measured value is held in the header of each object in an AGE field available for this purpose. These objects may be evacuated into existing trains or into new trains, or into a combination of existing and new trains. When new trains are created the trains are distributed among the existing trains according to a distribution contour that may be linear, normal, gamma or any other contour that might be found useful. Also, when new trains are created the youngest train must be a new train. When objects are evacuated into existing trains the objects are placed in trains according the survivability of the objects with the longer-lived objects placed proportionally in the younger trains. The objects are evacuated into the new trains from oldest to youngest trains according to the value in the AGE field. The higher the value the younger the train. A threshold on the AGE value may be established such that when the threshold is reached, the objects are evacuated into the youngest new train.
摘要:
A garbage collector employs the train algorithm to collect a generation in a dynamically allocated heap. When direct allocation of an object into the generation results in the need to allocate a new car section, the collector makes a determination of whether a new collection increment or interval needs to be initiated. It makes this determination by comparing the amount of new allocation in that generation with a threshold value. During each collection increment, it updates the threshold value by determining how much can occur during the next collection increment without exceeding an allowable pause time. It then projects from that value how much memory-space reclamation is likely to occur. From that likely amount of reclamation, it arrives at a limit on the permitted amount of allocation.
摘要:
A garbage collector collects a dynamically allocated heap by employing the train algorithm, in which “car” sections of a heap generation are organized in groups, or “trains.” When a car section comes up for collection, objects that it contains are evacuated if they are referred to by references located in cars not currently being collected. The cars to which they are evacuated belong to the trains that contain the references. The trains form a sequence in which their constituent cars are to be collected, and objects that are directly allocated in the generation are placed into trains that precede some existing train in the collection sequence.