Nothing Special   »   [go: up one dir, main page]

US20050198079A1 - Process and system for real-time relocation of objects during garbage collection - Google Patents

Process and system for real-time relocation of objects during garbage collection Download PDF

Info

Publication number
US20050198079A1
US20050198079A1 US11/100,984 US10098405A US2005198079A1 US 20050198079 A1 US20050198079 A1 US 20050198079A1 US 10098405 A US10098405 A US 10098405A US 2005198079 A1 US2005198079 A1 US 2005198079A1
Authority
US
United States
Prior art keywords
threads
memory location
thread
mutator
pointer
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
US11/100,984
Inventor
Beat Heeb
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ESMERTEC AG
Original Assignee
ESMERTEC AG
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ESMERTEC AG filed Critical ESMERTEC AG
Priority to US11/100,984 priority Critical patent/US20050198079A1/en
Publication of US20050198079A1 publication Critical patent/US20050198079A1/en
Assigned to ESMERTEC AG reassignment ESMERTEC AG ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: HEEB, BEAT
Abandoned legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code
    • G06F8/4436Exlining; Procedural abstraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/52Binary to binary
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44589Program code verification, e.g. Java bytecode verification, proof-carrying code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution

Definitions

  • the present invention relates to computer memory management. More particularly, the present invention relates to garbage collection.
  • object refers to a data structure represented in a computer system memory.
  • An object is identified by a reference, also known as a pointer, which is a small amount of information that is used to access the object.
  • a reference to an object is the memory address of the object, but there are other ways to represent a reference.
  • An object may contain a number of fields of data, which can be characters, integers, references, or other types of data.
  • objects are data structures that encapsulate data and methods that operate on that data.
  • Objects are instances of classes, where a class includes method code and other information that is common to all objects belonging to the class. Methods, which define actions the class can perform, may be invoked using the reference to the object.
  • the pattern in which objects are allocated may depend on run-time conditions, which may not be known beforehand. Dynamic allocation typically allows memory reuse and can, accordingly, generate large numbers of objects whose total memory size requirements could exceed the system memory resources at any given time.
  • the library function malloc( ) is often used for allocation.
  • the library function free( ) is often used to release memory for objects that are no longer in use.
  • Allocation and freeing of dynamic memory should be performed carefully. If an application fails to reclaim unused memory, system memory requirements will grow over time and eventually exceed available resources. This kind of error is known as a memory leak. Another kind of error occurs when an application reclaims memory allocated to an object even though it still maintains a reference to the object. Typically, an application should not retain a reference to a memory location once that memory location is reclaimed because, if the reclaimed memory is reallocated for a different purpose, the application may inadvertently manipulate the same memory in multiple inconsistent ways. This kind of error is known as a dangling reference. Explicit dynamic memory management by using interfaces like malloc( ) and free( ) often leads to these problems.
  • GC garbage collection
  • Statically allocated objects are reachable at all times while a program is running, and may refer to dynamically allocated objects, which are then also reachable. Objects referred by execution stacks and processor registers are reachable, as well. Moreover, any object referred to by a reachable object is itself reachable.
  • GC normally requires global knowledge of a system in order to allocate and reuse memory. For example, a developer working on a local piece of code will generally not know whether other parts of the system are using a particular object, so memory reclamation calls are extremely difficult to insert manually without error. By using GC, the developer may ensure proper allocation and reuse, leading to more robust systems with fewer memory leaks and no dangling references.
  • GC Since GC normally requires global knowledge, GC implementations may suffer from problems, such as excessive pause times.
  • Application threads that mutate memory state also known as mutators, need to make steady progress to solve tasks at hand. At the same time, GC may alter the memory that mutators work on.
  • a common solution is to run GC in one or more separate threads, and when GC runs, all mutator threads are stopped. Gaining global knowledge of a system can be time-consuming, and mutator threads may then experience excessive pause times.
  • a system must process digital signals at a rate of 20 packets per second. Processing a packet takes 10 milliseconds, and receiving and transmitting each takes another 10 milliseconds. This leaves 20 milliseconds of idle time of the 50 milliseconds available per packet. If GC runs for more than 20 milliseconds during any particular 50 millisecond interval, the system cannot keep up. It would be desirable to guarantee that during any particular 50 millisecond interval, GC will not pause mutators for more than 20 milliseconds.
  • all references to the object must be updated before paused mutators can proceed.
  • the amount of work required is potentially large, and maximum GC pause times cannot be guaranteed.
  • One solution is to use indirect pointers, also known as object tables, but this leads to excessive memory use and a number of other problems (see, e.g., Garbage Collection, by Jones et al.).
  • Other solutions include various “replicated based” copying collectors, but they impose sever performance penalties on mutators unless special hardware support is present.
  • Garbage collection algorithms are commonly divided into three basic algorithms: mark/sweep, copying, and reference counting. Examples of possible marking and copying algorithms are:
  • a technique for real-time allocation of objects during garbage collection involves guaranteeing bounds on mutator thread pause times.
  • An example process according to the technique includes relocating an object in real-time during garbage collection, pausing mutator threads, bounding mutator pause times by scanning only one of a plurality of mutator threads, and resuming the mutator threads.
  • the process may further include trapping references to the relocated object and updating the references using a forwarding pointer that is associated with the old object.
  • Another example of a process according to the technique includes suspending a plurality of threads, relocating the object to a second memory location, updating references associated with the first memory location, for only one of the threads, to the second memory location, and resuming the threads.
  • the process may include initially marking each of the threads “unscanned.”
  • the process may include reading the object from the first memory location and writing the object to the second memory location.
  • the process may include patching a class pointer associated with the object at the first memory location to a trap class. In another embodiment, the process may further include inserting a forwarding pointer into the object at the first memory location, wherein the forwarding pointer points to the object at the second memory location. In another embodiment, the process may further include using the forwarding pointer to update a pointer to the first memory location to the second memory location.
  • the process may include updating a pointer to the first memory location to the second memory location.
  • the process may include scanning a global stack to find the pointer to the first memory location.
  • the process may include scanning a next-runnable thread stack to find the pointer to the first memory location.
  • the process may include selecting the next-runnable thread, scanning a next-runnable thread stack associated with the next-runnable thread, and marking the next runnable thread “scanned”.
  • the process may include updating a pointer to the first memory location in the next-runnable thread stack to point to the second memory location.
  • the process may include executing a second of the plurality of threads, wherein the second thread includes a class reference associated with the first memory location, and associating the class reference to the second memory location.
  • the process may include trapping the class reference.
  • the process may include updating the class reference using a forwarding pointer.
  • the process may include marking the second of the plurality of threads “scanned.”
  • the process may include suspending the plurality of threads a second time, selecting a second of the plurality of threads, scanning a stack associated with the second thread, marking the second thread “scanned,” and resuming the threads a second time.
  • the process may include reclaiming memory associated with the first memory location when it is determined that each of the plurality of threads has been scanned.
  • An example system includes a scheduler and a relocation engine.
  • the scheduler may suspend mutator threads in preparation for dynamic object relocation.
  • the relocation engine may, in cooperation with the scheduler, mark mutator threads as “unscanned.”
  • the relocation engine may be configured to do one or more of: read a first object, write a second object that is associated with the first object, patch a class pointer associated with the first object to a trap class, set a forwarding pointer to the second object at the first object, scan a global stack, update references to the first object, if any, according to the forwarding pointer, select a first thread of the suspended mutator threads, scan a mutator stack associated with the first thread, update references to the first object, if any, according to the forwarding pointer, and mark the first thread of the suspended mutator threads as “scanned.”
  • the scheduler is further configured to resume the mutator threads after marking the first thread as scanned and before scanning a second mutator stack associated with a second thread of the suspended mutator threads.
  • FIG. 1 depicts a conceptual view of a system for relocating an object at run-time according to an embodiment.
  • FIGS. 2A and 2B depict conceptual views of objects and stacks before and after relocation according to an embodiment.
  • FIG. 3 depicts a flowchart of a process according to an embodiment.
  • FIG. 4 depicts a flowchart of another process according to an embodiment.
  • FIG. 5 depicts a flowchart of another process according to an embodiment.
  • FIG. 6 depicts a flowchart of another process according to an embodiment.
  • FIG. 7 depicts a networked system for use in an embodiment.
  • FIG. 8 depicts a computer system for use in the system of FIG. 7 .
  • a garbage collector may be executed on a stock hardware system with a number of mutator threads (each with an associated thread state), as scheduled by a scheduler.
  • the system may include one or more processors that act on memory objects. Objects may be represented in memory in many ways.
  • FIG. 1 depicts a conceptual view of a system 100 for relocating an object at run-time according to an embodiment.
  • the system 100 includes a scheduler/relocation engine 102 , mutator threads 104 , an object 106 , a relocated object 108 , a trap class 110 , a global stack 112 , and a mutator stack 114 .
  • the scheduler/relocation engine 102 may be coupled to a processor (not shown).
  • the scheduler portion of the scheduler/relocation engine 102 may include computer hardware, firmware, or software that arranges jobs to be done by the system 100 in an order. Scheduler functionality is well-known so an in-depth discussion of scheduling is not provided herein.
  • the relocation engine portion of the scheduler/relocation engine 102 may include computer hardware, firmware, or software that moves an object from one memory location to another, and updates pointers to the old memory location. When some or all of the pointers are updated, a garbage collector reclaims the old memory location so that the memory can be reallocated.
  • the scheduler/relocation engine 102 may be designed as a single application, two applications (e.g., a scheduler and relocation engine/garbage collector), or three or more applications.
  • the mutator threads 104 are execution threads active in the runtime environment of the system 100 .
  • the mutator threads 104 may be stored, for example, in memory (not shown).
  • each mutator thread has an associated state that may include a scanned/unscanned state indicator.
  • Each thread typically has an associated stack. Since stacks are well-understood in the art of computer programming, an in-depth discussion of stacks is not provided herein.
  • the mutator stack 114 is associated with “Thread 1” and other mutator stacks (not shown) are understood to be associated with Threads 2 . . . N.
  • the object 106 may be stored, for example, in memory. Prior to relocation, the object 106 may be referred to as “the original object.”
  • the representation of objects in memory is well-known so an in-depth discussion of various representations is not provided herein. It should suffice to assume that an object includes a number of fields, one of which may be a class pointer to a class that is associated with the object, and others of which may be data fields.
  • the relocated object 108 is similar to the object 106 .
  • fields of the object 106 and the relocated object 108 may be changed, such that, at some point, fields of the object 106 are different from those of the relocated object 108 .
  • the trap class 110 may be stored, for example, in memory.
  • the trap class 110 is a class that provides a specific functionality to the object 106 .
  • the trap class includes a method for updating the referencing pointer to point to the relocated object 108 , then resuming execution of the original method invocation.
  • pointers to the object 106 can be efficiently updated in runtime.
  • this technique imposes zero or almost zero overhead on regular method invocations.
  • the global stack 112 may be stored in memory. Like thread stacks, global stacks are well-understood, so an in-depth discussion of the global stack 112 is not provided herein.
  • the scheduler/relocation engine 102 suspends the execution of the mutator threads 104 when an object is to be relocated.
  • this step ( 1 ) is indicated by the arrow labeled “1 Suspend.”
  • Subsequent steps are indicated by arrows labeled ( 2 ) to ( 13 ).
  • the scheduler/relocation engine 102 sets ( 2 ) states associated with each of the threads to “unscanned.” Then, the scheduler/relocation engine 102 reads ( 3 ) the object 106 and writes ( 4 ) the object to a new memory location as the relocated object 108 . The scheduler/relocation engine 102 patches ( 5 ) the object 106 to a trap class and sets ( 6 ) a forwarding pointer from the object 106 to the relocated object 108 .
  • the scheduler/relocation engine 102 scans ( 7 ) the global stack 112 and updates ( 8 ) any pointers to the object 106 to the relocated object 108 , using the forwarding pointer.
  • the scheduler/relocation engine 102 selects ( 9 ) a first thread of the mutator threads 104 , scans ( 10 ) the mutator stack 114 associated with the thread, and updates ( 11 ) any pointers to the object 106 to the relocated object 108 , using the forwarding pointer.
  • the scheduler/relocation engine 102 sets ( 12 ) the state associated with the mutator stack 114 to “scanned.”
  • the scheduler/relocation engine 102 then resumes ( 13 ) execution of the mutator threads 104 .
  • the mutator threads 104 are only suspended long enough to update the global stack 112 and the mutator stack 114 .
  • the scheduler/relocation engine 102 may be referred to as being bounded, since only one execution stack is scanned.
  • the scheduler/relocation engine 102 select, scan, update pointers, and set state to “scanned” for each additional thread. This only occurs when the thread is executed, so the scheduler/relocation engine 102 may be referred to as bounded for each thread (since only the stack associated with that thread is processed).
  • the scheduler/relocation engine 102 could just perform steps 1 - 8 and 12 - 13 . Later, when an unscanned mutator thread is executed, references to the object 106 result in an update to the reference, using the trap class 110 and the forwarding pointer of the object 106 . In this way, steps 9 - 11 are performed, essentially, on the fly. However, since, in an embodiment, the next-runnable thread is known, it may be more efficient for the scheduler/relocation engine 102 to perform steps 1 - 13 straight through, as previously described.
  • FIGS. 2A and 2B depict conceptual views of objects and stacks before ( FIG. 2A ) and after ( FIG. 2B ) relocation according to an embodiment.
  • FIG. 2A depicts a “before” view 200 A that includes an object 202 , a global roots stack 204 , a next-runnable thread stack 206 , an other thread stack 208 , and an object 210 .
  • the object 202 includes four fields: a class pointer field and three data fields.
  • the class pointer field and three data fields each may or may not be one word in size.
  • the class pointer field presumably points (not shown) to class-related data.
  • the object 210 is similar to the object 202 though, for illustrative purposes only, the object 210 includes a class pointer field (which may point to class-related data that is the same or different than the class-related data associated with the object 202 ) and two data fields.
  • the objects 202 , 210 are intended to serve, for illustrative purposes, as one of a practically infinite number of object representations.
  • the global stack 204 includes two global roots
  • the next-runnable thread stack 206 includes three stack roots
  • the other thread stack 208 includes two stack roots.
  • the number of roots depicted is only for illustrative purposes.
  • initially one root from each of the stacks 204 , 206 , and 208 includes a pointer to the object 202 .
  • a data field of the object 210 includes a pointer to the object 202 .
  • FIG. 2B depicts an “after” view 200 B that is similar to the “before” view 200 A, but includes a relocated object 212 .
  • the object 202 is updated by changing the class pointer to a trap class pointer that points to a trap class and the first data field to a forwarding pointer that points to the relocated object 212 .
  • the trap class includes a method that serves to update a reference to the object 202 such that the reference is to the relocated object 212 . In this way, a method call to the object 202 can be handled by the relocated object 212 and subsequent method calls are directed to the relocated object 212 (at least for the object that invoked the method).
  • the global stack 204 is scanned for all pointers to the object 202 and updated so that the pointers point to the relocated object 212 .
  • the next-runnable thread stack 206 is scanned for all pointers to the object 202 and updated so that the pointers are to the relocated object 212 .
  • These updates are illustrated in the “after” view 200 B as arrows from the global stack 204 and the next-runnable thread stack 206 to the relocated object 212 . It may be noted that zero or multiple roots from a single stack (e.g., the global stack 204 ) could reference the relocated object 212 , in which case, if illustrated as in FIG. 2B , no arrows or multiple arrows would be drawn from zero or multiple roots to the relocated object 212 .
  • only one executable stack i.e., the next-runnable thread stack 206
  • the other thread stack 208 is not updated. Rather, a root of the other thread stack 208 points to the object 202 . If the other thread stack 208 is executed, then the reference to the object 202 may be “trapped” by the trap class pointer and the reference updated using the forwarding pointer. In this way, the other thread stack 208 can be updated on the fly to point to the relocated object 212 . Similarly, a reference from the object 210 to the object 202 can be trapped and updated using the forwarding pointer.
  • FIG. 3 depicts a flowchart 300 of a process according to an embodiment.
  • the flowchart 300 is intended to illustrate the relocation of an object and update of a global stack and a single execution stack.
  • the process depicted in the example of FIG. 3 is bounded since a single execution stack is updated while execution is suspended, and execution resumes thereafter.
  • This process and other processes are depicted as serially arranged modules. However, modules of the processes may be reordered, or arranged for parallel execution as appropriate.
  • the flowchart 300 starts at module 302 with suspending mutator threads.
  • the mutator threads are suspended prior to relocating an object at runtime. This is important to avoid, for example, dangling references.
  • the flowchart 300 continues at module 304 with marking mutator threads “unscanned.” By marking the mutator threads, or otherwise indicating that a mutator thread has not yet been scanned, a system is able to distinguish between those mutator threads that have been updated since an object was relocated and those mutator threads that may still include a dangling reference.
  • the flowchart 300 continues at module 306 with copying an object to a new location. This may entail reading an object from one memory location and writing the object to another memory location. For large objects, this step can be potentially time-consuming. Known techniques exist to alleviate this problem.
  • the flowchart 300 continues at module 308 with patching a class pointer to a trap class.
  • the object that is to be relocated is presumably associated with a class.
  • the class pointer references class-related methods and data. After the object has been copied to a new memory location, the old object class pointer becomes unnecessary. So, the class pointer is changed to a trap class pointer.
  • the trap class includes methods and data that are sufficient to redirect a reference from the old memory location to the new memory location.
  • the term “trapping” refers to intercepting a method call (or other reference related to the object) for the object at the old memory location.
  • the flowchart 300 continues at module 310 with inserting a forwarding pointer into the object. Since the data fields of the object have already been copied to the new memory location, the first data field (after the trap class pointer) can be employed to contain the forwarding pointer. The forwarding pointer points to the new memory location. In operation, a reference to the old memory location is trapped using a method associated with a trap class (see, e.g., module 308 ) and redirected to the new memory location using the forwarding pointer.
  • a trap class see, e.g., module 308
  • the old memory location need not contain any more than the trap class pointer and the forwarding pointer. Accordingly, in an embodiment, the memory associated with the data fields of the old memory location could be reclaimed. Though this is an advantage associated with implementations according to the teachings provided herein, immediate reclamation of part of the object is not critical to operation.
  • the flowchart 300 continues at module 312 with scanning a global stack.
  • One issue that needs to be addressed in any implementation that includes garbage allocation is the issue of global references. Since it is often impossible to determine, from a local perspective, whether global references to an object may be made, the global references should be updated. Accordingly, scanning the global stack is of some importance.
  • the global stack may or may not be scanned one root at a time, but for illustrative purposes, at least with reference to the flowchart 300 , it is assumed that one root is scanned at a time.
  • the flowchart 300 continues at decision point 314 where it is determined whether scanning is complete. Unless the global stack is initially empty, it will be determined that scanning is not complete.
  • the flowchart 300 continues at decision point 316 where it is determined whether the current root includes a pointer to the object. If the current root does not include a pointer to the object ( 316 -N), then the root need not be modified and, at module 312 , the flowchart 300 simply continues scanning the global stack. If, on the other hand, the current root does include a pointer to the object ( 316 -Y), then the flowchart 300 continues at module 318 with updating the pointer using the forwarding pointer. Accordingly, a global root that pointed to the old memory location is updated to point to the new memory location of the object. The flowchart 300 then continues from module 312 .
  • each root of the global stack will have been considered and, at decision point 314 , it will be determined that scanning of the global stack is complete.
  • scanning of the global stack is complete ( 314 -Y)
  • the flowchart 300 continues at module 320 with selecting a next-runnable mutator thread and at module 322 with scanning the next-runnable thread stack.
  • the thread is next in line (as determined by, for example, a scheduler) to be executed when the executable threads resume execution.
  • the flowchart 300 continues at decision point 324 where it is determined whether scanning is complete. Unless the next-runnable thread stack is initially empty (which is unlikely), it will be determined that scanning is not complete.
  • the flowchart 300 continues at decision point 326 where it is determined whether the current root includes a pointer to the object. If the current root does not include a pointer to the object ( 326 -N), then the root need not be modified and, at module 322 , the flowchart 300 simply continues scanning the next-runnable thread stack. If, on the other hand, the current root does include a pointer to the object ( 326 -Y), then the flowchart 300 continues at module 328 with updating the pointer using the forwarding pointer. Accordingly, a stack root that pointed to the old memory location is updated to point to the new memory location of the object. The flowchart 300 then continues from module 322 .
  • each root of the next-runnable thread stack will have been considered and, at decision point 324 , it will be determined that scanning of the next-runnable thread stack is complete.
  • scanning of the next-runnable thread stack is complete ( 324 -Y)
  • the flowchart 300 continues at module 330 with marking the next-runnable thread as “scanned.”
  • the flowchart 300 continues at module 332 with resuming the mutator threads. Then the flowchart 300 ends. Since the mutator threads resume execution after scanning only one of the mutator thread stacks, the process described with reference to FIG. 3 is bounded. It should be noted that there may be additional references to the old memory location that were not updated in, for example, other objects or in other mutator thread stacks.
  • FIGS. 4 and 5 depict alternative processes for updating the references.
  • FIG. 4 depicts a flowchart 400 of a process according to an embodiment.
  • FIG. 4 is intended to illustrate the processing of unscanned mutator threads. It is assumed that the global stack has already been scanned and one or more mutator threads have been marked “unscanned” before the start of the flowchart 400 .
  • the next-runnable thread stack may or may not have already been scanned. If the next-runnable thread stack has not been scanned then, in an embodiment, the flowchart 400 may start with the next-runnable thread stack. If the next-runnable thread stack has already been scanned then, in another embodiment, the flowchart 400 may start with a subsequent thread stack.
  • the flowchart 400 starts at module 402 with executing an unscanned mutator thread.
  • the mutator thread may be marked “unscanned” or the fact that the mutator thread is unscanned may be indicated in some other manner.
  • the mutator thread is to be executed, since the mutator thread has not been scanned, there may be pointers to an old memory location.
  • the flowchart 400 continues at decision point 404 with determining whether there are any pointers to an object that has been relocated. If there are pointers to the object ( 404 -Y), then the flowchart 400 continues at module 406 with trapping the class reference and at module 408 with updating pointers using a forward pointer.
  • the modules 404 to 408 may be accomplished by checking each root of the associated mutator thread, or by checking each root in parallel. In this way, any roots that point to the old memory location are updated to point to the new memory location.
  • the flowchart 400 continues at module 410 with marking the mutator thread as “scanned.” Alternatively, the mutator thread may be indicated as scanned in some other manner. Then the flowchart 400 ends.
  • FIG. 5 depicts a flowchart 500 of a process according to another embodiment.
  • FIG. 5 is intended to illustrate the processing of unscanned mutator threads. It is assumed that the global stack has already been scanned and one or more mutator threads have been marked “unscanned” before the start of the flowchart 500 .
  • the next-runnable thread stack may or may not have already been scanned. If the next-runnable thread stack has not been scanned then, in an embodiment, the flowchart 500 may start with the next-runnable thread stack. If the next-runnable thread stack has already been scanned then, in another embodiment, the flowchart 500 may start with a subsequent thread stack.
  • the flowchart 500 starts at decision point 502 where it is determined whether a next unscanned mutator thread exists.
  • the mutator thread may be marked “unscanned” or the fact that the mutator thread is unscanned may be indicated in some other manner. Since the next unscanned mutator thread has not been scanned, there may be pointers to an old memory location. If there is no next unscanned mutator thread, then the flowchart 500 simply ends.
  • the flowchart 500 continues at module 508 with scanning the unscanned mutator thread stack. In the example of FIG. 5 , the flowchart 500 continues at decision point 510 where it is determined whether scanning is complete. Unless the -unscanned mutator thread stack is initially empty (which is unlikely), it will be determined that scanning is not complete.
  • the flowchart 500 continues at decision point 512 where it is determined whether the current root includes a pointer to the object. If the current root does not include a pointer to the object ( 512 -N), then the root need not be modified and, at module 508 , the flowchart 500 simply continues scanning the unscanned mutator thread stack. If, on the other hand, the current root does include a pointer to the object ( 512 -Y), then the flowchart 500 continues at module 514 with updating the pointer using the forwarding pointer. Accordingly, a mutator stack root that pointed to the old memory location is updated to point to the new memory location of the object. The flowchart 500 then continues from module 508 .
  • each root of the unscanned mutator thread stack will have been considered and, at decision point 510 , it will be determined that scanning of the unscanned mutator thread stack is complete.
  • scanning of the unscanned mutator thread stack is complete ( 510 -Y)
  • the flowchart 500 continues at module 516 with marking the unscanned mutator thread as “scanned.”
  • the flowchart 500 continues at module 518 with resuming the mutator threads. Then the flowchart 500 ends. Since the mutator threads resume execution after scanning only one of the mutator thread stacks, the process described with reference to FIG. 5 is bounded. It should be noted that there may be additional references to the old memory location that were not updated in, for example, subsequent mutator thread stacks. These references may be updated in the same manner as just described, in, in an embodiment, a serial fashion.
  • FIGS. 4 and 5 may be repeated until all thread stacks have been scanned. At this point, it may be determined that the memory associated with the object may or may not be reclaimed.
  • FIG. 6 depicts a flowchart 600 of a process according to another embodiment where the memory associated with the object is to be reclaimed. The flowchart 600 starts at decision point 602 where it is determined whether all executable threads have been scanned. If so ( 602 -Y), then the memory is reclaimed at module 604 and the flowchart 600 ends. If not ( 602 -N), then the flowchart 600 repeats until all threads have been scanned. It may be noted that this does not necessarily entail a program that continuously checks whether all threads have been scanned. Rather, for example, a check may be made after a thread is scanned.
  • FIGS. 7 and 8 The following description of FIGS. 7 and 8 is intended to provide an overview of computer hardware and other operating components suitable for performing the methods of the invention described herein, but is not intended to limit the applicable environments. Similarly, the computer hardware and other operating components may be suitable as part of the apparatuses of the invention described herein.
  • the invention can be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, and the like.
  • the invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • FIG. 7 depicts a networked system 700 that includes several computer systems coupled together through a network 702 , such as the Internet.
  • the term “Internet” as used herein refers to a network of networks which uses certain protocols, such as the TCP/IP protocol, and possibly other protocols such as the hypertext transfer protocol (HTTP) for hypertext markup language (HTML) documents that make up the World Wide Web (the web).
  • HTTP hypertext transfer protocol
  • HTML hypertext markup language
  • the web server 704 is typically at least one computer system which operates as a server computer system and is configured to operate with the protocols of the world wide web and is coupled to the Internet.
  • the web server system 704 can be a conventional server computer system.
  • the web server 704 can be part of an ISP which provides access to the Internet for client systems.
  • the web server 704 is shown coupled to the server computer system 706 which itself is coupled to web content 708 , which can be considered a form of a media database. While two computer systems 704 and 706 are shown in FIG. 7 , the web server system 704 and the server computer system 706 can be one computer system having different software components providing the web server functionality and the server functionality provided by the server computer system 706 , which will be described further below.
  • Access to the network 702 is typically provided by Internet service providers (ISPs), such as the ISPs 710 and 716 .
  • ISPs Internet service providers
  • Users on client systems, such as client computer systems 712 , 718 , 722 , and 726 obtain access to the Internet through the ISPs 710 and 716 .
  • Access to the Internet allows users of the client computer systems to exchange information, receive and send e-mails, and view documents, such as documents which have been prepared in the HTML format.
  • These documents are often provided by web servers, such as web server 704 , which are referred to as being “on” the Internet.
  • these web servers are provided by the ISPs, such as ISP 710 , although a computer system can be set up and connected to the Internet without that system also being an ISP.
  • Client computer systems 712 , 718 , 722 , and 726 can each, with the appropriate web browsing software, view HTML pages provided by the web server 704 .
  • the ISP 710 provides Internet connectivity to the client computer system 712 through the modem interface 714 , which can be considered part of the client computer system 712 .
  • the client computer system can be a personal computer system, a network computer, a web TV system, or other computer system. While FIG. 7 shows the modem interface 714 generically as a “modem,” the interface can be an analog modem, isdn modem, cable modem, satellite transmission interface (e.g. “direct PC”), or other interface for coupling a computer system to other computer systems.
  • the ISP 716 provides Internet connectivity for client systems 718 , 722 , and 726 , although as shown in FIG. 7 , the connections are not the same for these three computer systems.
  • Client computer system 718 is coupled through a modem interface 720 while client computer systems 722 and 726 are part of a LAN 730 .
  • Client computer systems 722 and 726 are coupled to the LAN 730 through network interfaces 724 and 728 , which can be ethernet network or other network interfaces.
  • the LAN 730 is also coupled to a gateway computer system 732 which can provide firewall and other Internet-related services for the local area network.
  • This gateway computer system 732 is coupled to the ISP 716 to provide Internet connectivity to the client computer systems 722 and 726 .
  • the gateway computer system 732 can be a conventional server computer system.
  • a server computer system 734 can be directly coupled to the LAN 730 through a network interface 736 to provide files 738 and other services to the clients 722 and 726 , without the need to connect to the Internet through the gateway system 732 .
  • FIG. 8 depicts a computer system 740 for use in the system 700 ( FIG. 7 ).
  • the computer system 740 may be a conventional computer system that can be used as a client computer system or a server computer system or as a web server system. Such a computer system can be used to perform many of the functions of an Internet service provider, such as ISP 710 ( FIG. 7 ).
  • ISP 710 Internet service provider
  • the computer system 740 includes a computer 742 , I/O devices 744 , and a display device 746 .
  • the computer 742 includes a processor 748 , a communications interface 750 , memory 752 , display controller 754 , non-volatile storage 756 , and I/O controller 758 .
  • the computer system 740 may be couple to or include the I/O devices 744 and display device 746 .
  • the computer 742 interfaces to external systems through the communications interface 750 , which may include a modem or network interface. It will be appreciated that the communications interface 750 can be considered to be part of the computer system 740 or a part of the computer 742 .
  • the communications interface can be an analog modem, isdn modem, cable modem, token ring interface, satellite transmission interface (e.g. “direct PC”), or other interfaces for coupling a computer system to other computer systems.
  • the processor 748 may be, for example, a conventional microprocessor such as an Intel Pentium microprocessor or Motorola power PC microprocessor.
  • the memory 752 is coupled to the processor 748 by a bus 760 .
  • the memory 752 can be dynamic random access memory (DRAM) and can also include static ram (SRAM).
  • the bus 760 couples the processor 748 to the memory 752 , also to the non-volatile storage 756 , to the display controller 754 , and to the I/O controller 758 .
  • the I/O devices 744 can include a keyboard, disk drives, printers, a scanner, and other input and output devices, including a mouse or other pointing device.
  • the display controller 754 may control in the conventional manner a display on the display device 746 , which can be, for example, a cathode ray tube (CRT) or liquid crystal display (LCD).
  • the display controller 754 and the I/O controller 758 can be implemented with conventional well known technology.
  • the non-volatile storage 756 is often a magnetic hard disk, an optical disk, or another form of storage for large amounts of data. Some of this data is often written, by a direct memory access process, into memory 752 during execution of software in the computer 742 .
  • machine-readable medium or “computer-readable medium” includes any type of storage device that is accessible by the processor 748 and also encompasses a carrier wave that encodes a data signal.
  • Objects, methods, inline caches, cache states and other object-oriented components may be stored in the non-volatile storage 756 , or written into memory 752 during execution of, for example, an object-oriented software program.
  • the components illustrated in, for example, FIGS. 1, 2A , and 2 B can be instantiated on the computer system 740 .
  • the computer system 740 is one example of many possible computer systems which have different architectures.
  • personal computers based on an Intel microprocessor often have multiple buses, one of which can be an I/O bus for the peripherals and one that directly connects the processor 748 and the memory 752 (often referred to as a memory bus).
  • the buses are connected together through bridge components that perform any necessary translation due to differing bus protocols.
  • Network computers are another type of computer system that can be used with the present invention.
  • Network computers do not usually include a hard disk or other mass storage, and the executable programs are loaded from a network connection into the memory 752 for execution by the processor 748 .
  • a Web TV system which is known in the art, is also considered to be a computer system according to the present invention, but it may lack some of the features shown in FIG. 8 , such as certain input or output devices.
  • a typical computer system will usually include at least a processor, memory, and a bus coupling the memory to the processor.
  • the computer system 740 is controlled by operating system software which includes a file management system, such as a disk operating system, which is part of the operating system software.
  • a file management system such as a disk operating system
  • One example of an operating system software with its associated file management system software is the family of operating systems known as Windows® from Microsoft Corporation of Redmond, Wash., and their associated file management systems.
  • Another example of operating system software with its associated file management system software is the Linux operating system and its associated file management system.
  • the file management system is typically stored in the non-volatile storage 756 and causes the processor 748 to execute the various acts required by the operating system to input and output data and to store data in memory, including storing files on the non-volatile storage 756 .
  • the present invention also relates to apparatus for performing the operations herein.
  • This apparatus may be specially constructed for the required purposes, or, advantageously, it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer.
  • a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-roms, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.
  • garbage collection is part of a language's runtime system, or an add-on library, perhaps assisted by a compiler, the hardware, the operating system, or any combination of three, that determines what memory a program is no longer using, and recycles it for other use. This is sometimes referred to as automatic memory reclamation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A technique for dynamically relocating an object during garbage collection involves guaranteeing bounds on thread pause times. A process according to the technique may include pausing threads, bounding pause times by scanning only one of a plurality of threads, and resuming the threads. Another process according to the technique may include suspending a plurality of threads, relocating an object to a new memory location, updating references associated with an old memory location for only one of the threads such that the references are associated with the new memory location, and resuming the threads. In an embodiment, the process may include initially marking each of the threads “unscanned.” In another embodiment, the process may include reading the object from the first memory location and writing the object to the second memory location. An example system according to the technique may include a scheduler and a relocation engine. In an embodiment, the scheduler may suspend threads in preparation for dynamic object relocation and then resumes the threads after scanning one, and only one, of the thread stacks. In an embodiment, the thread associated with the scanned thread stack may then be marked “scanned.”

