Google Ads

Monday, August 31, 2009

Variations of Garbage Collection

5.8.2 Variations of Garbage Collection


There are number of recently discovered variations of the garbage collection system just presented. In the traditional schemes we have considered, the applications programs function as long as space availability of the system satisfies certain criteria (These criteria May relate to the total amount of free space available the number and size of contiguous memory location available, the amount of memory requested since the lost garbage collection space, so forth) When these criteria are no longer met, all application programs halt and the system directs its resources to garbage collection. Once the collection has completed, the application program may resume execution from the point at which they were interrupted.

In some situation, however, that is not satisfactory. Applications that are executing in real time cannot be halted while the system is performing garbage collection. In this circumstance it is usually necessary to dedicate a separate processor devoted exclusively to the garbage collection. When the system signal that garbage collection must be performed, the separate processor begin executing concurrently with the applications programs. Because of this simultaneous execution it is necessary to guarantee that node that are in the process of being acquired for use by an application program are not mistakenly return to the available pool by the calculator. Avoiding such a problem is not a trivial process. Systems that allow the collection process to proceed simultaneously with the application program use “on-the-fly” garbage collection.

Another subject of interest deals with minimizing the cost of reclaiming unused space. In the methods we have discussed, the cost of reclaiming any portion of storage is the same as the cost of reclaiming any other portion (of the same size) Recently attention of storage is proportional to its lifetime. It has been shown empirically that some portions of memory are required for smaller time intervals than are others and that requests for portions of memory with smaller lifetime acquires more frequently than do request for portions of memory with longer lifetime. Thus, by reducing the cost of retrieving portions of memory require for short time periods that the expense of the cost of retrieving portions of memory with longer life spans, the overall cost of the garbage collection process will be reduced.

The process of garbage collection is also applied to reclaiming unused space in secondary device (For example, a disk). Although the concept of allocation and freeing space is the same (that is, space may be requested or released by a program) algorithms that manage space such devices often cannot be translated efficiently from the their counterparts that manipulated main memory. The reason for this is that the cost of accessing any location in main memory is the same as that of accessing any other locations in main memory. In secondary storage, on the other hand, the cost depends on the locations of storage that is currently being accessed as well as the location we desire to access. It is very efficient to access a portion of secondary storage that is in the same block that is now being accessed; to access the location in a different block may involve expensive disk seeks.

No comments:

Post a Comment