Garbage collection

Distributed system and memory management device, method, and storage medium

6324549

Abstract

A remote access managing means of a module manages each of an object that references an outside object and an object that is referenced from the outside by adding a reference weight to each object. In other words, the remote access managing means stores a reference weight according to the type of communication message in the object information of communication messages for dealing with outside modules. For example, an additional reference weight that is set by a reference weight. managing means is stored in an execution request message to an outside object. A heap memory managing means reclaims memory regions of unnecessary objects in the heap memory regions in accordance with the reference weight that is set through the exchange of this type of messages.


Claims

What is claimed is:

1. A distributed system provided with a plurality of modules that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight;

wherein said module in which said reference origin object resides, comprising:

partial reference weight discriminating means.for discriminating whether or not said partial reference weight of said reference origin object is within a prescribed range;

first transmitting means for transmitting to a module in which said reference destination object resides a first additional reference weight having a prescribed value together with a reference request to said reference destination object when said partial reference weight discriminating means determines that said partial reference weight is not within a prescribed range;

first receiving means for receiving second additional reference weight transmitted from said module in which said reference destination object resides together with a response to said reference request; and

partial reference weight updating means for updating partial reference weight of said reference origin object in accordance with said second additional reference weight received by said first receiving means;

and wherein said module in which said reference destination object resides, comprising:

second receiving means for receiving said reference request and said first additional reference weight transmitted from said first transmitting means;

first total reference weight updating means for updating total reference weight of said reference destination object in accordance with said first additional reference weight received by said second receiving means; and

second transmitting means for transmitting to said first receiving means said second additional reference weight having a value corresponding to said first additional reference weight together with said response to said reference request received by said second receiving means.

2. A distributed system according to claim 1 wherein a module that includes said reference origin object, further comprising:

garbage object discriminating means for discriminating whether or not said reference origin object has become unnecessary;

third transmitting means for transmitting to said module in which said reference destination object resides a third additional reference weight that corresponds to partial reference weight of said reference origin object together with a reference deletion request for deleting reference from said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary; and

first memory region reclaiming means for reclaiming memory region of said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary;

and a module that includes said reference destination object further comprises:

third receiving means for receiving said reference deletion request and said third additional reference weight transmitted from said third transmitting means; and

second total reference weight updating means for updating total reference weight held by said reference destination object in accordance with said third additional reference weight received by said third receiving means.

3. A distributed system provided with a plurality of modules that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight;

wherein at least one module of said plurality of modules, comprising:

first transmitting means for transmitting information relating to an object residing in said module to another module;

first receiving means for receiving a first additional reference weight for setting partial reference weight and a response to information relating to said object transmitted from another module; and

first relay object creating means for setting said first additional reference weight received by said first receiving means as partial reference weight, and converting said object to a relay object for transferring a reference request from another object to the transmission destination of information relating to said object;

and wherein at least one other module of said plurality of modules comprises:

second receiving means for receiving information relating to an object transmitted from a first transmitting means of another module;

reference destination object creating means for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said object received by said second receiving means; and

second transmitting means for transmitting to said first receiving means said first additional reference weight having a value corresponding to said total reference weight together with a response to information relating to said object received by said second receiving means.

4. A distributed system that is made up of a plurality of computers joined by way of a network, that is provided with a plurality of modules, and that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight;

wherein at least one computer of said plurality of computers, comprising:

first transmitting means for transmitting, to another computer by way of said network, information relating to that module including information relating to an object residing inside said computer;

first receiving means for receiving a response to information relating to said module that was transmitted from a module created in another computer, and first additional reference weight for setting partial reference weight; and

first relay module creating means for setting said first additional reference weight received by said first receiving means as partial reference weight, and converting an object within said module to a relay object for transferring a reference request from another object to a transmission destination of information relating to said module;

and wherein at least one other computer of said plurality of computers, comprising:

second receiving means for receiving information relating to a module transmitted from said first transmitting means of another computer;

module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received by said second receiving means; and

second transmitting means for transmitting to said first receiving means said first additional reference weight having a value corresponding to said total reference weight together with a response to information relating to said module received by said second receiving means.

5. A memory management device for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight, comprising:

partial reference weight discriminating means for discriminating whether or not partial reference weight belonging to said reference origin object is within a prescribed range when said reference origin object references said reference destination object;

first transmitting means for transmitting to another module in which said reference destination object resides a first additional reference weight having a prescribed value together with a reference request to said reference destination object when said partial reference weight discriminating means determines that said partial reference weight is not within a prescribed range;

first receiving means for receiving first additional reference weight and a reference request transmitted from a first transmitting means belonging to another module;

first total reference weight updating means for updating total reference weight belonging to said reference destination object in accordance with said first additional reference weight received by said first receiving means;

second transmitting means for transmitting, to another module that transmitted said reference request, a second additional reference weight having a value corresponding to said first additional reference weight received by said first receiving means, together with a response to said reference request received by said first receiving means;

second receiving means for receiving a second additional reference weight and a response transmitted by a second transmitting means of another module; and

partial reference weight updating means for updating partial reference weight belonging to said reference origin object in accordance with said second additional reference weight received by said second receiving means.

6. A memory management device according to claim 5, wherein said partial reference weight discriminating means, further comprising:

first discriminating means for discriminating whether or not said partial reference weight is smaller than a prescribed minimum;

wherein said first transmitting means transmits a first additional reference weight having a positive value together with said reference request when said first discriminating means determines that said partial reference weight is smaller than a prescribed minimum; and

said first total reference weight updating means updates total reference weight belonging to said reference destination object by adding first additional reference weight having a positive value received by said first receiving means.

7. A memory management device according to claim 5, wherein said partial reference weight discriminating means, further comprising:

a second discriminating means for discriminating whether or not said partial reference weight is greater than a prescribed maximum;

wherein said first transmitting means transmits a first additional reference weight having a negative value together with said reference request when said second discriminating means determines that said partial reference weight is greater than a prescribed maximum; and

said first total reference weight updating means updates total reference weight belonging to said reference destination object by adding a first additional reference weight having a negative value received by said first receiving means.

8. A memory management device according to claim 6, wherein said partial reference weight discriminating means, further comprising:

a second discriminating means for discriminating whether or not said partial reference weight is greater than a prescribed maximum;

wherein said first transmitting means transmits a first additional reference weight having a negative value together with said reference request when said second discriminating means determines that said partial reference weight is greater than a prescribed maximum; and

said first total reference weight updating means updates total reference weight belonging to said reference destination object by adding a first additional reference weight having a negative value received by said first receiving means.

9. A memory management device according to claim 5, comprising:

garbage object discriminating means for discriminating whether or not said reference origin object has become unnecessary;

third transmitting means for transmitting, to a module in which said reference destination object resides, a third additional reference weight that corresponds to partial reference weight belonging to said reference origin object together with a reference deletion request for deleting reference from said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary;

third receiving means for receiving a reference deletion request and third additional reference weight transmitted from a third transmitting means belonging to another module;

second total reference weight updating means for updating total reference weight belonging to said reference destination object in accordance with said third additional reference weight received by said third receiving means; and

first memory region reclaiming means for reclaiming memory region of said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary.

10. A memory management device according to claim 6, comprising:

garbage object discriminating means for discriminating whether or not said reference origin object has become unnecessary;

third transmitting means for transmitting, to a module in which said reference destination object resides, a third additional reference weight that corresponds to partial reference weight belonging to said reference origin object together with a reference deletion request for deleting reference from said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary;

third receiving means for receiving a reference deletion request and third additional reference weight transmitted from a third transmitting means belonging to another module;

second total reference weight updating means for updating total reference weight belonging to said reference destination object in accordance with said third additional reference weight received by said third receiving means; and

first memory region reclaiming means for reclaiming memory region of said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary.

11. A memory management device according to claim 7, comprising:

garbage object discriminating means for discriminating whether or not said reference origin object has become unnecessary; third transmitting means for transmitting, to a module in which said reference destination object resides, a third additional reference weight that corresponds to partial reference weight belonging to said reference origin object together with a reference deletion request for deleting reference from said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary;