Description

    CROSS-REFERENCE TO RELATED APPLICATIONS
  • This application is a Continuation of U.S. patent application Ser. No. 10/991,444, filed Nov. 17, 2004, which is a Continuation of U.S. patent application Ser. No. 10/016,794, filed Oct. 29, 2001, which claims priority from U.S. Provisional Patent Application No. 60/255.096, filed Dec. 13, 2000, and U.S. Provisional Patent Application No. 60/555,774, filed Mar. 23, 2004, all of which are being incorporated herein.
  • BACKGROUND
  • The present invention relates to computer memory management. More particularly, the present invention relates to garbage collection.
  • An important task in computer systems is the task of allocating memory to data objects. The term object refers to a data structure represented in a computer system memory. An object is identified by a reference, also known as a pointer, which is a small amount of information that is used to access the object. Typically, a reference to an object is the memory address of the object, but there are other ways to represent a reference.
  • An object may contain a number of fields of data, which can be characters, integers, references, or other types of data. In object-oriented systems, objects are data structures that encapsulate data and methods that operate on that data. Objects are instances of classes, where a class includes method code and other information that is common to all objects belonging to the class. Methods, which define actions the class can perform, may be invoked using the reference to the object.
  • In a system that allocates memory to objects dynamically (e.g., in a system where memory can be allocated to objects by a program while the program is running), the pattern in which objects are allocated may depend on run-time conditions, which may not be known beforehand. Dynamic allocation typically allows memory reuse and can, accordingly, generate large numbers of objects whose total memory size requirements could exceed the system memory resources at any given time.
  • In the C programming language, the library function malloc( ) is often used for allocation. In the C programming language, the library function free( ) is often used to release memory for objects that are no longer in use.
  • Allocation and freeing of dynamic memory should be performed carefully. If an application fails to reclaim unused memory, system memory requirements will grow over time and eventually exceed available resources. This kind of error is known as a memory leak. Another kind of error occurs when an application reclaims memory allocated to an object even though it still maintains a reference to the object. Typically, an application should not retain a reference to a memory location once that memory location is reclaimed because, if the reclaimed memory is reallocated for a different purpose, the application may inadvertently manipulate the same memory in multiple inconsistent ways. This kind of error is known as a dangling reference. Explicit dynamic memory management by using interfaces like malloc( ) and free( ) often leads to these problems.
  • In order to eliminate such errors, many object-oriented systems provide automatic memory reclamation, commonly referred to as garbage collection (GC). Garbage collectors operate by reclaiming space that they no longer consider reachable.
  • Statically allocated objects are reachable at all times while a program is running, and may refer to dynamically allocated objects, which are then also reachable. Objects referred by execution stacks and processor registers are reachable, as well. Moreover, any object referred to by a reachable object is itself reachable.
  • GC normally requires global knowledge of a system in order to allocate and reuse memory. For example, a developer working on a local piece of code will generally not know whether other parts of the system are using a particular object, so memory reclamation calls are extremely difficult to insert manually without error. By using GC, the developer may ensure proper allocation and reuse, leading to more robust systems with fewer memory leaks and no dangling references.
  • Programming languages executing on top of a virtual machine (VM) commonly rely on the VM being able to perform GC. Examples of such languages are Java, Smalltalk, Lisp, and others. However, an implementation may be written in practically any programming language and still make use of GC.
  • Since GC normally requires global knowledge, GC implementations may suffer from problems, such as excessive pause times. Application threads that mutate memory state, also known as mutators, need to make steady progress to solve tasks at hand. At the same time, GC may alter the memory that mutators work on. A common solution is to run GC in one or more separate threads, and when GC runs, all mutator threads are stopped. Gaining global knowledge of a system can be time-consuming, and mutator threads may then experience excessive pause times.
  • For example, assume a system must process digital signals at a rate of 20 packets per second. Processing a packet takes 10 milliseconds, and receiving and transmitting each takes another 10 milliseconds. This leaves 20 milliseconds of idle time of the 50 milliseconds available per packet. If GC runs for more than 20 milliseconds during any particular 50 millisecond interval, the system cannot keep up. It would be desirable to guarantee that during any particular 50 millisecond interval, GC will not pause mutators for more than 20 milliseconds.
  • In response to this problem, “incremental” or “real-time” GC algorithms have been developed. Garbage Collection: Algorithms for Automatic Dynamic Memory Management by Richard E. Jones and Rafael Lins (Wiley, 1996), which is incorporated herein by reference, contains a survey of prior art techniques. Some results have been obtained in the family of “non-compacting collectors,” which are collectors that never relocate an object in memory once it has been allocated. However, non-copying collectors suffer from the problem of memory fragmentation. In order to satisfy allocation requests of various sizes, a much larger total amount of memory may be needed, since smaller free segments are fragmented and cannot be coalesced into larger free segments.
  • The family of “copying collectors,” on the other hand, may choose to relocate objects to avoid fragmentation, leading to improved memory utilization. When relocating an object, in addition to copying the object itself, all references to the object must be updated before paused mutators can proceed. The amount of work required is potentially large, and maximum GC pause times cannot be guaranteed. One solution is to use indirect pointers, also known as object tables, but this leads to excessive memory use and a number of other problems (see, e.g., Garbage Collection, by Jones et al.). Other solutions include various “replicated based” copying collectors, but they impose sever performance penalties on mutators unless special hardware support is present.
  • As a result, systems requiring real-time response times on stock hardware, such as multimedia applications, have been forced to use error-prone manual memory handling techniques.
  • Garbage collection algorithms are commonly divided into three basic algorithms: mark/sweep, copying, and reference counting. Examples of possible marking and copying algorithms are:
  • Example of a basic marking algorithm:
      • 1. Mark all reachable objects transitively, starting from global roots
      • 2. Sweep memory, collect addresses of all unreachable objects and determine fragmentation level
      • 3. Determine relocation effort based on fragmentation level
      • 4. Relocate objects if necessary, and update all references to relocated objects
  • Example of a basic copying algorithm:
      • 1. Relocate reachable objects, starting from global roots
      • 2. Scan relocated objects, and relocate reachable non-relocated objects
      • 3. Repeat until all reachable objects have been relocated
    SUMMARY
  • A technique for real-time allocation of objects during garbage collection (GC) involves guaranteeing bounds on mutator thread pause times. An example process according to the technique includes relocating an object in real-time during garbage collection, pausing mutator threads, bounding mutator pause times by scanning only one of a plurality of mutator threads, and resuming the mutator threads. In an embodiment, the process may further include trapping references to the relocated object and updating the references using a forwarding pointer that is associated with the old object.
  • Another example of a process according to the technique includes suspending a plurality of threads, relocating the object to a second memory location, updating references associated with the first memory location, for only one of the threads, to the second memory location, and resuming the threads. In an embodiment, the process may include initially marking each of the threads “unscanned.” In another embodiment, the process may include reading the object from the first memory location and writing the object to the second memory location.
  • In an embodiment, the process may include patching a class pointer associated with the object at the first memory location to a trap class. In another embodiment, the process may further include inserting a forwarding pointer into the object at the first memory location, wherein the forwarding pointer points to the object at the second memory location. In another embodiment, the process may further include using the forwarding pointer to update a pointer to the first memory location to the second memory location.
  • In an embodiment, the process may include updating a pointer to the first memory location to the second memory location. In another embodiment, the process may include scanning a global stack to find the pointer to the first memory location. In another embodiment, the process may include scanning a next-runnable thread stack to find the pointer to the first memory location.
  • In an embodiment, the process may include selecting the next-runnable thread, scanning a next-runnable thread stack associated with the next-runnable thread, and marking the next runnable thread “scanned”. In another embodiment, the process may include updating a pointer to the first memory location in the next-runnable thread stack to point to the second memory location.
  • In an embodiment, the process may include executing a second of the plurality of threads, wherein the second thread includes a class reference associated with the first memory location, and associating the class reference to the second memory location. In another embodiment, the process may include trapping the class reference. In another embodiment, the process may include updating the class reference using a forwarding pointer. In another embodiment, the process may include marking the second of the plurality of threads “scanned.”
  • In an embodiment, the process may include suspending the plurality of threads a second time, selecting a second of the plurality of threads, scanning a stack associated with the second thread, marking the second thread “scanned,” and resuming the threads a second time. In another embodiment, the process may include reclaiming memory associated with the first memory location when it is determined that each of the plurality of threads has been scanned.
  • An example system according to the technique includes a scheduler and a relocation engine. In an embodiment, the scheduler may suspend mutator threads in preparation for dynamic object relocation.
  • In an embodiment, the relocation engine may, in cooperation with the scheduler, mark mutator threads as “unscanned.” In another embodiment, the relocation engine may be configured to do one or more of: read a first object, write a second object that is associated with the first object, patch a class pointer associated with the first object to a trap class, set a forwarding pointer to the second object at the first object, scan a global stack, update references to the first object, if any, according to the forwarding pointer, select a first thread of the suspended mutator threads, scan a mutator stack associated with the first thread, update references to the first object, if any, according to the forwarding pointer, and mark the first thread of the suspended mutator threads as “scanned.”
  • In an embodiment, the scheduler is further configured to resume the mutator threads after marking the first thread as scanned and before scanning a second mutator stack associated with a second thread of the suspended mutator threads.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • Embodiments of the invention are illustrated in the figures. However, the embodiments and figures are illustrative rather than limiting; they provide examples of the invention.
  • FIG. 1 depicts a conceptual view of a system for relocating an object at run-time according to an embodiment.
  • FIGS. 2A and 2B depict conceptual views of objects and stacks before and after relocation according to an embodiment.
  • FIG. 3 depicts a flowchart of a process according to an embodiment.
  • FIG. 4 depicts a flowchart of another process according to an embodiment.
  • FIG. 5 depicts a flowchart of another process according to an embodiment.
  • FIG. 6 depicts a flowchart of another process according to an embodiment.
  • FIG. 7 depicts a networked system for use in an embodiment.
  • FIG. 8 depicts a computer system for use in the system of FIG. 7.
  • DETAILED DESCRIPTION
  • A garbage collector may be executed on a stock hardware system with a number of mutator threads (each with an associated thread state), as scheduled by a scheduler. The system may include one or more processors that act on memory objects. Objects may be represented in memory in many ways.
  • FIG. 1 depicts a conceptual view of a system 100 for relocating an object at run-time according to an embodiment. The system 100 includes a scheduler/relocation engine 102, mutator threads 104, an object 106, a relocated object 108, a trap class 110, a global stack 112, and a mutator stack 114.
  • The scheduler/relocation engine 102 may be coupled to a processor (not shown). The scheduler portion of the scheduler/relocation engine 102 may include computer hardware, firmware, or software that arranges jobs to be done by the system 100 in an order. Scheduler functionality is well-known so an in-depth discussion of scheduling is not provided herein. The relocation engine portion of the scheduler/relocation engine 102 may include computer hardware, firmware, or software that moves an object from one memory location to another, and updates pointers to the old memory location. When some or all of the pointers are updated, a garbage collector reclaims the old memory location so that the memory can be reallocated. The scheduler/relocation engine 102 may be designed as a single application, two applications (e.g., a scheduler and relocation engine/garbage collector), or three or more applications.
  • The mutator threads 104 are execution threads active in the runtime environment of the system 100. The mutator threads 104 may be stored, for example, in memory (not shown). In an embodiment, each mutator thread has an associated state that may include a scanned/unscanned state indicator. Each thread typically has an associated stack. Since stacks are well-understood in the art of computer programming, an in-depth discussion of stacks is not provided herein. In the example of FIG. 1, the mutator stack 114 is associated with “Thread 1” and other mutator stacks (not shown) are understood to be associated with Threads 2 . . . N.
  • The object 106 may be stored, for example, in memory. Prior to relocation, the object 106 may be referred to as “the original object.” The representation of objects in memory is well-known so an in-depth discussion of various representations is not provided herein. It should suffice to assume that an object includes a number of fields, one of which may be a class pointer to a class that is associated with the object, and others of which may be data fields.
  • The relocated object 108 is similar to the object 106. In an embodiment, as the object is relocated, fields of the object 106 and the relocated object 108 may be changed, such that, at some point, fields of the object 106 are different from those of the relocated object 108.
  • The trap class 110 may be stored, for example, in memory. The trap class 110 is a class that provides a specific functionality to the object 106. For example, when a method invocation is made to the object 106 (after relocation), the trap class includes a method for updating the referencing pointer to point to the relocated object 108, then resuming execution of the original method invocation. Thus, pointers to the object 106 can be efficiently updated in runtime. Advantageously, this technique imposes zero or almost zero overhead on regular method invocations.
  • The global stack 112 may be stored in memory. Like thread stacks, global stacks are well-understood, so an in-depth discussion of the global stack 112 is not provided herein.
  • In operation, in the example of FIG. 1, the scheduler/relocation engine 102 suspends the execution of the mutator threads 104 when an object is to be relocated. In the example of FIG. 1, this step (1) is indicated by the arrow labeled “1 Suspend.” Subsequent steps are indicated by arrows labeled (2) to (13).
  • In the example of FIG. 1, after suspending the mutator threads 104, the scheduler/relocation engine 102 sets (2) states associated with each of the threads to “unscanned.” Then, the scheduler/relocation engine 102 reads (3) the object 106 and writes (4) the object to a new memory location as the relocated object 108. The scheduler/relocation engine 102 patches (5) the object 106 to a trap class and sets (6) a forwarding pointer from the object 106 to the relocated object 108.
  • In the example of FIG. 1, after the object has been relocated and updated, the scheduler/relocation engine 102 scans (7) the global stack 112 and updates (8) any pointers to the object 106 to the relocated object 108, using the forwarding pointer. The scheduler/relocation engine 102 then selects (9) a first thread of the mutator threads 104, scans (10) the mutator stack 114 associated with the thread, and updates (11) any pointers to the object 106 to the relocated object 108, using the forwarding pointer. After the scan, the scheduler/relocation engine 102 sets (12) the state associated with the mutator stack 114 to “scanned.”
  • In the example of FIG. 1, the scheduler/relocation engine 102 then resumes (13) execution of the mutator threads 104. Advantageously, the mutator threads 104 are only suspended long enough to update the global stack 112 and the mutator stack 114. Thus, the scheduler/relocation engine 102 may be referred to as being bounded, since only one execution stack is scanned.
  • In another embodiment, the scheduler/relocation engine 102 select, scan, update pointers, and set state to “scanned” for each additional thread. This only occurs when the thread is executed, so the scheduler/relocation engine 102 may be referred to as bounded for each thread (since only the stack associated with that thread is processed).
  • In should be noted that the scheduler/relocation engine 102 could just perform steps 1-8 and 12-13. Later, when an unscanned mutator thread is executed, references to the object 106 result in an update to the reference, using the trap class 110 and the forwarding pointer of the object 106. In this way, steps 9-11 are performed, essentially, on the fly. However, since, in an embodiment, the next-runnable thread is known, it may be more efficient for the scheduler/relocation engine 102 to perform steps 1-13 straight through, as previously described.
  • FIGS. 2A and 2B depict conceptual views of objects and stacks before (FIG. 2A) and after (FIG. 2B) relocation according to an embodiment. FIG. 2A depicts a “before” view 200A that includes an object 202, a global roots stack 204, a next-runnable thread stack 206, an other thread stack 208, and an object 210.
  • In the example of FIG. 2A, the object 202 includes four fields: a class pointer field and three data fields. The class pointer field and three data fields each may or may not be one word in size. The class pointer field presumably points (not shown) to class-related data. The object 210 is similar to the object 202 though, for illustrative purposes only, the object 210 includes a class pointer field (which may point to class-related data that is the same or different than the class-related data associated with the object 202) and two data fields.
  • It should be noted that the representation of objects in memory is well-known so an in-depth discussion of various representation techniques is not described herein. The objects 202, 210 are intended to serve, for illustrative purposes, as one of a practically infinite number of object representations.
  • In the example of FIG. 2A, the global stack 204 includes two global roots, the next-runnable thread stack 206 includes three stack roots, and the other thread stack 208 includes two stack roots. The number of roots depicted is only for illustrative purposes. As shown in the example of FIG. 2A, initially one root from each of the stacks 204, 206, and 208 includes a pointer to the object 202. Also, a data field of the object 210 includes a pointer to the object 202.
  • FIG. 2B depicts an “after” view 200B that is similar to the “before” view 200A, but includes a relocated object 212. After the relocated object 212 has been created, the object 202 is updated by changing the class pointer to a trap class pointer that points to a trap class and the first data field to a forwarding pointer that points to the relocated object 212. In an embodiment, the trap class includes a method that serves to update a reference to the object 202 such that the reference is to the relocated object 212. In this way, a method call to the object 202 can be handled by the relocated object 212 and subsequent method calls are directed to the relocated object 212 (at least for the object that invoked the method).
  • In an embodiment, the global stack 204 is scanned for all pointers to the object 202 and updated so that the pointers point to the relocated object 212. Similarly, the next-runnable thread stack 206 is scanned for all pointers to the object 202 and updated so that the pointers are to the relocated object 212. These updates are illustrated in the “after” view 200B as arrows from the global stack 204 and the next-runnable thread stack 206 to the relocated object 212. It may be noted that zero or multiple roots from a single stack (e.g., the global stack 204) could reference the relocated object 212, in which case, if illustrated as in FIG. 2B, no arrows or multiple arrows would be drawn from zero or multiple roots to the relocated object 212.
  • In an embodiment, only one executable stack (i.e., the next-runnable thread stack 206) is updated. As depicted in FIG. 2B, the other thread stack 208 is not updated. Rather, a root of the other thread stack 208 points to the object 202. If the other thread stack 208 is executed, then the reference to the object 202 may be “trapped” by the trap class pointer and the reference updated using the forwarding pointer. In this way, the other thread stack 208 can be updated on the fly to point to the relocated object 212. Similarly, a reference from the object 210 to the object 202 can be trapped and updated using the forwarding pointer.
  • FIG. 3 depicts a flowchart 300 of a process according to an embodiment. The flowchart 300 is intended to illustrate the relocation of an object and update of a global stack and a single execution stack. The process depicted in the example of FIG. 3 is bounded since a single execution stack is updated while execution is suspended, and execution resumes thereafter. This process and other processes are depicted as serially arranged modules. However, modules of the processes may be reordered, or arranged for parallel execution as appropriate.
  • In the example of FIG. 3, the flowchart 300 starts at module 302 with suspending mutator threads. The mutator threads are suspended prior to relocating an object at runtime. This is important to avoid, for example, dangling references.
  • In the example of FIG. 3, the flowchart 300 continues at module 304 with marking mutator threads “unscanned.” By marking the mutator threads, or otherwise indicating that a mutator thread has not yet been scanned, a system is able to distinguish between those mutator threads that have been updated since an object was relocated and those mutator threads that may still include a dangling reference.
  • In the example of FIG. 3, the flowchart 300 continues at module 306 with copying an object to a new location. This may entail reading an object from one memory location and writing the object to another memory location. For large objects, this step can be potentially time-consuming. Known techniques exist to alleviate this problem.
  • In the example of FIG. 3, the flowchart 300 continues at module 308 with patching a class pointer to a trap class. The object that is to be relocated is presumably associated with a class. In an aspect of an embodiment, the class pointer references class-related methods and data. After the object has been copied to a new memory location, the old object class pointer becomes unnecessary. So, the class pointer is changed to a trap class pointer. The trap class includes methods and data that are sufficient to redirect a reference from the old memory location to the new memory location. As used herein, the term “trapping” refers to intercepting a method call (or other reference related to the object) for the object at the old memory location.
  • In the example of FIG. 3, the flowchart 300 continues at module 310 with inserting a forwarding pointer into the object. Since the data fields of the object have already been copied to the new memory location, the first data field (after the trap class pointer) can be employed to contain the forwarding pointer. The forwarding pointer points to the new memory location. In operation, a reference to the old memory location is trapped using a method associated with a trap class (see, e.g., module 308) and redirected to the new memory location using the forwarding pointer.
  • It may be noted that, in an embodiment, the old memory location need not contain any more than the trap class pointer and the forwarding pointer. Accordingly, in an embodiment, the memory associated with the data fields of the old memory location could be reclaimed. Though this is an advantage associated with implementations according to the teachings provided herein, immediate reclamation of part of the object is not critical to operation.
  • In the example of FIG. 3, the flowchart 300 continues at module 312 with scanning a global stack. One issue that needs to be addressed in any implementation that includes garbage allocation is the issue of global references. Since it is often impossible to determine, from a local perspective, whether global references to an object may be made, the global references should be updated. Accordingly, scanning the global stack is of some importance. The global stack may or may not be scanned one root at a time, but for illustrative purposes, at least with reference to the flowchart 300, it is assumed that one root is scanned at a time.
  • In the example of FIG. 3, the flowchart 300 continues at decision point 314 where it is determined whether scanning is complete. Unless the global stack is initially empty, it will be determined that scanning is not complete.
  • If scanning is not complete (314-N), then the flowchart 300 continues at decision point 316 where it is determined whether the current root includes a pointer to the object. If the current root does not include a pointer to the object (316-N), then the root need not be modified and, at module 312, the flowchart 300 simply continues scanning the global stack. If, on the other hand, the current root does include a pointer to the object (316-Y), then the flowchart 300 continues at module 318 with updating the pointer using the forwarding pointer. Accordingly, a global root that pointed to the old memory location is updated to point to the new memory location of the object. The flowchart 300 then continues from module 312.
  • Eventually, each root of the global stack will have been considered and, at decision point 314, it will be determined that scanning of the global stack is complete. When scanning of the global stack is complete (314-Y), the flowchart 300 continues at module 320 with selecting a next-runnable mutator thread and at module 322 with scanning the next-runnable thread stack. As the name of the thread implies, the thread is next in line (as determined by, for example, a scheduler) to be executed when the executable threads resume execution.
  • In the example of FIG. 3, the flowchart 300 continues at decision point 324 where it is determined whether scanning is complete. Unless the next-runnable thread stack is initially empty (which is unlikely), it will be determined that scanning is not complete.
  • If scanning is not complete (324-N), then the flowchart 300 continues at decision point 326 where it is determined whether the current root includes a pointer to the object. If the current root does not include a pointer to the object (326-N), then the root need not be modified and, at module 322, the flowchart 300 simply continues scanning the next-runnable thread stack. If, on the other hand, the current root does include a pointer to the object (326-Y), then the flowchart 300 continues at module 328 with updating the pointer using the forwarding pointer. Accordingly, a stack root that pointed to the old memory location is updated to point to the new memory location of the object. The flowchart 300 then continues from module 322.
  • Eventually, each root of the next-runnable thread stack will have been considered and, at decision point 324, it will be determined that scanning of the next-runnable thread stack is complete. When scanning of the next-runnable thread stack is complete (324-Y), the flowchart 300 continues at module 330 with marking the next-runnable thread as “scanned.”
  • In the example of FIG. 3, the flowchart 300 continues at module 332 with resuming the mutator threads. Then the flowchart 300 ends. Since the mutator threads resume execution after scanning only one of the mutator thread stacks, the process described with reference to FIG. 3 is bounded. It should be noted that there may be additional references to the old memory location that were not updated in, for example, other objects or in other mutator thread stacks.
  • FIGS. 4 and 5 depict alternative processes for updating the references. FIG. 4 depicts a flowchart 400 of a process according to an embodiment. FIG. 4 is intended to illustrate the processing of unscanned mutator threads. It is assumed that the global stack has already been scanned and one or more mutator threads have been marked “unscanned” before the start of the flowchart 400. The next-runnable thread stack may or may not have already been scanned. If the next-runnable thread stack has not been scanned then, in an embodiment, the flowchart 400 may start with the next-runnable thread stack. If the next-runnable thread stack has already been scanned then, in another embodiment, the flowchart 400 may start with a subsequent thread stack.
  • In the example of FIG. 4, the flowchart 400 starts at module 402 with executing an unscanned mutator thread. The mutator thread may be marked “unscanned” or the fact that the mutator thread is unscanned may be indicated in some other manner. When the mutator thread is to be executed, since the mutator thread has not been scanned, there may be pointers to an old memory location.
  • Accordingly, in the example of FIG. 4, the flowchart 400 continues at decision point 404 with determining whether there are any pointers to an object that has been relocated. If there are pointers to the object (404-Y), then the flowchart 400 continues at module 406 with trapping the class reference and at module 408 with updating pointers using a forward pointer. The modules 404 to 408 may be accomplished by checking each root of the associated mutator thread, or by checking each root in parallel. In this way, any roots that point to the old memory location are updated to point to the new memory location.
  • In the example of FIG. 4, the flowchart 400 continues at module 410 with marking the mutator thread as “scanned.” Alternatively, the mutator thread may be indicated as scanned in some other manner. Then the flowchart 400 ends.
  • FIG. 5 depicts a flowchart 500 of a process according to another embodiment. FIG. 5 is intended to illustrate the processing of unscanned mutator threads. It is assumed that the global stack has already been scanned and one or more mutator threads have been marked “unscanned” before the start of the flowchart 500. The next-runnable thread stack may or may not have already been scanned. If the next-runnable thread stack has not been scanned then, in an embodiment, the flowchart 500 may start with the next-runnable thread stack. If the next-runnable thread stack has already been scanned then, in another embodiment, the flowchart 500 may start with a subsequent thread stack.
  • In the example of FIG. 5, the flowchart 500 starts at decision point 502 where it is determined whether a next unscanned mutator thread exists. The mutator thread may be marked “unscanned” or the fact that the mutator thread is unscanned may be indicated in some other manner. Since the next unscanned mutator thread has not been scanned, there may be pointers to an old memory location. If there is no next unscanned mutator thread, then the flowchart 500 simply ends.
  • Otherwise, if a next unscanned mutator thread exists (502-Y), then the flowchart 500 continues at module 504 with suspending the mutator threads and at module 506 with selecting the next unscanned mutator thread.
  • In the example of FIG. 5, the flowchart 500 continues at module 508 with scanning the unscanned mutator thread stack. In the example of FIG. 5, the flowchart 500 continues at decision point 510 where it is determined whether scanning is complete. Unless the -unscanned mutator thread stack is initially empty (which is unlikely), it will be determined that scanning is not complete.
  • If scanning is not complete (510-N), then the flowchart 500 continues at decision point 512 where it is determined whether the current root includes a pointer to the object. If the current root does not include a pointer to the object (512-N), then the root need not be modified and, at module 508, the flowchart 500 simply continues scanning the unscanned mutator thread stack. If, on the other hand, the current root does include a pointer to the object (512-Y), then the flowchart 500 continues at module 514 with updating the pointer using the forwarding pointer. Accordingly, a mutator stack root that pointed to the old memory location is updated to point to the new memory location of the object. The flowchart 500 then continues from module 508.
  • Eventually, each root of the unscanned mutator thread stack will have been considered and, at decision point 510, it will be determined that scanning of the unscanned mutator thread stack is complete. When scanning of the unscanned mutator thread stack is complete (510-Y), the flowchart 500 continues at module 516 with marking the unscanned mutator thread as “scanned.”
  • In the example of FIG. 5, the flowchart 500 continues at module 518 with resuming the mutator threads. Then the flowchart 500 ends. Since the mutator threads resume execution after scanning only one of the mutator thread stacks, the process described with reference to FIG. 5 is bounded. It should be noted that there may be additional references to the old memory location that were not updated in, for example, subsequent mutator thread stacks. These references may be updated in the same manner as just described, in, in an embodiment, a serial fashion.
  • FIGS. 4 and 5 may be repeated until all thread stacks have been scanned. At this point, it may be determined that the memory associated with the object may or may not be reclaimed. FIG. 6 depicts a flowchart 600 of a process according to another embodiment where the memory associated with the object is to be reclaimed. The flowchart 600 starts at decision point 602 where it is determined whether all executable threads have been scanned. If so (602-Y), then the memory is reclaimed at module 604 and the flowchart 600 ends. If not (602-N), then the flowchart 600 repeats until all threads have been scanned. It may be noted that this does not necessarily entail a program that continuously checks whether all threads have been scanned. Rather, for example, a check may be made after a thread is scanned.
  • The following description of FIGS. 7 and 8 is intended to provide an overview of computer hardware and other operating components suitable for performing the methods of the invention described herein, but is not intended to limit the applicable environments. Similarly, the computer hardware and other operating components may be suitable as part of the apparatuses of the invention described herein. The invention can be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, network PCs, minicomputers, mainframe computers, and the like. The invention can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network.
  • FIG. 7 depicts a networked system 700 that includes several computer systems coupled together through a network 702, such as the Internet. The term “Internet” as used herein refers to a network of networks which uses certain protocols, such as the TCP/IP protocol, and possibly other protocols such as the hypertext transfer protocol (HTTP) for hypertext markup language (HTML) documents that make up the World Wide Web (the web). The physical connections of the Internet and the protocols and communication procedures of the Internet are well known to those of skill in the art.
  • The web server 704 is typically at least one computer system which operates as a server computer system and is configured to operate with the protocols of the world wide web and is coupled to the Internet. The web server system 704 can be a conventional server computer system. Optionally, the web server 704 can be part of an ISP which provides access to the Internet for client systems. The web server 704 is shown coupled to the server computer system 706 which itself is coupled to web content 708, which can be considered a form of a media database. While two computer systems 704 and 706 are shown in FIG. 7, the web server system 704 and the server computer system 706 can be one computer system having different software components providing the web server functionality and the server functionality provided by the server computer system 706, which will be described further below.
  • Access to the network 702 is typically provided by Internet service providers (ISPs), such as the ISPs 710 and 716. Users on client systems, such as client computer systems 712, 718, 722, and 726 obtain access to the Internet through the ISPs 710 and 716. Access to the Internet allows users of the client computer systems to exchange information, receive and send e-mails, and view documents, such as documents which have been prepared in the HTML format. These documents are often provided by web servers, such as web server 704, which are referred to as being “on” the Internet. Often these web servers are provided by the ISPs, such as ISP 710, although a computer system can be set up and connected to the Internet without that system also being an ISP.
  • Client computer systems 712, 718, 722, and 726 can each, with the appropriate web browsing software, view HTML pages provided by the web server 704. The ISP 710 provides Internet connectivity to the client computer system 712 through the modem interface 714, which can be considered part of the client computer system 712. The client computer system can be a personal computer system, a network computer, a web TV system, or other computer system. While FIG. 7 shows the modem interface 714 generically as a “modem,” the interface can be an analog modem, isdn modem, cable modem, satellite transmission interface (e.g. “direct PC”), or other interface for coupling a computer system to other computer systems.
  • Similar to the ISP 714, the ISP 716 provides Internet connectivity for client systems 718, 722, and 726, although as shown in FIG. 7, the connections are not the same for these three computer systems. Client computer system 718 is coupled through a modem interface 720 while client computer systems 722 and 726 are part of a LAN 730.
  • Client computer systems 722 and 726 are coupled to the LAN 730 through network interfaces 724 and 728, which can be ethernet network or other network interfaces. The LAN 730 is also coupled to a gateway computer system 732 which can provide firewall and other Internet-related services for the local area network. This gateway computer system 732 is coupled to the ISP 716 to provide Internet connectivity to the client computer systems 722 and 726. The gateway computer system 732 can be a conventional server computer system.
  • Alternatively, a server computer system 734 can be directly coupled to the LAN 730 through a network interface 736 to provide files 738 and other services to the clients 722 and 726, without the need to connect to the Internet through the gateway system 732.
  • FIG. 8 depicts a computer system 740 for use in the system 700 (FIG. 7). The computer system 740 may be a conventional computer system that can be used as a client computer system or a server computer system or as a web server system. Such a computer system can be used to perform many of the functions of an Internet service provider, such as ISP 710 (FIG. 7).
  • In the example of FIG. 8, the computer system 740 includes a computer 742, I/O devices 744, and a display device 746. The computer 742 includes a processor 748, a communications interface 750, memory 752, display controller 754, non-volatile storage 756, and I/O controller 758. The computer system 740 may be couple to or include the I/O devices 744 and display device 746.
  • The computer 742 interfaces to external systems through the communications interface 750, which may include a modem or network interface. It will be appreciated that the communications interface 750 can be considered to be part of the computer system 740 or a part of the computer 742. The communications interface can be an analog modem, isdn modem, cable modem, token ring interface, satellite transmission interface (e.g. “direct PC”), or other interfaces for coupling a computer system to other computer systems.
  • The processor 748 may be, for example, a conventional microprocessor such as an Intel Pentium microprocessor or Motorola power PC microprocessor. The memory 752 is coupled to the processor 748 by a bus 760. The memory 752 can be dynamic random access memory (DRAM) and can also include static ram (SRAM). The bus 760 couples the processor 748 to the memory 752, also to the non-volatile storage 756, to the display controller 754, and to the I/O controller 758.
  • The I/O devices 744 can include a keyboard, disk drives, printers, a scanner, and other input and output devices, including a mouse or other pointing device. The display controller 754 may control in the conventional manner a display on the display device 746, which can be, for example, a cathode ray tube (CRT) or liquid crystal display (LCD). The display controller 754 and the I/O controller 758 can be implemented with conventional well known technology.
  • The non-volatile storage 756 is often a magnetic hard disk, an optical disk, or another form of storage for large amounts of data. Some of this data is often written, by a direct memory access process, into memory 752 during execution of software in the computer 742. One of skill in the art will immediately recognize that the terms “machine-readable medium” or “computer-readable medium” includes any type of storage device that is accessible by the processor 748 and also encompasses a carrier wave that encodes a data signal.
  • Objects, methods, inline caches, cache states and other object-oriented components may be stored in the non-volatile storage 756, or written into memory 752 during execution of, for example, an object-oriented software program. In this way, the components illustrated in, for example, FIGS. 1, 2A, and 2B can be instantiated on the computer system 740.
  • The computer system 740 is one example of many possible computer systems which have different architectures. For example, personal computers based on an Intel microprocessor often have multiple buses, one of which can be an I/O bus for the peripherals and one that directly connects the processor 748 and the memory 752 (often referred to as a memory bus). The buses are connected together through bridge components that perform any necessary translation due to differing bus protocols.
  • Network computers are another type of computer system that can be used with the present invention. Network computers do not usually include a hard disk or other mass storage, and the executable programs are loaded from a network connection into the memory 752 for execution by the processor 748. A Web TV system, which is known in the art, is also considered to be a computer system according to the present invention, but it may lack some of the features shown in FIG. 8, such as certain input or output devices. A typical computer system will usually include at least a processor, memory, and a bus coupling the memory to the processor.
  • In addition, the computer system 740 is controlled by operating system software which includes a file management system, such as a disk operating system, which is part of the operating system software. One example of an operating system software with its associated file management system software is the family of operating systems known as Windows® from Microsoft Corporation of Redmond, Wash., and their associated file management systems. Another example of operating system software with its associated file management system software is the Linux operating system and its associated file management system. The file management system is typically stored in the non-volatile storage 756 and causes the processor 748 to execute the various acts required by the operating system to input and output data and to store data in memory, including storing files on the non-volatile storage 756.
  • Some portions of the detailed description may be presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of operations leading to a desired result. The operations are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
  • It should be borne in mind, however, that these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
  • The present invention, in some embodiments, also relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or, advantageously, it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-roms, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.
  • The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the methods of some embodiments. The required structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language, and various embodiments may thus be implemented using a variety of programming languages.
  • As used herein, garbage collection is part of a language's runtime system, or an add-on library, perhaps assisted by a compiler, the hardware, the operating system, or any combination of three, that determines what memory a program is no longer using, and recycles it for other use. This is sometimes referred to as automatic memory reclamation.
  • While this invention has been described by way of example in terms of certain embodiments, it will be appreciated by those skilled in the art that certain modifications, permutations and equivalents thereof are within the inventive scope of the present invention. It is therefore intended that the following appended claims include all such modifications, permutations and equivalents as fall within the true spirit and scope of the present invention; the invention is limited only by the claims.

