Friday, May 29, 2009

Shared Closures in Architecture of the VM Container

Concept

Shared closures enable Java objects to be stored in the shared memory. These objects can then be used by all VMs belonging to the same instance.

Since object references from the shared memory heap are not allowed in a local heap, the transitive shell of the object must always be used, hence the name, shared closure.

There are two types of shared closures - mappable and copy-only.

Mappable:Mappable shared closures can be used in two ways – mapping or copying

With mapping the shared closure is mapped to the address space. This is done very quickly but the shared closure can only be read and not changed. Mapping is particularly suitable for large objects that do not need changing.

With copying the entire shared closure is copied to the local heap. You then have read and write access to it. This takes of course more time than mapping, but does enable objects to be changed.

Copy-only means that the shared closure can only be copied (see above). The procedure is known as serialization in the Java world, and is used VM-wide in the VM Container.

1 comment:

seventyros said...

For a Excellent Online Resource for SAP EP and SAP Web Dynpro ABAP, Visit Learn SAP Online

Blog Archive