third receiving means for receiving a reference deletion request and third additional reference weight transmitted from a third transmitting means belonging to another module;

second total reference weight updating means for updating total reference weight belonging to said reference destination object in accordance with said third additional reference weight received by said third receiving means; and

first memory region reclaiming means for reclaiming memory region of said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary.

12. A memory management device according to claim 8, comprising:

garbage object discriminating means for discriminating whether or not said reference origin object has become unnecessary;

third transmitting means for transmitting, to a module in which said reference destination object resides, a third additional reference weight that corresponds to partial reference weight belonging to said reference origin object together with a reference deletion request for deleting reference from said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary;

third receiving means for receiving a reference deletion request and third additional reference weight transmitted from a third transmitting means belonging to another module;

second total reference weight updating means for updating total reference weight belonging to said reference destination object in accordance with said third additional reference weight received by said third receiving means; and

first memory region reclaiming means for reclaiming memory region of said reference origin object when said garbage object discriminating means determines that said reference origin object has become unnecessary.

13. A memory management device according to claim 9, comprising:

reference state discriminating means for discriminating whether or not said reference destination object has not been referenced from a reference origin object residing in another module and, moreover, has not been referenced from other objects residing in the same module; and

second memory region reclaiming means for reclaiming memory region of said reference destination object when said reference state discriminating means determines that said reference destination object has not been referenced by either said reference origin object or said other objects.

14. A memory management device according to claim 10, comprising:

reference state discriminating means for discriminating whether or not said reference destination object has not been referenced from a reference origin object residing in another module and, moreover, has not been referenced from other objects residing in the same module; and

second memory region reclaiming means for reclaiming memory region of said reference destination object when said reference state discriminating means determines that said reference destination object has not been referenced by either said reference origin object or said other objects.

15. A memory management device according to claim 11, comprising:

reference state discriminating means for discriminating whether or not said reference destination object has not been referenced from a reference origin object residing in another module and, moreover, has not been referenced from other objects residing in the same module; and

second memory region reclaiming means for reclaiming memory region of said reference destination object when said reference state discriminating means determines that said reference destination object has not been referenced by either said reference origin object or said other objects.

16. A memory management device according to claim 12, comprising:

reference state discriminating means for discriminating whether or not said reference destination object has not been referenced from a reference origin object residing in another module and, moreover, has not been referenced from other objects residing in the same module; and

second memory region reclaiming means for reclaiming memory region of said reference destination object when said reference state discriminating means determines that said reference destination object has not been referenced by either said reference origin object or said other objects.

17. A memory management device for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight, comprising:

first transmitting means for transmitting information relating to an object that resides in the same module to another module;

first receiving means for receiving information relating to an object that is transmitted from a first transmitting means of another module;

first reference destination object creating means for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said object received by said first receiving means;

second transmitting means for transmitting, to a module that transmitted information relating to said object, a first additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said object received by said first receiving means;

second receiving means for receiving a first additional reference weight for setting partial reference weight and a response to information relating to an object transmitted from a second transmitting means of another module; and

first relay object creating means for setting said first additional reference weight received by said second receiving means as a partial reference weight, and converting said object to a relay object for transferring a reference request from another object to a reference destination object created by said first reference destination object creating means.

18. A memory management device according to claim 17, wherein a relay object converted by said first relay object creating means is not an object carrying actual content.

19. A memory management device according to claim 17, further comprising:

third transmitting means for transmitting to another module information relating to said reference destination object created by said first reference destination object creating means;

third receiving means for receiving information relating to a reference destination object transmitted from a third transmitting means of another module;

second reference destination object creating means for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said reference destination object received by said third receiving means;

fourth transmitting means for transmitting, to a module that transmitted information relating to said object, a second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said reference destination object received by said third receiving means;

fourth receiving means for receiving a second additional reference weight for setting partial reference weight and a response to information relating to a reference destination object transmitted from a fourth transmitting means of another module; and

second relay object creating means for setting said second additional reference weight received by said fourth receiving means as partial reference weight, and converting said reference destination object to a relay object for transferring a reference request from another object to a reference destination object created by said second reference destination object creating means.

20. A memory management device according to claim 18, further comprising:

third transmitting means for transmitting to another module information relating to said reference destination object created by said first reference destination object creating means;

third receiving means for receiving information relating to a reference destination object transmitted from a third transmitting means of another module;

second reference destination object creating means for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said reference destination object received by said third receiving means;

fourth transmitting means for transmitting, to a module that transmitted information relating to said object, a second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said reference destination object received by said third receiving means;

fourth receiving means for receiving a second additional reference weight for setting partial reference weight and a response to information relating to a reference destination object transmitted from a fourth transmitting means of another module; and

second relay object creating means for setting said second additional reference weight received by said fourth receiving means as partial reference weight, and converting said reference destination object to a relay object for transferring a reference request from another object to a reference destination object created by said second reference destination object creating means.

21. A memory management device according to claim 19, wherein said relay object converted by said second relay object creating means is not an object carrying actual content.

22. A memory management device according to claim 20 wherein said relay object converted by said second relay object creating means is not an object carrying actual content.

23. A memory management device according to claim 17, further comprising:

fifth transmitting means for, when a relay object created by said first relay object creating means has received a reference request from another object, adding to said reference request a third additional reference weight having a prescribed value and transferring said reference request to a module having a first reference destination object;

fifth receiving means for receiving third additional reference weight and a reference request transferred from a fifth transmitting means of another module;

first total reference weight updating means for updating total reference weight belonging to a reference destination object created by said first reference destination object creating means in accordance with said third additional reference weight received by said fifth receiving means;

sixth transmitting means for transmitting a fourth additional reference weight having a value that corresponds to said third additional reference weight and specific information for specifying a module in which said reference destination object resides together with a response corresponding to a reference request received by said fifth receiving means;

sixth receiving means for receiving a response, a fourth additional reference weight, and specific information transmitted from a sixth transmitting means of another module;

reference destination updating means for updating partial reference weight of an object that originated a reference request in accordance with said fourth additional reference weight received by said sixth receiving means and moreover, updating the reference destination of said object in accordance with said specific information;

seventh transmitting means for transmitting, to a module having said reference destination object, a fifth additional reference weight having a value that corresponds to said fourth additional reference weight received by said sixth receiving means together with a reference deletion request for deleting a reference from said relay object;

seventh receiving means for receiving a fifth additional reference weight and a reference deletion request transmitted from a seventh transmitting means of another module; and

second total reference weight updating means for updating total reference weight of said reference destination object in accordance with said fifth additional reference weight received by said seventh receiving means.

24. A memory management device according to claim 18, further comprising:

fifth transmitting means for, when a relay object created by said first relay object creating means has received a reference request from another object, adding a third additional reference weight having a prescribed value and transferring said reference request to a module having a first reference destination object;

fifth receiving means for receiving third additional reference weight and a reference request transferred from a fifth transmitting means of another module;

first total reference weight updating means for updating total reference weight belonging to a reference destination object created by said first reference destination object creating means in accordance with said third additional reference weight received by said fifth receiving means;

sixth transmitting means for transmitting a fourth additional reference weight having a value that corresponds to said third additional reference weight and specific information for specifying a module in which said reference destination object resides together with a response corresponding to a reference request received by said fifth receiving means;

sixth receiving means for receiving a response, a fourth additional reference weight, and specific information transmitted from a sixth transmitting means of another module;

reference destination updating means for updating partial reference weight of an object that originated a reference request in accordance with said fourth additional reference weight received by said sixth receiving means and moreover, updates the reference destination of said object in accordance with said specific information;

seventh transmitting means for transmitting, to a module having said reference destination object, a fifth additional reference weight having a value that corresponds to said fourth additional reference weight received by said sixth receiving means together with a reference deletion request for deleting a reference from said relay object;

seventh receiving means for receiving a fifth additional reference weight and a reference deletion request transmitted from a seventh transmitting means of another module; and

second total reference weight updating means for updating total reference weight of said reference destination object in accordance with said fifth additional reference weight received by said seventh receiving means.