Claims (20)

1. A process, comprising:
pausing mutator threads as part of a relocation procedure;
relocating an object in real-time during garbage collection as part of the relocation procedure;
bounding mutator pause times by scanning only one of a plurality of mutator threads during the relocation procedure; and
resuming the mutator threads as part of the relocation procedure.
2. The process of claim 2, further comprising:
trapping references to the relocated object and updating the references using a forwarding pointer.
3. A process for dynamically relocating an object during garbage collection, comprising:
suspending a plurality of threads, wherein at least two of the plurality of threads include a reference to an object at a first memory location;
relocating the object to a second memory location;
updating references associated with the first memory location, for only one of the plurality of threads, to the second memory location; and
resuming the plurality of threads.
4. The process of claim 3, further comprising marking each of the plurality of threads “unscanned” to indicate that it has not been determined whether the plurality of threads have been updated in response to the relocating of the object.
5. The process of claim 3, further comprising:
reading the object from the first memory location; and
writing the object to the second memory location.
6. The process of claim 5, further comprising patching a class pointer associated with the object at the first memory location to a trap class.
7. The process of claim 5, further comprising inserting a forwarding pointer into the object at the first memory location, wherein the forwarding pointer points to the object at the second memory location.
8. The process of claim 7, further comprising using the forwarding pointer to update a pointer to the first memory location to the second memory location.
9. The process of claim 3, further comprising updating a pointer to the first memory location to the second memory location.
10. The process of claim 9, further comprising scanning a global stack to find the pointer to the first memory location.
11. The process of claim 9, further comprising scanning a next-runnable thread stack to find the pointer to the first memory location.
12. The process of claim 3, wherein said one of the plurality of threads is a next-runnable thread, further comprising:
selecting the next-runnable thread;
scanning a next-runnable thread stack associated with the next-runnable thread; and
marking the next runnable thread “scanned”.
13. The process of claim 12, further comprising updating a pointer to the first memory location in the next-runnable thread stack to point to the second memory location.
14. The process of claim 3, further comprising:
executing a second of the plurality of threads, wherein the second of the plurality of threads includes a class reference associated with the first memory location; and
associating the class reference to the second memory location.
15. The process of claim 14, further comprising trapping the class reference.
16. The process of claim 14, further comprising updating the class reference using a forwarding pointer.
17. The process of claim 14, further comprising marking the second of the plurality of threads “scanned”.
18. The process of claim 3, further comprising:
suspending the plurality of threads a second time;
selecting a second of the plurality of threads;
scanning a stack associated with the second of the plurality of threads;
marking the second of the plurality of threads “scanned”; and
resuming the plurality of threads a second time.
19. The process of claim 3, further comprising reclaiming memory associated with the first memory location when it is determined that each of the plurality of threads has been scanned.
20. A system, comprising:
a scheduler configured to suspend mutator threads for dynamic object relocation;
a relocation engine for, in cooperation with the scheduler, marking mutator threads as “unscanned”, wherein said relocation engine is configured to:
read a first object,
write a second object that is associated with the first object,
patch a class pointer associated with the first object to a trap class,
set a forwarding pointer to the second object at the first object,
scan a global stack,
update references to the first object, if any, according to the forwarding pointer,
select a first thread of the suspended mutator threads,
scan a mutator stack associated with the first thread,
update references to the first object, if any, according to the forwarding pointer, and
mark the first thread of the suspended mutator threads as “scanned”; wherein
said scheduler is further configured to resume the mutator threads after marking the first thread as scanned and before scanning a second mutator stack associated with a second thread of the suspended mutator threads.
US11/100,984 2000-12-13 2005-04-06 Process and system for real-time relocation of objects during garbage collection Abandoned US20050198079A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US11/100,984 US20050198079A1 (en) 2000-12-13 2005-04-06 Process and system for real-time relocation of objects during garbage collection

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US25509600P 2000-12-13 2000-12-13
US10/016,794 US6964039B2 (en) 2000-12-13 2001-10-29 Method to create optimized machine code through combined verification and translation of JAVA™ bytecode
US10/991,444 US7263693B2 (en) 2000-12-13 2004-11-17 Combined verification and compilation of bytecode
US11/100,984 US20050198079A1 (en) 2000-12-13 2005-04-06 Process and system for real-time relocation of objects during garbage collection

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
US10/991,444 Continuation US7263693B2 (en) 2000-12-13 2004-11-17 Combined verification and compilation of bytecode

