Managing garbage collection in a data processing system
First Claim
Patent Images
1. A computer implemented method for managing garbage collection, the computer implemented method comprising:
- granting a lock to a thread requesting the lock;
responsive to granting the lock, identifying whether the thread is one of a set of garbage collection threads;
responsive to identifying the thread is one of the set of garbage collection threads, initiating a garbage collection state;
responsive to detecting the garbage collection state, determining whether to change a priority of the thread identified using a policy comprising predetermined criteria including what threads are currently executing, what memory ranges are being accessed, and what processes are executing;
responsive to meeting the predetermined criteria, increasing a priority of each garbage collection thread identified in the set of garbage collection threads, wherein increasing the priority of each garbage collection thread in the set of garbage collection threads further comprises;
paging in other ones of the set of garbage collection threads, including expected data area accesses for the other ones of the set of garbage collection threads; and
paging in expected data area accesses for the thread identified;
responsive to detecting the garbage collection state, decreasing a priority of each thread in a set of non-garbage collection threads.
1 Assignment
0 Petitions
Accused Products
Abstract
A computer implemented method, apparatus, and computer program product for managing garbage collection. Monitoring is performed for a garbage collection state in a virtual machine. Responsive to detecting the garbage collection state, a priority for a set of garbage collection threads is increased.
-
Citations
22 Claims
-
1. A computer implemented method for managing garbage collection, the computer implemented method comprising:
-
granting a lock to a thread requesting the lock; responsive to granting the lock, identifying whether the thread is one of a set of garbage collection threads; responsive to identifying the thread is one of the set of garbage collection threads, initiating a garbage collection state; responsive to detecting the garbage collection state, determining whether to change a priority of the thread identified using a policy comprising predetermined criteria including what threads are currently executing, what memory ranges are being accessed, and what processes are executing; responsive to meeting the predetermined criteria, increasing a priority of each garbage collection thread identified in the set of garbage collection threads, wherein increasing the priority of each garbage collection thread in the set of garbage collection threads further comprises; paging in other ones of the set of garbage collection threads, including expected data area accesses for the other ones of the set of garbage collection threads; and paging in expected data area accesses for the thread identified; responsive to detecting the garbage collection state, decreasing a priority of each thread in a set of non-garbage collection threads. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer comprising:
-
a bus; a storage device connected to the bus, wherein program code is stored on the storage device; and a processor unit is connected to the bus, wherein the processor unit executes the program code; to grant a lock to a thread requesting the lock; responsive to granting the lock, to identify whether the thread is one of a set of garbage collection threads; responsive to identifying that the thread is one of the set of garbage collection threads, to initiate a garbage collection state; responsive to detecting the garbage collection state, to determine whether to change a priority of the thread identified using a policy comprising predetermined criteria including what threads are currently executing, what memory ranges are being accessed, and what processes are executing; responsive to meeting the predetermined criteria, to increase a priority of each garbage collection thread identified in the set of garbage collection threads, wherein increasing the priority of each garbage collection thread in the set of garbage collection threads further comprises; paging in other ones of the set of garbage collection threads, including expected data area accesses for the other ones of the set of garbage collection threads; and
paging in expected data area accesses for the thread identified; andresponsive to detecting the garbage collection state, to decrease a priority of each thread in a set of non-garbage collection threads. - View Dependent Claims (13, 14, 15, 16, 17)
-
-
18. A computer program product for managing garbage collection, the computer program product comprising:
-
a non-transitory computer recordable storage medium; program code, stored on the non-transitory computer recordable storage medium, for granting a lock to a thread requesting the lock; program code, stored on the non-transitory computer recordable storage medium, responsive to granting the lock, for identifying whether the thread is one of a set of garbage collection threads; program code, stored on the non-transitory computer recordable storage medium, responsive to identifying the thread is one of the set of garbage collection threads, for initiating a garbage collection state; program code, stored on the non-transitory computer recordable storage medium, responsive to detecting the garbage collection state, for determining whether to change a priority of the thread identified using a policy comprising predetermined criteria including what threads are currently executing, what memory ranges are being accessed, and what processes are executing; program code, stored on the non-transitory computer recordable storage medium, responsive to meeting the predetermined criteria for increasing a priority of each garbage collection thread identified in the set of garbage collection threads, wherein increasing the priority of each garbage collection thread in the set of garbage collection threads further comprises; program code, stored on the non-transitory computer recordable storage medium, for paging in other ones of the set of garbage collection threads, including expected data area accesses for the other ones of the set of garbage collection threads; and program code, stored on the non-transitory computer recordable storage medium, for paging in expected data area accesses for the thread identified; and program code, stored on the non-transitory computer recordable storage medium, responsive to detecting the garbage collection state, decreasing a priority of each thread in a set of non-garbage collection threads. - View Dependent Claims (19, 20, 21, 22)
-
Specification