25. A memory management device according to claim 17, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

26. A memory management device according to claim 18, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

27. A memory management device according to claim 19, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

28. A memory management device according to claim 20, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

29. A memory management device according to claim 21, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

30. A memory management device according to claim 22, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

31. A memory management device according to claim 23, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

32. A memory management device according to claim 24, further comprising:

relay discriminating means for discriminating whether or not said relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of said relay object when said relay discriminating means determines that said relay object is not referenced from another object.

33. A memory management device that is joined with other memory management devices by way of a network and that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight, comprising:

first transmitting means for transmitting to another computer by way of said network information relating to a module containing information relating to an object that resides within said memory management device;

first receiving means for receiving information relating to a module transmitted from a first transmitting means of another memory management device;

first module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received by said first receiving means;

second transmitting means for transmitting to a first receiving means said first additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received by said first receiving means;

second receiving means for receiving a first additional reference weight for setting partial reference weight and a response to information relating to a module transmitted from a second transmitting means of another memory management device; and

first relay module creating means for creating a relay module by setting said first additional reference weight received by said second receiving means as partial reference weight and converting an object within said module to a relay object for transferring a reference request from another object to a transmission destination of information relating to said module.

34. A memory management device according to claim 33, wherein a relay object converted by said first relay module creating means is not an object carrying actual content.

35. A memory management device according to claim 33, further comprising:

third transmitting means for transmitting, to yet another computer by way of said network, information relating to a module including information relating to said reference destination object that was created by said first module creating means;

third receiving means for receiving information relating to said module transmitted from a third transmitting means belonging to another computer;

second module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received by said third receiving means;

fourth transmitting means for transmitting, to a module that transmitted information relating to said module, a second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received by said third receiving means;

fourth receiving means for receiving said second additional reference weight and said response transmitted by a fourth transmitting means belonging to another computer; and

second relay module creating means for creating a relay module by setting said second additional reference weight received by said fourth receiving means as partial reference weight and converting said reference destination object contained within a module created by said first module creating means to a relay object for transferring a reference request from another object to a reference destination object contained within a module created by said second module creating means.

36. A memory management device according to claim 34, further comprising:

third transmitting means for transmitting, to yet another computer by way of said network, information relating to a module including information relating to said reference destination object that was created by said first module creating means;

third receiving means for receiving information relating to said module transmitted from a third transmitting means belonging to another computer;

second module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received by said third receiving means;

fourth transmitting means for transmitting, to a module that transmitted information relating to said module, a second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received by said third receiving means;

fourth receiving means for receiving said second additional reference weight and said response transmitted by a fourth transmitting means belonging to another computer; and

second relay module creating means for creating a relay module by setting said second additional reference weight received by said fourth receiving means as partial reference weight and converting said reference destination object contained within a module created by said first module creating means to a relay object for transferring a reference request from another object to a reference destination object contained within a module created by said second module creating means.

37. A memory management device according to claim 35 wherein a relay object converted by said second relay module creating means is not an object carrying actual content.

38. A memory management device according to claim 36, wherein a relay object converted by said second relay module creating means is not an object carrying actual content.

39. A memory management device according to claim 34, further comprising:

relay discriminating means for discriminating whether or not all relay objects within a relay module are referenced from other objects; and

memory region reclaiming means for reclaiming memory regions of said relay module when said relay discriminating means determines that none of said relay objects are referenced from other objects.

40. A memory management device according to claim 35, further comprising:

relay discriminating means for discriminating whether or not all relay objects within a relay module are referenced from other objects; and

memory region reclaiming means for reclaiming memory regions of said relay module when said relay discriminating means determines that none of said relay objects are referenced from other objects.

41. A memory management device according to claim 36, further comprising:

relay discriminating means for discriminating whether or not all relay objects within a relay module are referenced from other objects; and

memory region reclaiming means for reclaiming memory regions of said relay module when said relay discriminating means determines that none of said relay objects are referenced from other objects.

42. A memory management device according to claim 37, further comprising:

relay discriminating means for discriminating whether or not all relay objects within a relay module are referenced from other objects; and

memory region reclaiming means for reclaiming memory regions of said relay module when said relay discriminating means determines that none of said relay objects are referenced from other objects.

43. A memory management device according to claim 38, further comprising:

relay discriminating means for discriminating whether or not all relay objects within a relay module are referenced from other objects; and

memory region reclaiming means for reclaiming memory regions of said relay module when said relay discriminating means determines that none of said relay objects are referenced from other objects.

44. A memory management method for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight, comprising:

a partial reference weight discrimination step for discriminating whether or not partial reference weight belonging to said reference origin object is within a prescribed range when said reference origin object references said reference destination object;

a first transmission step for transmitting, to a module in which said reference destination object resides, a first additional reference weight having a prescribed value together with a reference request to said reference destination object when it is determined in said partial reference weight discrimination step that partial reference weight belonging to said reference origin object is not within a prescribed range;

a first reception step for receiving said first additional reference weight and said reference request transmitted in said first transmission step;

a first total reference weight update step for updating total reference weight belonging to said reference destination object in accordance with said first additional reference weight received in said first reception step;

a second transmission step for transmitting, to a module in which said reference origin object resides, a second additional reference weight having a value that corresponds to said first additional reference weight together with a response to said reference request received in said first reception step;

a second reception step for receiving said second additional reference weight and said response transmitted in said second transmission step; and

a partial reference weight update step for updating partial reference weight belonging to said reference origin object in accordance with said second additional reference weight received in said second reception step.

45. A memory management method according to claim 44, further comprising:

a garbage object discrimination step for discriminating whether or not said reference origin object has become unnecessary;

a third transmission step for transmitting, to a module in which said reference destination object resides, a third additional reference weight that corresponds to a partial reference weight belonging to said reference origin object together with a reference deletion request for deleting a reference from said reference origin object when it is determined in said garbage object discrimination step that said reference origin object has become unnecessary;

a third reception step for receiving said third additional reference weight and said reference deletion request transmitted in said third transmission step;

a second total reference weight update step for updating total reference weight belonging to said reference destination object in accordance with said third additional reference weight received in said third reception step; and

a memory region reclamation step for reclaiming memory regions of said reference origin object when it is determined in said garbage object discrimination step that said reference origin object has become unnecessary.

46. A memory management method for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight, comprising:

a first transmission step for transmitting to another module information relating to an object residing within that same module;

a first reception step for receiving information relating to an object transmitted in said first transmission step;

a first reference destination object creation step for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said object received in said first reception step;

a second transmission step for transmitting, to a module that transmitted information relating to said object, first additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said object received in said first reception step;

a second reception step for receiving said first additional reference weight for setting partial reference weight and a response to information relating to said object transmitted in said second transmission step; and

a first relay object creation step for setting said first additional reference weight received in said second reception step as partial reference weight, and converting said object to a relay object for transferring a reference request from another object to a reference destination object created in said first reference destination object creation step.

47. A memory management method according to claim 46, further comprising:

a third transmission step for transmitting to another module information relating to said reference destination object created in said first reference destination object creation step;

a third reception step for receiving information relating to said reference destination object that was transmitted in said third transmission step;

a second reference destination object creation step for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said reference destination object received in said third reception step;

a fourth transmission step for transmitting, to a module that transmitted information relating to said object, second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said reference destination object that was received in said third reception step;

a fourth reception step for receiving said second additional reference weight and said response transmitted in said fourth transmission step; and

a second relay object creation step for setting said second additional reference weight received in said fourth reception step as partial reference weight and converting said reference destination object to a relay object for transferring a reference request from another object to a reference destination object created in said second reference destination object creation step.

48. A memory management method according to claim 46, further comprising:

a fifth transmission step for, when a relay object created in said first relay object creation step has received a reference request from another object, adding a third additional reference weight having a prescribed value and transferring said reference request to said first reference destination object;

a fifth reception step for receiving said third additional reference weight and said reference request transmitted in said fifth transmission step;

a first total reference weight update step for updating total reference weight belonging to a reference destination object created in said first reference destination object creation step in accordance with said third additional reference weight received in said fifth reception step;