Publications (1)

Publication Number Publication Date
US20050198079A1 true US20050198079A1 (en) 2005-09-08

Family

ID=26689074

Family Applications (7)

Application Number Title Priority Date Filing Date
US10/016,794 Expired - Lifetime US6964039B2 (en) 2000-12-13 2001-10-29 Method to create optimized machine code through combined verification and translation of JAVA™ bytecode
US10/991,444 Expired - Lifetime US7263693B2 (en) 2000-12-13 2004-11-17 Combined verification and compilation of bytecode
US11/100,790 Abandoned US20050186625A1 (en) 2000-12-13 2005-04-06 Process and system for sharing program fragments
US11/100,985 Abandoned US20050204361A1 (en) 2000-12-13 2005-04-06 Process and apparatus for sharing inline caches
US11/100,984 Abandoned US20050198079A1 (en) 2000-12-13 2005-04-06 Process and system for real-time relocation of objects during garbage collection
US11/495,293 Abandoned US20060294528A1 (en) 2000-12-13 2006-07-27 Process and apparatus for sharing inline caches
US11/760,073 Abandoned US20070271555A1 (en) 2000-12-13 2007-06-08 Combined verification and compilation of bytecode

Family Applications Before (4)

Application Number Title Priority Date Filing Date
US10/016,794 Expired - Lifetime US6964039B2 (en) 2000-12-13 2001-10-29 Method to create optimized machine code through combined verification and translation of JAVA™ bytecode
US10/991,444 Expired - Lifetime US7263693B2 (en) 2000-12-13 2004-11-17 Combined verification and compilation of bytecode
US11/100,790 Abandoned US20050186625A1 (en) 2000-12-13 2005-04-06 Process and system for sharing program fragments
US11/100,985 Abandoned US20050204361A1 (en) 2000-12-13 2005-04-06 Process and apparatus for sharing inline caches

