Object locking in a shared VM environment
First Claim
1. A computer implemented method of operating a shared object on a system comprising:
- running a plurality of execution processes on each virtual machine of multiple virtual machines (VMs), said system including at least one object which is shared between the VMs so that the at least one object is accessed from two or more VMs, and at least one non-shared object is accessed only from a single VM, wherein an object contains a lock data word which for the at least one non-shared object can contain a reference to a monitor that controls access to the at least one non-shared object,said method further comprises performing lock operations on a shared object by the steps of;
writing a predefined value into said lock data word for the shared object;
detecting the predefined value in the shared object which specifies that an object is shared by at least two VMs;
responsive to said detection, utilizing a monitor to control local access to the shared object for an execution process, said monitor being on the same VM as said execution process; and
updating a data structure only on the same VM as said execution process to associate said monitor with the shared object.
1 Assignment
0 Petitions
Accused Products
Abstract
A system is provided which comprises multiple Java virtual machines (VMs). Each VM is capable of running a plurality of threads. The system includes at least one object which is shared between the VMs so that it is accessible from two or more VMs, and at least one non-shared object which is accessible only from a single VM. In order to perform a lock operation on a shared object, it is first detecting that an object is a shared object. In a preferred embodiment, this is accomplished by locating a predefined value in a particular lock data word in the object. In response to the detection, a monitor is used to control local access to the shared object for the thread that is requesting the object. The monitor is on the same VM as the requesting thread. In addition, a data structure, which may be a proxy object, is updated in order to associate the monitor with the shared object.
-
Citations
19 Claims
-
1. A computer implemented method of operating a shared object on a system comprising:
-
running a plurality of execution processes on each virtual machine of multiple virtual machines (VMs), said system including at least one object which is shared between the VMs so that the at least one object is accessed from two or more VMs, and at least one non-shared object is accessed only from a single VM, wherein an object contains a lock data word which for the at least one non-shared object can contain a reference to a monitor that controls access to the at least one non-shared object, said method further comprises performing lock operations on a shared object by the steps of; writing a predefined value into said lock data word for the shared object; detecting the predefined value in the shared object which specifies that an object is shared by at least two VMs; responsive to said detection, utilizing a monitor to control local access to the shared object for an execution process, said monitor being on the same VM as said execution process; and updating a data structure only on the same VM as said execution process to associate said monitor with the shared object. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 19)
-
-
10. A computer implemented system for operating a shared object comprising:
-
multiple virtual machine (VMs), each VM running a plurality of execution processes, said system including at least one object which is shared between the VMs so that the at least one object is accessed from two or more VMs, and at least one non-shared object is accessed only from a single VM, wherein an object contains a lock data word which for the at least one non-shared object can contain a reference to a monitor that controls access to the at least one non-shared object, said system further including means for performing lock operations on a shared object comprising; means for writing a predefined value into said lock data word for the shared object; means for detecting the predefined value in the shared object which specifies that an object is shared by at least two VMs; a monitor for controlling local access to the shared object for an execution process, said monitor being on the same VM as said execution process; and a data structure is updated only on the same VM as said execution process to associate said monitor with the shared object. - View Dependent Claims (11, 12, 13, 14, 15, 16, 17, 18)
-
Specification