a sixth transmission step for transmitting a fourth additional reference weight having a value that corresponds to said third additional reference weight and specific information for specifying a module in which said reference destination object resides together with a response to a reference request received in said fifth reception step;

a sixth reception step for receiving said specific information and said fourth additional reference weight and said response transmitted in said sixth transmission step;

a reference destination update step for updating partial reference weight of an object that originated a reference request in accordance with said fourth additional reference weight received in said sixth reception step, and further, updating the reference destination of that object in accordance with said specific information;

a seventh transmission step for transmitting, to a module that has said reference destination object, a fifth additional reference weight having a value that corresponds to said fourth additional reference weight received in said sixth reception step together with a reference deletion request for deleting a reference from said relay object;

a seventh reception step for receiving a fifth additional reference weight and a reference deletion request transmitted in said seventh transmission step; and

a second total reference weight update step for updating total reference weight of said reference destination object in accordance with said fifth additional reference weight received in said seventh reception step.

49. A memory management method according to claim 47, further comprising:

a fifth transmission step for, when a relay object created in said first relay object creation step has received a reference request from another object, adding a third additional reference weight having a prescribed value and transferring said reference request to said first reference destination object;

a fifth reception step for receiving said third additional reference weight and said reference request transmitted in said fifth transmission step;

a first total reference weight update step for updating total reference weight belonging to a reference destination object created in said first reference destination object creation step in accordance with said third additional reference weight received in said fifth reception step;

a sixth transmission step for transmitting a fourth additional reference weight having a value that corresponds to said third additional reference weight and specific information for specifying a module in which said reference destination object resides together with a response to a reference request received in said fifth reception step;

a sixth reception step for receiving said specific information and said fourth additional reference weight and said response transmitted in said sixth transmission step;

a reference destination update step for updating partial reference weight of an object that originated a reference request in accordance with said fourth additional reference weight received in said sixth reception step, and further, updating the reference destination of that object in accordance with said specific information;

a seventh transmission step for transmitting, to a module that has said reference destination object, a fifth additional reference weight having a value that corresponds to said fourth additional reference weight received in said sixth reception step together with a reference deletion request for deleting a reference from said relay object;

a seventh reception step for receiving a fifth additional reference weight and a reference deletion request transmitted in said seventh transmission step; and

a second total reference weight update step for updating total reference weight of said reference destination object in accordance with said fifth additional reference weight received in said seventh reception step.

50. A memory management method according to claim 46, further comprising:

a relay discrimination step for discriminating whether or not said rela object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

51. A memory management method according to claim 47, further comprising:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

52. A memory management method according to claim 48, further comprising:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

53. A memory management method according to claim 49, further comprising:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

54. A memory management method for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight, comprising:

a first transmission step for transmitting information relating to a module including information relating to an object to another computer other than the computer in which said module resides;

a first reception step for receiving information relating to a module transmitted in said first transmission step;

a first module creation step for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received in said first reception step;

a second transmission step for transmitting to a first receiving means said first additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received in said first reception step;

a second reception step for receiving a first additional reference weight for setting partial reference weight and a response to information relating to a module transmitted in said second transmission step; and

a first relay module creation step for creating a relay module by setting said first additional reference weight received in said second reception step as partial reference weight and converting an object within that module to a relay object for transferring a reference request from another object to a transmission destination of information relating to said module.

55. A memory management method according to claim 54, further comprising:

a third transmission step for transmitting, to yet another computer by way of said network, information relating to a module created in said first module creation step containing information relating to said reference destination object;

a third reception step for receiving information relating to said module transmitted in a third transmission step of another computer;

a second module creation step for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received in said third reception step;

a fourth transmission step for transmitting, to a module that transmitted information relating to said module, a second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received in said third reception step;

a fourth reception step for receiving said second additional reference weight and said response transmitted in a fourth transmission step of another computer; and

a second relay module creation step for creating a relay module by setting said second additional reference weight received in said fourth reception step as partial reference weight and converting said reference destination object contained within a module created in said first module creation step to a relay object for transferring a reference request from another object to a reference destination object contained within a module created in said second module creation step.

56. A recording medium that can be read by a computer and that stores a program for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight; and that stores a program for realizing:

a partial reference weight discrimination step for discriminating whether or not a partial reference weight belonging to said reference origin object is within a prescribed range when said reference origin object references said reference destination object;

a first transmission step for transmitting, to a module in which said reference destination object resides, a first additional reference weight having a prescribed value together with a reference request to said reference destination object when it is determined in said partial reference weight discrimination step that said partial reference weight belonging to said reference origin object is not within said prescribed range;

a first reception step for receiving said first additional reference weight and said reference request transmitted in said first transmission step;

a first total reference weight update step for updating total reference weight belonging to said reference destination object i n accordance with said first additional reference weight received in said first reception step;

a second transmission step for transmitting, to a module in which said reference origin object resides, a second additional reference weight having a value that corresponds to said first additional reference weight together with a response to said reference request received in said first reception step;

a second reception step for receiving said second additional reference weight and said response transmitted in said second transmission step; and

a partial reference weight update step for updating partial reference weight belonging to said reference origin object in accordance with said second additional reference weight received in said second reception step.

57. A recording medium that can be read by a computer according to claim 56, that further stores a program for realizing:

a garbage object discrimination step for discriminating whether or not said reference origin object has become unnecessary;

a third transmission step for transmitting, to a module in which said reference destination object resides, a third additional reference weight that corresponds to a partial reference weight belonging to said reference origin object together with a reference deletion request for deleting references from said reference origin object when it is determined in said garbage object discrimination step that said reference origin object has become unnecessary;

a third reception step for receiving said third additional reference weight and said reference deletion request transmitted in said third transmission step;

a second total reference weight update step for updating total reference weight belonging to said reference destination object in accordance with said third additional reference weight received in said third reception step; and

a memory region reclamation step for reclaiming memory regions of said reference origin object when it is determined in said garbage object discrimination step that said reference origin object has become unnecessary.

58. A recording medium that can be read by a computer and that stores a program for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight; and stores a program for realizing:

a first transmission step for transmitting to another module information relating to an object residing within that same module;

a first reception step for receiving information relating to an object transmitted in said first reception step;

a first reference destination object creation step for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said object received in said first reception step;

a second transmission step for transmitting, to a module that transmitted information relating to said object, a first additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said object received in said first reception step;

a second reception step for receiving said first additional reference weight for setting partial reference weight and a response to information relating to said object transmitted in said second transmission step; and

a first relay object creation step for setting said first additional reference weight received in said second reception step as partial reference weight and converting said reference destination object to a relay object for transferring a reference request from another object to a reference destination object created in said first reference destination object creation step.

59. A recording medium that can be read by a computer according to claim 58, that further stores a program for realizing:

a third transmission step for transmitting to another module information relating to said reference destination object created in said first reference destination object creation step;

a third reception step for receiving information relating to said reference destination object that was transmitted in said third transmission step;

a second reference destination object creation step for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to said reference destination object received in said third reception step;

a fourth transmission step for transmitting, to a module that transmitted information relating to said object, second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said reference destination object that was received in said third reception step;

a fourth reception step for receiving said second additional reference weight and said response transmitted in said fourth transmission step; and

a second relay object creation step for setting said second additional reference weight received in said fourth reception step as partial reference weight and converting said reference destination object to a relay object for transferring a reference request from another object to a reference destination object created in said second reference destination object creation step.

60. A recording medium that can be read by a computer according to claim 58, that further stores a program for realizing:

a fifth transmission step for, when a relay object created in said first relay object creation step receives a reference request from another object, adding a third additional reference weight having a prescribed value and transferring said reference request to said first reference destination object;

a fifth reception step for receiving said third additional reference weight and said reference request transmitted in said fifth transmission step;

a first total reference weight update step for updating total reference weight belonging to a reference destination object created in said first reference destination object creation step in accordance with said third additional reference weight received in said fifth reception step;

a sixth transmission step for transmitting a fourth additional reference weight having a value that corresponds to said third additional reference weight and specific information for specifying a module in which said reference destination object resides together with a response to a reference request received in said fifth reception step;