Family Applications After (2)

Application Number Title Priority Date Filing Date
US11/495,293 Abandoned US20060294528A1 (en) 2000-12-13 2006-07-27 Process and apparatus for sharing inline caches
US11/760,073 Abandoned US20070271555A1 (en) 2000-12-13 2007-06-08 Combined verification and compilation of bytecode

Country Status (2)

Country Link
US (7) US6964039B2 (en)
WO (1) WO2002048821A2 (en)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070255773A1 (en) * 2006-04-28 2007-11-01 Sap Ag Method and system for inspecting memory leaks and analyzing contents of garbage collection files
US7480782B2 (en) 2006-06-14 2009-01-20 Sun Microsystems, Inc. Reference-updating using per-chunk referenced-address ranges in a compacting garbage collector
US20100082930A1 (en) * 2008-09-22 2010-04-01 Jiva Azeem S Gpu assisted garbage collection
US20100131479A1 (en) * 2007-06-06 2010-05-27 Athena Telecom Lab, Inc. Method and apparatus for changing reference of database
US20100198789A1 (en) * 2007-06-06 2010-08-05 Kunio Kamimura Database contradiction solution method
US20110004866A1 (en) * 2009-07-01 2011-01-06 Frost Gary R Combining classes referenced by immutable classes into a single synthetic class
US20110137862A1 (en) * 2008-06-12 2011-06-09 Athena Telecom Lab, Inc. Method and apparatus for parallel edit to editable objects
US20110185112A1 (en) * 2010-01-26 2011-07-28 Seagate Technology Llc Verifying Whether Metadata Identifies a Most Current Version of Stored Data in a Memory Space
US20110219204A1 (en) * 2010-03-02 2011-09-08 Caspole Eric R Gpu support for garbage collection
US8397101B2 (en) 2010-06-03 2013-03-12 Seagate Technology Llc Ensuring a most recent version of data is recovered from a memory
US8527544B1 (en) 2011-08-11 2013-09-03 Pure Storage Inc. Garbage collection in a storage system
US20140165072A1 (en) * 2012-12-11 2014-06-12 Nvidia Corporation Technique for saving and restoring thread group operating state
US10628407B1 (en) * 2017-02-27 2020-04-21 Amazon Technologies, Inc. Efficient multithreaded data structure processing
US10866759B2 (en) * 2017-12-20 2020-12-15 Fujitsu Limited Deduplication storage system having garbage collection control method

