Virtual computer system, area management method, and program
First Claim
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 includea basic area which is the first area, andone or more copy areas, one of which is assigned to one virtual computer among the plurality of virtual computers when the one virtual computer attempts to perform writing to the basic area, a content of the basic area being copied to the one of the one or more copy areas,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 comprisesan 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, andthe 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.
3 Assignments
0 Petitions
Accused Products
Abstract
A virtual computer system having a plurality of virtual computers includes an area assignment unit operable to, when a virtual computer attempts to perform writing to a basic area which is assigned to and shared by the plurality of virtual computers, change an assignment to the virtual computer from the basic area to a copy area to which the basic area is copied and the writing is performed. Additionally an area freeing unit is operable to, when a content of the basic area matches a content of at least one copy area, change area assignment to one or more virtual computers, to which have been assigned one or more other areas than one area among the areas whose contents match each other, to the one area, and free the one or more other areas.
-
Citations
14 Claims
-
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 a basic area which is the first area, and one or more copy areas, one of which is assigned to one virtual computer among the plurality of virtual computers when the one virtual computer attempts to perform writing to the basic area, a content of the basic area being copied to the one of the one or more copy areas, 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.
-
-
2. 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 a basic area which is the first area, and one or more copy areas, one of which is assigned to one virtual computer among the plurality of virtual computers when the one virtual computer attempts to perform writing to the basic area, a content of the basic area being copied to the one of the one or more copy areas, 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, 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 sharing the basic area, excluding the virtual computer, becomes one, sets the basic area to the not-shared status in the page table, and wherein the predetermined condition is that any virtual computer attempts to write to an area that is set to the not-shared status in the page table, and when the predetermined condition is satisfied, the area freeing unit performs the writing to the area that is 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. - View Dependent Claims (3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. An area management method for managing areas provided in a memory in a virtual computer system having a plurality of virtual computers that are realized when a processor executes a program stored in the memory,
the areas in the memory include a basic area which is the first area, and one or more copy areas, one of which is assigned to one virtual computer among the plurality of virtual computers when the one virtual computer attempts to perform writing to the basic area, a content of the basic area being copied to the one of the one or more copy areas, 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, 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 sharing the basic area, excluding the virtual computer, becomes one, sets the basic area to the not-shared status in the page table, the area management method comprising: -
an area freeing step of, when a predetermined condition is satisfied, performing 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, changing area assignment by assigning the first area to the at least one virtual computer in place of the second area, and freeing the second area, wherein the predetermined condition is that any virtual computer attempts to write to an area that is set to the not-shared status in the page table, and when the predetermined condition is satisfied, the area freeing unit performs the writing to the area that is 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.
-
-
14. A non-transitory computer-readable recording medium storing a program for causing a processor to execute an area management process of managing areas provided in a memory in a virtual computer system having a plurality of virtual computers that are realized when the processor executes the program stored in the memory,
the areas in the memory include a basic area which is the first area, and one or more copy areas, one of which is assigned to one virtual computer among the plurality of virtual computers when the one virtual computer attempts to perform writing to the basic area, a content of the basic area being copied to the one of the one or more copy areas, 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, 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 sharing the basic area, excluding the virtual computer, becomes one, sets the basic area to the not-shared status in the page table, the area management process comprising: -
an area freeing step of, when a predetermined condition is satisfied, performing 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, changing area assignment by assigning the first area to the at least one virtual computer in place of the second area, and freeing the second area, wherein the predetermined condition is that any virtual computer attempts to write to an area that is set to the not-shared status in the page table, and when the predetermined condition is satisfied, the area freeing unit performs the writing to the area that is 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.
-
Specification