a sixth reception step for receiving said fourth additional reference weight, said specific information, and said response transmitted in said sixth transmission step;

a reference destination update step for updating partial reference weight of an object originating a reference request in accordance with said fourth additional reference weight received in said sixth reception step, and moreover, updating the reference destination of that object in accordance with said specific information;

a seventh transmission step for transmitting, to a module that has said reference destination object, a fifth additional reference weight having a value that corresponds to said fourth additional reference weight received in said sixth reception step together with a reference deletion request for deleting a reference from said relay object;

a seventh reception step for receiving a fifth additional reference weight and a reference deletion request transmitted in said seventh transmission step; and

a second total reference weight update step for updating total reference weight of said reference destination object in accordance with said fifth additional reference weight received in said seventh reception step.

61. A recording medium that can be read by a computer according to claim 59, that further stores a program for realizing:

a fifth transmission step for, when a relay object created in said first relay object creation step receives a reference request from another object, adding a third additional reference weight having a prescribed value and transferring said reference request to said first reference destination object;

a fifth reception step for receiving said third additional reference weight and said reference request transmitted in said fifth transmission step;

a first total reference weight update step for updating total reference weight belonging to a reference destination object created in said first reference destination object creation step in accordance with said third additional reference weight received in said fifth reception step;

a sixth transmission step for transmitting a fourth additional reference weight having a value that corresponds to said third additional reference weight and specific information for specifying a module in which said reference destination object resides together with a response to a reference request received in said fifth reception step;

a sixth reception step for receiving said fourth additional reference weight, said specific information, and said response transmitted in said sixth transmission step;

a reference destination update step for updating partial reference weight of an object originating a reference request in accordance with said fourth additional reference weight received in said sixth reception step, and moreover, updating the reference destination of that object in accordance with said specific information;

a seventh transmission step for transmitting, to a module that has said reference destination object, a fifth additional reference weight having a value that corresponds to said fourth additional reference weight received in said sixth reception step together with a reference deletion request for deleting a reference from said relay object;

a seventh reception step for receiving a fifth additional reference weight and a reference deletion request transmitted in said seventh transmission step; and

a second total reference weight update step for updating total reference weight of said reference destination object in accordance with said fifth additional reference weight received in said seventh reception step.

62. A recording medium that can be read by a computer according to claim 58, that further stores a program for realizing:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

63. A recording medium that can be read by a computer according to claim 59, that further stores a program for realizing:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

64. A recording medium that can be read by a computer according to claim 60, that further stores a program for realizing:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

65. A recording medium that can be read by a computer according to claim 61, that further stores a program for realizing:

a relay discrimination step for discriminating whether or not said relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of said relay object when it is determined in said relay discrimination step that said relay object is not referenced from another object.

66. A recording medium that can be read by a computer and that stores a program for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from said reference origin object by means of partial reference weight and total reference weight; and stores a program for realizing:

a first transmission step for transmitting information relating to a module including information relating to an object to another computer other than said computer in which said module resides;

a first reception step for receiving information relating to a module transmitted in said first transmission step;

a first module creation step for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received in said first reception step;

a second transmission step for transmitting to a first receiving means said first additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received in said first reception step;

a second reception step for receiving a first additional reference weight for setting partial reference weight and a response to information relating to a module transmitted in said second transmission step; and

a first relay module creation step for creating a relay module by setting said first additional reference weight received in said second reception step as partial reference weight and converting an object within that module to a relay object for transferring a reference request from another object to a transmission destination of information relating to said module.

67. A recording medium that can be read by a computer according to claim 66 that further stores a program for realizing:

a third transmission step for transmitting, to yet another computer by way of said network, information relating to a module created in said first module creation step containing information relating to said reference destination object;

a third reception step for receiving information relating to said module transmitted in a third transmission step of another computer;

a second module creation step for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to said module received in said third reception step;

a fourth transmission step for transmitting, to a module that transmitted information relating to said module, a second additional reference weight having a value that corresponds to said total reference weight together with a response to information relating to said module received in said third reception step;

a fourth reception step for receiving said second additional reference weight and said response transmitted in a fourth transmission step of another computer; and

a second relay module creation step for creating a relay module by setting said second additional reference weight received in said fourth reception step as partial reference weight and converting said reference destination object contained within a module created in said first module creation step to a relay object for transferring a reference request from another object to a reference destination object contained within a module created in said second module creation step.


Description

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a distributed system, a memory management device and method, and to a storage medium, and in particular to memory management for distributed computing.

2. Description of the Related Art

An automatic memory management device and memory management method for distributed computing is considered with the purpose of realizing automatic memory management and garbage collection, not in one single memory space, but in a plurality of memory spaces in a distributed system.

In a paper by D. I. Bevan, "Distributed Garbage Collection Using Reference Counting" (Springer Verlag, LN CS 259, June 1987, pages 176-187), an automatic memory management device that uses a weighted reference counting method manages memory by adding a "reference weight," a numerical value, to objects that reference, i.e., that remote-reference, objects in a different memory space.

In a case in which an object is created that has a remote reference to another object, an initial value of a numerical value (exponentiation of 2) particular to an object and referred to as "total reference weight" is set to the referenced object that is remotely referenced; and a numerical value particular to remote referencing to a referenced object, which is referred to as "partial reference weight," is set to the referencing object that remote-references. Remote reference is thus "created."

In FIG. 1, for example, if the initial value for total reference weight is "64," referenced object 11 holds a total reference weight of "64" and reference object 10 that remote-references referenced object 11 has a partial reference weight of "64" with respect to referenced object 11.

In a case in which a reference object that remotely references an object gives information of the referenced object to a third object by means of a communication message, the reference object subtracts half of its own partial reference weight and updates its new partial reference weight as half. The reference object includes the other half of the reference weight in the communication message to the third object.

The third object accepts the reference weight contained in this communication message and stores the received reference weight as its own partial reference weight. In this way, a reference object can make a reference to a referenced object, and remote reference can be "distributed" from a reference object to a third object.

A difference exists between the "distribution" of remote reference and the "creation" of remote reference in that a third object that receives "distribution" of reference resides in a different memory space than the memory space of the reference object that distributes weight and the memory space of the referenced object. In "distribution" of remote reference, moreover, the total reference weight is constant, and the total reference weight is therefore always equal to the sum of the partial reference weights belonging to reference objects and the sum of reference weight pertaining to objects contained in all communication messages that flow in a distributed system.

For example, in a case in which reference object 10 from the state in FIG. 1 transfers the information of referenced object 11 to object 12, reference object 10 decreases its own partial reference weight "64" by half to "32" as shown in FIG. 2. Reference object 10 includes its decreased weight "32" in a communication message and sends this to object 12. Upon accepting this communication message, object 12 makes its own partial reference weight "32" and becomes a reference object as shown in FIG. 3.

When a reference object is no longer necessary in the memory space in which it resides, it transmits to a referenced object a reference deletion message containing information of it own partial reference weight. This "deletion" of remote referencing enables reclamation of unneeded memory region and reuse.

In FIG. 4, for example, when it is determined that reference object 10 having a partial reference weight of "32" is no longer necessary, a reference deletion message containing the reference weight "32" is transmitted to referenced object 11, which is the reference destination. Upon receiving this reference deletion message, referenced object 11 updates by subtracting the received reference weight "32" from the total reference weight, as shown in FIG. 5. When the total reference weight of a referenced object becomes "0," it can be determined that there are no longer any objects referencing the object from other memory spaces. If there is no referencing from the memory region in which the referenced object itself resides, the regions of that referenced object can be reclaimed.

A reference object having a partial reference weight that has become "1" cannot "distribute" remote referencing. In such a case, the reference object creates a new indirect object that indirectly remote-references and causes the created indirect object to indirectly remote-reference.

In FIG. 6, for example, when reference object 20 having a partial reference weight that has become "1" "distributes" remote referencing to object 22, reference object 20 creates indirect object 23 as shown in FIG. 7. Indirect object 23 takes over the partial reference weight of "1" of reference object 20. Indirect object 23 maintains the reference to referenced object 21 and stores a total reference weight of "64." Reference object 20 updates remote referencing from referenced object 21 to indirect object 23, and makes the partial reference weight "64."