Families Citing this family (56)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1296252B1 (en) * 2001-09-21 2007-08-01 Koninklijke KPN N.V. Computer system, data communication network, computer program and data carrier, all for filtering a received message comprising mark-up language content
JP2003173261A (en) * 2001-12-06 2003-06-20 Fuji Photo Film Co Ltd Application distributing system, application distributing method and application distributing program
US20040003380A1 (en) * 2002-06-26 2004-01-01 Microsoft Corporation Single pass intermediate language verification algorithm
KR100503077B1 (en) * 2002-12-02 2005-07-21 삼성전자주식회사 A java execution device and a java execution method
US7707255B2 (en) 2003-07-01 2010-04-27 Microsoft Corporation Automatic grouping of electronic mail
KR100654428B1 (en) * 2004-01-14 2006-12-06 삼성전자주식회사 System for improving transaction rate of java program and method thereof
US8146016B2 (en) 2004-08-16 2012-03-27 Microsoft Corporation User interface for displaying a gallery of formatting options applicable to a selected object
US7703036B2 (en) 2004-08-16 2010-04-20 Microsoft Corporation User interface for displaying selectable software functionality controls that are relevant to a selected object
US8255828B2 (en) 2004-08-16 2012-08-28 Microsoft Corporation Command user interface for displaying selectable software functionality controls
US9535679B2 (en) * 2004-12-28 2017-01-03 International Business Machines Corporation Dynamically optimizing applications within a deployment server
US7707547B2 (en) * 2005-03-11 2010-04-27 Aptana, Inc. System and method for creating target byte code
US7844958B2 (en) * 2005-03-11 2010-11-30 Aptana, Inc. System and method for creating target byte code
JP4979206B2 (en) * 2005-07-06 2012-07-18 株式会社ソニー・コンピュータエンタテインメント Information processing method and information processing apparatus
US8627222B2 (en) 2005-09-12 2014-01-07 Microsoft Corporation Expanded search and find user interface
WO2007144695A2 (en) * 2005-11-16 2007-12-21 Esmertec Ag Unified mobile platform
US8291395B2 (en) * 2006-03-31 2012-10-16 Apple Inc. Fast function call dispatching
US9727989B2 (en) 2006-06-01 2017-08-08 Microsoft Technology Licensing, Llc Modifying and formatting a chart using pictorially provided chart elements
US8605090B2 (en) 2006-06-01 2013-12-10 Microsoft Corporation Modifying and formatting a chart using pictorially provided chart elements
US8296742B2 (en) * 2006-10-10 2012-10-23 Microsoft Corporation Automatic native generation
US20080104269A1 (en) * 2006-10-30 2008-05-01 Research In Motion Limited Method and apparatus for web browser page fragmentation
KR101407628B1 (en) * 2007-06-04 2014-06-13 더 보드 오브 리젠츠 오브 더 유니버시티 오브 텍사스 시스템 Apparatus and method for increasing the speed of performing task
US8484578B2 (en) 2007-06-29 2013-07-09 Microsoft Corporation Communication between a document editor in-space user interface and a document editor out-space user interface
US8762880B2 (en) 2007-06-29 2014-06-24 Microsoft Corporation Exposing non-authoring features through document status information in an out-space user interface
KR100927442B1 (en) * 2007-08-16 2009-11-19 주식회사 마크애니 Virtual Application Creation System, Virtual Application Installation Method, Native API Call Processing Method and Virtual Application Execution Method
US8689194B1 (en) 2007-08-20 2014-04-01 The Mathworks, Inc. Optimization identification
US8914774B1 (en) 2007-11-15 2014-12-16 Appcelerator, Inc. System and method for tagging code to determine where the code runs
US8954989B1 (en) 2007-11-19 2015-02-10 Appcelerator, Inc. Flexible, event-driven JavaScript server architecture
US8260845B1 (en) 2007-11-21 2012-09-04 Appcelerator, Inc. System and method for auto-generating JavaScript proxies and meta-proxies
US8566807B1 (en) 2007-11-23 2013-10-22 Appcelerator, Inc. System and method for accessibility of document object model and JavaScript by other platforms
US8719451B1 (en) 2007-11-23 2014-05-06 Appcelerator, Inc. System and method for on-the-fly, post-processing document object model manipulation
US8806431B1 (en) 2007-12-03 2014-08-12 Appecelerator, Inc. Aspect oriented programming
US8756579B1 (en) 2007-12-03 2014-06-17 Appcelerator, Inc. Client-side and server-side unified validation
US8819539B1 (en) 2007-12-03 2014-08-26 Appcelerator, Inc. On-the-fly rewriting of uniform resource locators in a web-page
US8938491B1 (en) 2007-12-04 2015-01-20 Appcelerator, Inc. System and method for secure binding of client calls and server functions
US8527860B1 (en) 2007-12-04 2013-09-03 Appcelerator, Inc. System and method for exposing the dynamic web server-side
US8639743B1 (en) 2007-12-05 2014-01-28 Appcelerator, Inc. System and method for on-the-fly rewriting of JavaScript
US8285813B1 (en) 2007-12-05 2012-10-09 Appcelerator, Inc. System and method for emulating different user agents on a server
US8335982B1 (en) 2007-12-05 2012-12-18 Appcelerator, Inc. System and method for binding a document object model through JavaScript callbacks
US8291079B1 (en) 2008-06-04 2012-10-16 Appcelerator, Inc. System and method for developing, deploying, managing and monitoring a web application in a single environment
US8880678B1 (en) 2008-06-05 2014-11-04 Appcelerator, Inc. System and method for managing and monitoring a web application using multiple cloud providers
US9665850B2 (en) 2008-06-20 2017-05-30 Microsoft Technology Licensing, Llc Synchronized conversation-centric message list and message reading pane
US7596620B1 (en) 2008-11-04 2009-09-29 Aptana, Inc. System and method for developing, deploying, managing and monitoring a web application in a single environment
US7661092B1 (en) * 2008-12-30 2010-02-09 International Business Machines Corporation Intelligent reuse of local variables during bytecode compilation
US7712093B1 (en) * 2009-03-19 2010-05-04 International Business Machines Corporation Determining intra-procedural object flow using enhanced stackmaps
CN102521533B (en) * 2011-12-01 2014-11-19 中国空间技术研究院 Method for verifying remote control command code version
CN103294517B (en) 2012-02-22 2018-05-11 国际商业机器公司 Stack overflow protective device, stack protection method, dependent compilation device and computing device
CN105225204B (en) * 2014-06-26 2018-04-13 优视科技有限公司 Code location method and device
US9244665B1 (en) * 2014-07-17 2016-01-26 Google Inc. Optimized execution of dynamic languages
US10025571B1 (en) 2014-07-17 2018-07-17 Google Llc Optimized execution of dynamic languages
US20160196119A1 (en) * 2015-01-05 2016-07-07 Google Inc. Apparatus and Methods for Virtual and Interface Method Calls
US9420027B1 (en) * 2015-04-27 2016-08-16 Wowza Media Systems, LLC Systems and methods of communicating platform-independent representation of source code
US10908897B2 (en) * 2018-11-27 2021-02-02 International Business Machines Corporation Distributing services to client systems to develop in a shared development environment
US11150915B2 (en) 2019-09-13 2021-10-19 International Business Machines Corporation Deferred bytecode class verification in managed runtime environments
US11403075B2 (en) 2019-11-25 2022-08-02 International Business Machines Corporation Bytecode verification using class relationship caching
US12086574B1 (en) * 2021-10-28 2024-09-10 Amazon Technologies, Inc. Techniques to convert bytecode generated for a first execution environment to machine code for a second execution environment
US11782687B1 (en) * 2022-10-21 2023-10-10 Aurora Labs Ltd. Shrinking executable files based on function analysis

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5088036A (en) * 1989-01-17 1992-02-11 Digital Equipment Corporation Real time, concurrent garbage collection system and method
US6303319B1 (en) * 1996-02-23 2001-10-16 Ariad Pharmaceuticals, Inc. Cell based assay for identifying sh2-domain-specific signal transducer antagonist
US20020052926A1 (en) * 1999-02-22 2002-05-02 Sun Microsystems, Inc. Thread suspension system and method using trapping instructions
US6671707B1 (en) * 1999-10-19 2003-12-30 Intel Corporation Method for practical concurrent copying garbage collection offering minimal thread block times

