Patent ID: 9063868
Filing Date: 2015-06-23
Classification: G06F

Abstract:
1. A virtual computer system having a plurality of virtual computers that are realized when a processor executes a program stored in a memory, the virtual computer system comprising: an area freeing unit configured to, when a predetermined condition is satisfied, perform a comparison among contents of areas in the memory assigned to the plurality of virtual computers, and when the comparison results in indication of a match between a content of a first area assigned to a virtual computer and a content of a second area assigned to at least one virtual computer other than the virtual computer, change area assignment by assigning the first area to the at least one virtual computer in place of the second area, and free the second area, wherein the areas in the memory include the basic area and the one or more copy areas are respectively pages managed in a page table stored in the memory, the virtual computer system further comprises an area assignment unit configured to, when the one virtual computer attempts to perform writing to the basic area in a state where the basic area is assigned to and shared by the plurality of virtual computers, change area assignment by assigning any of the one or more copy areas to the one virtual computer in place of the basic area, and keep the basic area to be assigned to the plurality of virtual computers except for the one virtual computer; and a write inhibit setting unit operable to make a setting in the page table to inhibit writing to the basic area, wherein, in the page table, the basic area, which has been assigned to and shared by the plurality of virtual computers, is set to a shared status indicating that an area is shared by two or more virtual computers, the area assignment unit, when changing the area assignment to the virtual computer from the basic area to the copy area, sets the copy area to a not-shared status indicating that an area is not shared by virtual computers, and when the number of virtual computers, excluding the virtual computer, sharing the basic area becomes one, sets the basic area to the not-shared status in the page table, and the predetermined condition is that a write inhibit violation occurs when a virtual computer, to which the basic area, which is set to the not-shared status in the page table, is assigned, attempts to write to the basic area, and when the predetermined condition is satisfied, the area freeing unit performs the writing to the basic area having been set to the not-shared status, then performs the comparison, and when changing the area assignment to the one or more virtual computers to which the one or more other areas among the areas whose contents match each other have been assigned, sets, in the page table, the one area to the shared status.