Reference object 20 distributes the reference weight by sending a message containing weight "32" to object 22. After accepting this reference weight, object 22 can remote-reference indirect object 23 with a partial reference weight of "32" as shown in FIG. 8.

Nevertheless, the automatic memory management device of the above-described prior art (hereinafter referred to as "the prior art") has the following problems.

First, the prior art cannot realize memory management when the data region of, for example, an object, is migrated between computers.

In recent years, a method referred to as "agent" is being studied in which the execution of an object is resumed or the execution environment of an object is migrated from a particular execution environment to a different execution environment in a network.

In an agent method, the data region itself of an object, or the memory region itself that is occupied by the agent, changes its execution environment, i.e., the region migrates.

In a distributed system in which an agent or an object region accompanying this agent migrates in this way, automatic memory management is necessary to enable an object that referenced an object before migration to continue to reference the object after migration, despite the migration of the referenced object.

In the prior art, however, it was assumed that data regions of, for example, objects, are stationary in the memory space in which they were created. The prior art therefore did not consider even the existence of migrating objects, and memory management of such objects was therefore impossible.

A second problem in the prior art is the increase in the amount of communication in the network.

In a distributed system made up of a wide range of networks such as the Internet, objects increasingly reference data regions of different computers from remote computers. This trend is further increased by the agent migration and object migration described in regard to the first problem.

In addition, due to agent migration and object migration, the situation frequently occurs that the actual data do not reside at the reference destination of maintained data, but can only be referenced after tracing yet another reference destination.

To reference data regions on a computer at a remote site, a reference request communication message must be sent to the computer of the reference destination to have the requested data sent back. A multi-step exchange of communication therefore takes place for an object to reference the actual data.

Reference destinations should be updated to direct reference destinations whenever possible to prevent multi-step communication. However, it has been difficult to reduce the amount of communication necessary for updating reference destinations.

A third problem in the prior art is the depletion of the reference weight used for managing objects (i.e., the reference weight value is used up and can no long be distributed to other objects).

This depletion occurs because, as reference to the same objects increases in the prior art, reference weight can only decrease as long as references are not deleted and returned for reclamation.

A fourth problem in the prior art is the lack of sufficient memory at each individual computer.

In the prior art, indirect objects are created when reference weight is depleted. A large number of indirect objects are created in memory when weight is frequently used up, and this leads to insufficient memory.

A fifth problem in the prior art is the hindrance of high-speed execution of application programs or even the halting of application programs.

This problem occurs because, as with the fourth problem, indirect objects are created when the reference weight is used up, and the creation of many indirect objects leads to the increase in transmission of messages between reference objects and indirect objects.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a memory management device and method that operate without conflicts, as in a distributed system that does not allow migration, even in a distributed system that allows migration of the execution environment of the data regions of objects.

It is another object of the present invention to provide a memory management device and method that can reduce the amount of communication needed for memory management in a network.

It is another object of the present invention to provide a memory management device and method that can reduce the possibility of depletion of reference weight used for managing objects.

It is another object of the present invention to provide a memory management device and method that can reduce cases of insufficient memory in individual computers.

It is another object of the present invention to provide a distributed system in which a plurality of computers capable of implementing memory management as described above are joined by a network.

It is another object of the present invention to provide a storage medium that is readable by a computer and that stores a program for implementing memory management as described above.

To realize the above-described objects, the distributed system according to the first viewpoint of the present invention:

is a distributed system that is provided with a plurality of modules and that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight;

wherein the module in which the reference origin object resides is provided with:

partial reference weight discriminating means for discriminating whether or not the partial reference weight of the reference origin object is within a prescribed range;

first transmitting means for transmitting to a module in which the reference destination object resides a first additional reference weight having a prescribed value together with a reference request to the reference destination object when the partial reference weight discriminating means determines that said partial reference weight is not within a prescribed range;

first receiving means for receiving second additional reference weight transmitted from the module in which the reference destination object resides together with a response to the reference request; and

partial reference weight updating means for updating partial reference weight of the reference origin object in accordance with the second additional reference weight received by the first receiving means;

and wherein the module in which the reference destination object resides is provided with:

second receiving means for receiving the reference request and the first additional reference weight transmitted from the first transmitting means;

first total reference weight updating means for updating the total reference weight of the reference destination object in accordance with the first additional reference weight received by the second receiving means; and

second transmitting means for transmitting to the first receiving means the second additional reference weight having a value corresponding to the first additional reference weight together with the response to the reference request received by the second receiving means.

In the above-described distributed system, the module that includes the reference origin object may be further provided with:

garbage object discriminating means for discriminating whether or not the reference origin object has become unnecessary;

third transmitting means for transmitting to the module in which the reference destination object resides a third additional reference weight that corresponds to the partial reference weight of the reference origin object together with a reference deletion request for deleting reference from the reference origin object when the garbage object discriminating means determines that the reference origin object has become unnecessary; and

first memory region reclaiming means for reclaiming memory region of the reference origin object when the garbage object discriminating means determines that the reference origin object has become unnecessary;

and a module that includes the reference destination object may be further provided with:

third receiving means for receiving the reference deletion request and the third additional reference weight transmitted from the third transmitting means; and

second total reference weight updating means for updating total reference weight held by the reference destination object in accordance with the third additional reference weight received by the third receiving means.

To achieve the above-described objects, the distributed system according to a second viewpoint of the present invention:

is a distributed system that is equipped with a plurality of modules and that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight;

wherein at least one module of the plurality of modules is provided with:

first transmitting means for transmitting information relating to an object residing in that module to another module;

first receiving means for receiving a first additional reference weight for setting partial reference weight and a response to information relating to the object transmitted from another module; and a first relay object creating means for setting the first additional reference weight received by the first receiving means as the partial reference weight, and converting the object to a relay object for transferring a reference request from another object to the transmission destination of information relating to the object;

and wherein at least one other module of the plurality of modules is provided with:

second receiving means for receiving information relating to an object transmitted from a first transmitting means of another module;

reference destination object creating means for setting a prescribed value as the total reference weight and creating a reference destination object based on information relating to the object received by the second receiving means; and

second transmitting means for transmitting to the first receiving means the first additional reference weight having a value corresponding to the total reference weight together with a response to information relating to the object received by the second receiving means.

To achieve the above-described objects, the distributed system according to a third viewpoint of the present invention:

is a distributed system that is made up of a plurality of computers joined by way of a network, that is equipped with a plurality of modules, and that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight;

wherein at least one computer of the plurality of computers is provided with:

first transmitting means for transmitting, to another computer by way of the network, information relating to that module including information relating to an object residing inside the computer;

first receiving means for receiving a response to information relating to the module that was transmitted from a module created in another computer, and first additional reference weight for setting partial reference weight; and

first relay module creating means for setting the first additional reference weight received by the first receiving means as the partial reference weight, and converting an object within the module to a relay object for transferring a reference request from another object to a transmission destination of information relating to the module;

and wherein at least one other computer of the plurality of computers is provided with:

second receiving means for receiving information relating to a module transmitted from the first transmitting means of another computer;

module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to the module received by the second receiving means; and

second transmitting means for transmitting to the first receiving means the first additional reference weight having a value corresponding to the total reference weight together with the response to information relating to the module received by the second receiving means.

To achieve the above-described objects, the memory management device according to a fourth viewpoint of the present invention:

is a memory management device that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and is provided with:

partial reference weight discriminating means for discriminating whether or not partial reference weight belonging to the reference origin object is within a prescribed range when the reference origin object references the reference destination object;

first transmitting means for transmitting to another module in which the reference destination object resides a first additional reference weight having a prescribed value together with a reference request to the reference destination object when the partial reference weight discriminating means determines that the partial reference weight is not within a prescribed range;

first receiving means for receiving first additional reference weight and a reference request transmitted from a first transmitting means belonging to another module;