Family Cites Families (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5748964A (en) * 1994-12-20 1998-05-05 Sun Microsystems, Inc. Bytecode program interpreter apparatus and method with pre-verification of data type restrictions
US5668999A (en) * 1994-12-20 1997-09-16 Sun Microsystems, Inc. System and method for pre-verification of stack usage in bytecode program loops
US6704923B1 (en) * 1994-12-20 2004-03-09 Sun Microsystems, Inc. System and method for pre-verification of stack usage in bytecode program loops
US5630066A (en) * 1994-12-20 1997-05-13 Sun Microsystems, Inc. System and method for locating object view and platform independent object
US5590331A (en) * 1994-12-23 1996-12-31 Sun Microsystems, Inc. Method and apparatus for generating platform-standard object files containing machine-independent code
US5692047A (en) * 1995-12-08 1997-11-25 Sun Microsystems, Inc. System and method for executing verifiable programs with facility for using non-verifiable programs from trusted sources
US5848274A (en) * 1996-02-29 1998-12-08 Supercede, Inc. Incremental byte code compilation system
US6151703A (en) * 1996-05-20 2000-11-21 Inprise Corporation Development system with methods for just-in-time compilation of programs
US6092147A (en) * 1997-04-15 2000-07-18 Sun Microsystems, Inc. Virtual machine with securely distributed bytecode verification
US5903899A (en) * 1997-04-23 1999-05-11 Sun Microsystems, Inc. System and method for assisting exact Garbage collection by segregating the contents of a stack into sub stacks
US5909579A (en) * 1997-04-23 1999-06-01 Sun Microsystems, Inc. Method and apparatus for encoding and decoding delta encoded information to locate live pointers in program data stacks
US6139199A (en) * 1997-06-11 2000-10-31 Sun Microsystems, Inc. Fast just-in-time (JIT) scheduler
US5970249A (en) * 1997-10-06 1999-10-19 Sun Microsystems, Inc. Method and apparatus for performing byte-code optimization during pauses
US6081668A (en) * 1997-10-31 2000-06-27 Canon Kabushiki Kaisha Camera
US6170083B1 (en) * 1997-11-12 2001-01-02 Intel Corporation Method for performing dynamic optimization of computer code
US5978586A (en) * 1997-11-26 1999-11-02 Unisys Corp. Method for tracking changes in source locations in a compiler
US6110226A (en) * 1998-02-19 2000-08-29 Cygnus Solutions Java development environment using optimizing ahead-of-time compiler
US6058482A (en) * 1998-05-22 2000-05-02 Sun Microsystems, Inc. Apparatus, method and system for providing network security for executable code in computer and communications networks
US5983021A (en) * 1998-05-27 1999-11-09 Sun Microsystems Dynamically switching statically bound function calls to dynamically bound function calls without recompilation
US6760907B2 (en) * 1998-06-30 2004-07-06 Sun Microsystems, Inc. Code generation for a bytecode compiler
US6131187A (en) * 1998-08-17 2000-10-10 International Business Machines Corporation Method and system for translating exception handling semantics of a bytecode class file
US6473777B1 (en) * 1998-10-30 2002-10-29 National Semiconductor Corporation Method for accelerating java virtual machine bytecode verification, just-in-time compilation and garbage collection by using a dedicated co-processor
US6510551B1 (en) * 1998-12-22 2003-01-21 Channelpoint, Inc. System for expressing complex data relationships using simple language constructs
US6560774B1 (en) * 1999-09-01 2003-05-06 Microsoft Corporation Verifier to check intermediate language
JP3356742B2 (en) * 1999-11-17 2002-12-16 インターナショナル・ビジネス・マシーンズ・コーポレーション Program execution method
EP1308838A3 (en) * 2001-10-31 2007-12-19 Aplix Corporation Intermediate code preprocessing apparatus, intermediate code execution apparatus, intermediate code execution system, and computer program product for preprocessing or executing intermediate code
DE60223990T2 (en) * 2001-10-31 2008-12-04 Aplix Corp. System for executing intermediate code, method for executing intermediate code, and computer program product for executing intermediate code
US20040040029A1 (en) * 2002-08-22 2004-02-26 Mourad Debbabi Method call acceleration in virtual machines

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5088036A (en) * 1989-01-17 1992-02-11 Digital Equipment Corporation Real time, concurrent garbage collection system and method
US6303319B1 (en) * 1996-02-23 2001-10-16 Ariad Pharmaceuticals, Inc. Cell based assay for identifying sh2-domain-specific signal transducer antagonist
US20020052926A1 (en) * 1999-02-22 2002-05-02 Sun Microsystems, Inc. Thread suspension system and method using trapping instructions
US6671707B1 (en) * 1999-10-19 2003-12-30 Intel Corporation Method for practical concurrent copying garbage collection offering minimal thread block times

Cited By (28)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7953772B2 (en) * 2006-04-28 2011-05-31 Sap Ag Method and system for inspecting memory leaks and analyzing contents of garbage collection files
US7734666B2 (en) * 2006-04-28 2010-06-08 Sap Ag Method and system for inspecting memory leaks and analyzing contents of garbage collection files
US20100205230A1 (en) * 2006-04-28 2010-08-12 Sap Ag Method and System for Inspecting Memory Leaks and Analyzing Contents of Garbage Collection Files
US20070255773A1 (en) * 2006-04-28 2007-11-01 Sap Ag Method and system for inspecting memory leaks and analyzing contents of garbage collection files
US7480782B2 (en) 2006-06-14 2009-01-20 Sun Microsystems, Inc. Reference-updating using per-chunk referenced-address ranges in a compacting garbage collector
US20100131479A1 (en) * 2007-06-06 2010-05-27 Athena Telecom Lab, Inc. Method and apparatus for changing reference of database
US20100198789A1 (en) * 2007-06-06 2010-08-05 Kunio Kamimura Database contradiction solution method
US20110082833A1 (en) * 2007-06-06 2011-04-07 Kunio Kamimura Database parallel editing method
US8171003B2 (en) 2007-06-06 2012-05-01 Kunio Kamimura Method and apparatus for changing reference of database
US9678996B2 (en) 2007-06-06 2017-06-13 Kunio Kamimura Conflict resolution system for database parallel editing
US20110137862A1 (en) * 2008-06-12 2011-06-09 Athena Telecom Lab, Inc. Method and apparatus for parallel edit to editable objects
US20100082930A1 (en) * 2008-09-22 2010-04-01 Jiva Azeem S Gpu assisted garbage collection
US8301672B2 (en) 2008-09-22 2012-10-30 Advanced Micro Devices, Inc. GPU assisted garbage collection
US20110004866A1 (en) * 2009-07-01 2011-01-06 Frost Gary R Combining classes referenced by immutable classes into a single synthetic class
US8473900B2 (en) 2009-07-01 2013-06-25 Advanced Micro Devices, Inc. Combining classes referenced by immutable classes into a single synthetic class
US20110185112A1 (en) * 2010-01-26 2011-07-28 Seagate Technology Llc Verifying Whether Metadata Identifies a Most Current Version of Stored Data in a Memory Space
US8364886B2 (en) 2010-01-26 2013-01-29 Seagate Technology Llc Verifying whether metadata identifies a most current version of stored data in a memory space
US8327109B2 (en) 2010-03-02 2012-12-04 Advanced Micro Devices, Inc. GPU support for garbage collection
US20110219204A1 (en) * 2010-03-02 2011-09-08 Caspole Eric R Gpu support for garbage collection
US8397101B2 (en) 2010-06-03 2013-03-12 Seagate Technology Llc Ensuring a most recent version of data is recovered from a memory
US8886691B2 (en) 2011-08-11 2014-11-11 Pure Storage, Inc. Garbage collection in a storage system
US9251066B2 (en) 2011-08-11 2016-02-02 Pure Storage, Inc. Garbage collection in a storage system
US8527544B1 (en) 2011-08-11 2013-09-03 Pure Storage Inc. Garbage collection in a storage system
USRE49148E1 (en) 2011-08-11 2022-07-26 Pure Storage, Inc. Reclaiming space occupied by duplicated data in a storage system
US20140165072A1 (en) * 2012-12-11 2014-06-12 Nvidia Corporation Technique for saving and restoring thread group operating state
US10235208B2 (en) * 2012-12-11 2019-03-19 Nvidia Corporation Technique for saving and restoring thread group operating state
US10628407B1 (en) * 2017-02-27 2020-04-21 Amazon Technologies, Inc. Efficient multithreaded data structure processing
US10866759B2 (en) * 2017-12-20 2020-12-15 Fujitsu Limited Deduplication storage system having garbage collection control method

Also Published As

Publication number Publication date
WO2002048821A2 (en) 2002-06-20
US20070271555A1 (en) 2007-11-22
US7263693B2 (en) 2007-08-28
US20050091650A1 (en) 2005-04-28
US20050186625A1 (en) 2005-08-25
US20020138825A1 (en) 2002-09-26
WO2002048821A3 (en) 2003-11-27
US6964039B2 (en) 2005-11-08
US20060294528A1 (en) 2006-12-28
US20050204361A1 (en) 2005-09-15

Similar Documents

Publication Publication Date Title
US20050198079A1 (en) Process and system for real-time relocation of objects during garbage collection
US20060248130A1 (en) Process and system for real-time relocation of objects during garbage collection
US6542920B1 (en) Mechanism for implementing multiple thread pools in a computer system to optimize system performance
US6314436B1 (en) Space-limited marking structure for tracing garbage collectors
US6766349B1 (en) Mechanism for obtaining a thread from, and returning a thread to, a thread pool without attaching and detaching
US6442661B1 (en) Self-tuning memory management for computer systems
US6353838B2 (en) Incremental garbage collection
US7827217B2 (en) Method and system for a grid-enabled virtual machine with movable objects
US6314567B1 (en) Apparatus and method for transferring state data when performing on-line replacement of a running program code and data
US6629113B1 (en) Method and system for dynamically adjustable and configurable garbage collector
US6530080B2 (en) Method and apparatus for pre-processing and packaging class files
US7310718B1 (en) Method for enabling comprehensive profiling of garbage-collected memory systems
US7373640B1 (en) Technique for dynamically restricting thread concurrency without rewriting thread code
US6279012B1 (en) Reducing the memory footprint of a session duration semispace
EP0993634B1 (en) Method and apparatus for managing hashed objects
US6604125B1 (en) Mechanism for enabling a thread unaware or non thread safe application to be executed safely in a multi-threaded environment
US6895584B1 (en) Mechanism for evaluating requests prior to disposition in a multi-threaded environment
US6701520B1 (en) Preventing garbage collection of objects in object oriented computer programming languages
US11620215B2 (en) Multi-threaded pause-less replicating garbage collection
US7203756B2 (en) Mechanism to cache references to Java RMI remote objects implementing the unreferenced interface
US20060167961A1 (en) Autonomic cache object array based on heap usage
JP2000515279A (en) Method and apparatus for performing distributed object invocation using proxy and memory allocation
US20060242631A1 (en) Process and system for sharing program fragments
US20080235305A1 (en) Dense prefix generation for garbage collection
US20120310998A1 (en) Efficient remembered set for region-based garbage collectors

Legal Events

Date Code Title Description
AS Assignment

Owner name: ESMERTEC AG, SWITZERLAND

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:HEEB, BEAT;REEL/FRAME:018376/0174

Effective date: 20011022

STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION