Computing resource allocation
There is provided a method of computing resource allocation. The method comprises allocating a first bounded amount of computing resources forming a first set of computing resources; exclusively assigning the first set of computing resources to a first process of a computer program; receiving a request from the first process for additional computing resources; in response to the request from the first process, allocating a second bounded amount of computing resources forming a second set of computing resources; and spawning a second process from the first process and exclusively assigning the second set of computing resources to the second process; wherein this method may be repeated indefinitely by the first process, second process, or any other process created according to this method. By following this method, a process does not control the amount of computing resources allocated to that process (i.e., itself), but instead controls the amount of computing resources allocated to its child processes.
1. A method of computing resource allocation comprising:
allocating a first bounded amount of computing resources forming a first set of computing resources;
exclusively assigning the first set of computing resources to a first process of a computer program;
receiving a request from the first process for additional computing resources;
in response to the request from the first process, allocating a second bounded amount of computing resources forming a second set of computing resources;
spawning a second process from the first process and exclusively assigning the second set of computing resources to the second process;
receiving a request from the second process for additional computing resources;
in response to the request from the second process, allocating a third bounded amount of computing resources forming a third set of computing resources; and
spawning a third process from the second process and exclusively assigning the third set of computing resources to the third process.
2. The method of claim 1 , wherein:
the first and second set of computing resources are respectively provided by a first and a second node of a computing system.
3. The method of claim 1 , wherein the first and second bounded amounts of computing resources are different.
4. The method of claim 1 , wherein allocating the second bounded amount of computing resources comprises initiating provisioning of a node to provide the second set of computing resources.
5. The method of claim 1 , further comprising providing the first process with a reference to the second process.
6. The method of claim 1 , further comprising:
allocating a channel for communication between the first and second processes.
7. The method of claim 6 , wherein:
the channel is an inter-process communication, IPC, channel; or
the channel is a network channel.
8. The method of claim 1 , wherein the computing resources comprise memory resources, processing resources, communication resources, and/or storage resources.
9. The method of claim 1 , wherein the first process terminates earlier than the second process.
10. The method of claim 1 , further comprising:
receiving a second request from the first process for additional computing resources;
in response to the second request from the first process, allocating a fourth bounded amount of computing resources forming a fourth set of computing resources;
spawning a fourth process from the first process and exclusively assigning the fourth set of computing resources to the fourth process; and
allocating a channel for communication between the second and fourth processes.
11. A method of obtaining computing resources comprising:
determining, by a first process of a computer program, a first amount of computing resources to request;
responsive to the determining by the first process, requesting to spawn a second process from the first process, the request comprising the determined first amount of computing resources to be assigned to the second process;
determining, by the second process, a second amount of computing resources to request; and
responsive to the determining by the second process, requesting to spawn a third process from the second process, the request comprising the determined second amount of computing resources to be assigned to the third process.
12. The method of claim 11 , further comprising:
receiving, by the first process, a reference to the second process.
13. The method of claim 12 , further comprising:
communicating with the second process, by the first process, via a channel from the first to the second process created using the reference to the second process.
14. The method of claim 11 , further comprising:
determining, by the first process, a third amount of computing resources to request;
responsive to the determining, of the third amount of computing resources, requesting to spawn a fourth process from the first process, the request comprising the determined third amount of computing resources to be assigned to the fourth process;
communicating with the fourth process, by the second process, via a channel from the second process to the fourth process.
15. The method of claim 14 , wherein the first and third amounts of computing resources are different.
16. The method of claim 11 , wherein the computing resources assigned to the second and third processes are respectively provided by a first and a second node of a computing system.
17. The method of claim 11 , wherein the first process terminates earlier than the second process.
18. A non-transitory computer-readable medium comprising instructions which, when executed by one or more computers, cause the one or more computers to:
allocate a first bounded amount of computing resources forming a first set of computing resources;
exclusively assign the first set of computing resources to a first process of a computer program;
receive a request from the first process for additional computing resources;
in response to the request from the first process, allocate a second bounded amount of computing resources forming a second set of computing resources;
spawn a second process from the first process and exclusively assign the second set of computing resources to the second process;
receive a request from the second process for additional computing resources;
in response to the request from the second process, allocate a third bounded amount of computing resources forming a third set of computing resources; and
spawn a third process from the second process and exclusively assign the third set of computing resources to the third process.
19. A non-transitory computer-readable medium comprising instructions which, when executed by one or more computers, cause the one or more computers to:
determine, by a first process of a computer program, a first amount of computing resources to request;
responsive to the determining by the first process, request to spawn a second process from the first process, the request comprising the determined first amount of computing resources to be assigned to the second process;
determine, by the second process, a second amount of computing resources to request; and
responsive to the determining by the second process, request to spawn a third process from the second process, the request comprising the determined second amount of computing resources to be assigned to the third process.