first total reference weight updating means for updating total reference weight belonging to the reference destination object in accordance with the first additional reference weight received by the first receiving means;

second transmitting means for transmitting, to another module that transmitted the reference request, a second additional reference weight having a value corresponding to the first additional reference weight received by the first receiving means, together with the response to the reference request received by the first receiving means;

second receiving means for receiving a second. additional reference weight and a response transmitted by a second transmitting means of another module; and

partial reference weight updating means for updating partial reference weight belonging to the reference origin object in accordance with the second additional reference weight received by the second receiving means.

The partial reference weight discriminating means of the above-described memory management device may be further provided with a first discriminating means for discriminating whether or not the partial reference weight is smaller than a prescribed minimum.

In this case, the first transmitting means can transmit a first additional reference weight having a positive value together with the reference request when the first discriminating means determines that the partial reference weight is smaller than the prescribed minimum; and

the first total reference weight updating means can update total reference weight belonging to the reference destination object by adding the first additional reference weight having the positive value received by the first receiving means.

The partial reference weight discriminating means in the above-described memory management device may also be provided with a second discriminating means that discriminates whether or not the partial reference weight is greater than a prescribed maximum.

In this case, the first transmitting means can transmit a first additional reference weight having a negative value together with the reference request when the second discriminating means determines that the partial reference weight is greater than the prescribed maximum; and

the first total reference weight updating means can update total reference weight belonging to the reference destination object by adding the first additional reference weight having a negative value received by the first receiving means.

The above-described memory management device may be further provided with:

garbage object discriminating means for discriminating whether or not the reference origin object has become unnecessary;

third transmitting means for transmitting, to a module in which the reference destination object resides, a third additional reference weight that corresponds to the partial reference weight of the reference origin object together with a reference deletion request for deleting reference from the reference origin object when the garbage object discriminating means determines that the reference. origin object has become unnecessary;

third receiving means for receiving a reference deletion request and third additional reference weight transmitted from a third transmitting means of another module;

second total reference weight updating means for updating total reference weight belonging to the reference destination object in accordance with the third additional reference weight received by the third receiving means; and

first memory region reclaiming means for reclaiming the memory region of the reference origin object when the garbage object discriminating means determines that the reference origin object has become unnecessary.

In this case, the above-described memory management device may be further provided with:

reference state discriminating means for discriminating whether or not the reference destination object has not been referenced from a reference origin object residing in another module and, moreover, has not been referenced from other objects residing in the same module; and

second memory region reclaiming means for reclaiming the memory region of the reference destination object when the reference state discriminating means determines that the reference. destination object has not been referenced by either the reference origin object or other objects,

To achieve the above-described objects, the memory management device according to a fifth viewpoint of the present invention:

is a memory management device that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and is provided with:

first transmitting means for transmitting information relating to an object that resides in the same module to another module;

first receiving means for receiving information relating to an object that is transmitted from a first transmitting means of another module;

first reference destination object creating means for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to the object received by the first receiving means;

second transmitting means for transmitting a first additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the object received by the first receiving means to a module that transmitted information relating to the object;

second receiving means for receiving a first additional reference weight for setting the partial reference weight and a response to information relating to an object transmitted from a second transmitting means of another module; and

first relay object creating means for setting the first additional reference weight received by the second receiving means as a partial reference weight, and converting the object to a relay object for transferring a reference request from another object to a reference destination object created by the first reference destination object creating means.

In this case, a relay object converted by the first relay object creating means need not carry the actual content of the object.

The above-described memory management device may be further provided with:

third transmitting means for transmitting to another module information relating to the reference destination object created by the first reference destination object creating means;

third receiving means for receiving information relating to a reference destination object transmitted from a third transmitting means of another module;

second reference destination object creating means for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to the reference destination object received by the third receiving means;

fourth transmitting means for transmitting, to a module that transmitted information relating to the object, a second additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the reference destination object received by the third receiving means;

fourth receiving means for receiving a second additional reference weight for setting partial reference weight and a response to information relating to a reference destination object transmitted from a fourth transmitting means of another module; and

second relay object creating means for setting the second additional reference weight received by the fourth receiving means as partial reference weight, and converting the reference destination object to a relay object for transferring a reference request from another object to a reference destination object created by the second reference destination object creating means.

In this case, the relay object converted by the second relay object creating means need not carry the actual content of the object.

The above-described memory management device may be further provided with:

fifth transmitting means for, when a relay object created by the first relay object creating means has received a reference request from another object, adding to the reference request a third additional reference weight having a prescribed value and transferring the reference request to module having the first reference destination object;

fifth receiving means for receiving third additional reference weight and a reference request transferred from a fifth transmitting means of another module;

first total reference weight updating means for updating total reference weight belonging to a reference destination object created by the first reference destination object creating means in accordance with the third additional reference weight received by the fifth receiving means;

sixth transmitting means for transmitting a fourth additional reference weight having a value that corresponds to the third additional reference weight and specific information for specifying a module in which the reference destination object resides together with a response corresponding to a reference request received by the fifth receiving means;

sixth receiving means for receiving a response, a fourth additional reference weight, and specific information transmitted from a sixth transmitting means of another module;

reference destination updating means for updating partial reference weight of an object that originated a reference request in accordance with the fourth additional reference weight received by the sixth receiving means and moreover, updating the reference destination of the object in accordance with the specific information;

seventh transmitting means for transmitting, to a module having the reference destination object, a fifth additional reference weight having a value that corresponds to the fourth additional reference weight received by the sixth receiving means together with a reference deletion request for deleting a reference from the relay object;

seventh receiving means for receiving fifth additional reference weight and a reference deletion request transmitted from a seventh transmitting means of another module; and

second total reference weight updating means for updating the total reference weight of the reference destination object in accordance with the fifth additional reference weight received by the seventh receiving means.

In this case, the above-described memory management device may be further provided with:

relay discriminating means for discriminating whether or not the relay object is referenced from another object; and

memory region reclaiming means for reclaiming memory regions of the relay object when the relay discriminating means determines that the relay object is not referenced from another object.

To realize the above-described objects, the memory management device according to the sixth viewpoint of the present invention:

is a memory management device that is joined with other memory management devices by way of a network and that manages each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and is provided with:

first transmitting means for transmitting to another computer by way of the network information relating to a module containing information relating to an object that resides within the memory management device;

first receiving means for receiving information relating to a module transmitted from a first transmitting means of another memory management device;

first module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to the module received by the first receiving means;

second transmitting means for transmitting to the second receiving means the first additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the module received by the first receiving means;

second receiving means for receiving a first additional reference weight for setting partial reference weight and a response to information relating to a module transmitted from a second transmitting means of another memory management device; and

first relay module creating means for creating a relay module by setting the first additional reference weight received by the second receiving means as partial reference weight and converting an object within the module to a relay object for transferring a reference request from another object to a transmission destination of information relating to the module.

In this case, a relay object converted by the first relay module creating means need not carry the actual content of an object.

The above-described memory management device may be further provided with:

third transmitting means for transmitting, to yet another computer by way of the network, information relating to a module including information relating to the reference destination object that was created by the first module creating means;

third receiving means for receiving information relating to the module transmitted from a third transmitting means belonging to another computer;

second module creating means for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to the module received by the third receiving means;

fourth transmitting means for transmitting, to a module that transmitted information relating to the module, a second additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the module received by the third receiving means;

fourth receiving means for receiving the second additional reference weight and the response transmitted by a fourth transmitting means belonging to another computer; and

second relay module creating means for creating a relay module by setting the second additional reference weight received by the fourth receiving means as partial reference weight and converting the reference destination object contained within a module created by the first module creating means to a relay object for transferring a reference request from another object to a reference destination object contained within a module created by the second module creating means.

In this case, a relay object converted by the second relay module creating means need not carry the actual content of an object.

The above-described memory management device may be further provided with:

relay discriminating means for discriminating whether or not all relay objects within a relay module are referenced from other objects; and

memory region reclaiming means for reclaiming memory regions of the relay module when the relay discriminating means determines that none of the relay objects are being referenced from other objects.

To realize the above-described objects, the memory management method according to the seventh viewpoint of the present invention:

is a memory management method for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and is provided with:

a partial reference weight discrimination step for discriminating whether or not the partial reference weight belonging to the reference origin object is within a prescribed range when the reference origin object references the reference destination object;

a first transmission step for transmitting to the module in which the reference destination object resides a first additional reference weight having a prescribed value together with a reference request to the reference destination object when it is determined in the partial reference weight discrimination step that partial reference weight belonging to the reference origin object is not within a prescribed range;

a first reception step for receiving the first additional reference weight and the reference request transmitted in the first transmission step;

a first total reference weight update step for updating total reference weight belonging to the reference destination object in accordance with the first additional reference weight received in the first reception step;

a second transmission step for transmitting to a module in which the reference origin object resides a second additional reference weight having a value that corresponds to the first additional reference weight together with a response to the reference request received in the first reception step;

a second reception step for receiving the second additional reference weight and the response transmitted in the second transmission step; and

a partial reference weight update step for updating partial reference weight belonging to the reference origin object in accordance with the second additional reference weight received in the second reception step.

The above-described memory management method may further include:

a garbage object discrimination step for discriminating whether or not the reference origin object has become unnecessary;

a third transmission step for transmitting to a module in which the reference destination object resides a third additional reference weight that corresponds to a partial reference weight belonging to the reference origin object together with a reference deletion request for deleting a reference from the reference origin object when it is determined in the garbage object. discrimination step that the reference origin object has become unnecessary;

a third reception step for receiving the third additional reference weight and the reference deletion request transmitted in the third transmission step;

a second total reference weight update step for updating total reference weight belonging to the reference destination object in accordance with the third additional reference weight received in the third reception step; and

a memory region reclamation step for reclaiming memory regions of the reference origin object when it is determined in the garbage object discrimination step that the reference origin object has become unnecessary.

To realize the above-described objects, the memory management method according to the eighth viewpoint of the present invention:

is a memory management method for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and is provided with:

a first transmission step for transmitting to another module information relating to an object residing within that same module;

a first reception step for receiving information relating to an object transmitted in the first transmission step;

a first reference destination object creation step for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to the object received in the first reception step;

a second transmission step for transmitting to a module that transmitted information relating to the object first additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the object received in the first reception step;

a second reception step for receiving the first additional reference weight for setting partial reference weight and a response to information relating to the object transmitted in the second transmission step; and

a first relay object creation step for setting the first additional reference weight received in the second reception step as partial reference weight, and converting the object to a relay object for transferring the reference request from another object to a reference destination object created in said first reference destination object creation step.

The above-described memory management method may further include:

a third transmission step for transmitting to another module information relating to the reference destination object created in the first reference destination object creation step;

a third reception step for receiving information relating to the reference destination object that was transmitted in the third transmission step;

a second reference destination object creation step for setting a prescribed value as total reference weight and creating a reference destination object based on information relating to the reference destination object received in the third reception step;

a fourth transmission step for transmitting, to a module that transmitted information relating to the object, second additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the reference destination object that was received in the third reception step;

a fourth reception step for receiving the second additional reference weight and the response transmitted in the fourth transmission step; and

a second relay object creation step for setting the second additional reference weight received in the. fourth reception step as partial reference weight and converting the reference destination object to a relay object for transferring a reference request from another object to a reference destination object created in the second reference destination object creation step.

The above-described memory management method may further include:

a fifth transmission step for, when a relay object created in the first relay object creation step has received a reference request from another object, adding a third additional reference weight having a prescribed value and transferring the reference request to the first reference destination object;

a fifth reception step for receiving the third additional reference weight and the reference request transmitted in the fifth transmission step;

a first total reference weight update step for updating total reference weight belonging to a reference destination object created in the first reference destination object creation step in accordance with the third additional reference weight received in the fifth reception step;

a sixth transmission step for transmitting a fourth additional reference weight having a value that corresponds to the third additional reference weight and specific information for specifying a module in which the reference destination object resides together with a response to a reference request received in the fifth reception step;

a sixth reception step for receiving the specific information and the fourth additional reference weight and the response transmitted in the sixth transmission step;

a reference destination update step for updating partial reference weight of an object that originated a reference request in accordance with the fourth additional reference weight received in the sixth reception step, and further, updating the reference destination of that object in accordance with the specific information;

a seventh transmission step for transmitting, to a module that has the reference destination object, a fifth additional reference weight having a value that corresponds to the fourth additional reference weight received in the sixth reception step together with a reference deletion request for deleting a reference from said relay object;

a seventh reception step for receiving a fifth additional reference weight and a reference deletion request transmitted in the seventh transmission step; and

a second total reference weight update step for updating total reference weight of the reference destination object in accordance with the fifth additional reference weight received in the seventh reception step.

The above-described memory management method may further include:

a relay discrimination step for discriminating whether or not the relay object is referenced from another object; and

a memory region reclamation step for reclaiming memory regions of the relay object when it is determined in the relay discrimination step that said relay object is not referenced from another object.

To realize the above-described objects, the memory management method according to the ninth viewpoint of the present invention:

is a memory management method for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and is provided with:

a first transmission step for transmitting information relating to a module including information relating to an object to another computer other than the computer in which the module resides;

a first reception step for receiving information relating to a module transmitted in the first transmission step;

a first module creation step for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to the module received in the first reception step;

a second transmission step for transmitting to the first receiving means the first additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the module received in the first reception step;

a second reception step for receiving a first additional reference weight for setting partial reference weight and a response to information relating to a module transmitted in the second transmission step; and

a first relay module creation step for creating a relay module by setting the first additional reference weight received in the second reception step as partial reference weight and converting an object within that module to a relay object for transferring a reference request from another object to a transmission destination of information relating to the module.

The above-described memory management method may further include:

a third transmission step for transmitting, to yet another computer by way of the network, information relating to a module created in the first module creation step containing information relating to the reference destination object;

a third reception step for receiving information relating to the module transmitted in a third transmission step of another computer;

a second module creation step for creating a module having a reference destination object in which a prescribed value is set as total reference weight based on information relating to the module received in the third reception step;

a fourth transmission step for transmitting, to a module that transmitted information relating to the module, a second additional reference weight having a value that corresponds to the total reference weight together with a response to information relating to the module received in the third reception step;

a fourth reception step for receiving the second additional reference weight and the response transmitted in a fourth transmission step of another computer; and

a second relay module creation step for creating a relay module by setting the second additional reference weight received in the fourth reception step as partial reference weight and converting the reference destination object contained within a module created in the first module creation step to a relay object for transferring a reference request from another object to a reference destination object contained within a module created in the second module creation step.

To realize the above-described objects, the recording medium according to the tenth viewpoint of the present invention:

is a recording medium that can be read by a computer and that stores a program for managing each of a reference origin object that references an object residing in another module and a reference destination object that is referenced from the reference origin object by means of partial reference weight and total reference weight; and stores a program for realizing:

a partial reference weight discrimination step for discriminating whether or not a partial reference weight belonging to the reference origin object is within a prescribed range when the reference origin object references the reference destination object;

a first transmission step for transmitting, to a module in which the reference destination object resides, a first additional reference weight having a prescribed value together with a reference request to the reference destination object when it is determined in the partial reference weight discrimination step that the partial reference weight belonging to the reference origin object is not within the prescribed range;

a first reception step for receiving the first additional reference weight and the reference request transmitted in the first transmission step;

a first total reference weight update step for updating total reference weight belonging to the reference destination object in accordance with the first additional reference weight received in the first reception step;

a second transmission step for transmitting, to a module in which the reference origin object resides, a second additional reference weight having a value that corresponds to the first additional reference weight together with a response to the reference request received in the first reception step;

a second reception step for receiving the second additional reference weight and the response transmitted in the second transmission step; and

a partial reference weight update step for updating partial reference weight belonging to the reference origin object in accordance with the second additional reference weight received in the second reception step.

The above-described recording medium may further store a program for realizing:

a garbage object discrimination step for discriminating whether or not the reference origin object has become unnecessary;

a third transmission step for transmitting, to a module in which the reference d