User specifiable allocation of memory for processes in a multiprocessor computer having a non-uniform memory architecture
First Claim
1. In a multiprocessor computer having an operating system and having shared memory distributed among multiple nodes, a method of dynamically allocating physical memory on a node, the method comprising the following steps:
- receiving a request to the operating system from an application program to create a portion of virtual address space and to allocate, in accordance with a specified one of a plurality of policies specifiable by the application program, physical memory on at least one node as a result of a subsequent reference to the virtual address space portion;
in response to the request, creating the virtual address space portion; and
in response to a subsequent reference to the virtual address space portion, allocating physical memory on a node in accordance with the specified policy for association with the virtual address space portion;
wherein the policy specified by the application program is to allocate the physical memory successively on the next node of a list of nodes at the time the subsequent reference is made.
1 Assignment
0 Petitions
Accused Products
Abstract
A method for a user process to specify a policy for allocating pages of physical memory on the nodes of a multinode multiprocessor computer system. Through means such as a system call, an application program can specify to the operating system that physical pages of memory for an application-specified portion of virtual address space are to be physically allocated upon a specified set of nodes, subject to the additional selection criteria that the pages are to be allocated at first reference upon: 1) the node upon which the reference first occurs; 2) the node which has the most free memory, or 3) that the pages should be evenly distributed across the indicated set of nodes. In effect, the operating system remembers the specified allocation policy and node set from which the physical pages can be subsequently allocated, as established by a system call. Subsequent use of the virtual address space for which the allocation policy is defined results in the memory being allocated accordingly. In this way, an application program can use memory with the memory-locality most advantageous to it. The preferred embodiments of the invention include extensions to the mmap and shmget functions of UNIX-based operating systems.
-
Citations
27 Claims
-
1. In a multiprocessor computer having an operating system and having shared memory distributed among multiple nodes, a method of dynamically allocating physical memory on a node, the method comprising the following steps:
-
receiving a request to the operating system from an application program to create a portion of virtual address space and to allocate, in accordance with a specified one of a plurality of policies specifiable by the application program, physical memory on at least one node as a result of a subsequent reference to the virtual address space portion;
in response to the request, creating the virtual address space portion; and
in response to a subsequent reference to the virtual address space portion, allocating physical memory on a node in accordance with the specified policy for association with the virtual address space portion;
wherein the policy specified by the application program is to allocate the physical memory successively on the next node of a list of nodes at the time the subsequent reference is made. - View Dependent Claims (2, 3, 4, 5, 6, 7)
the receiving step comprises receiving a system call that includes flags specifying the policy.
-
-
6. The method of claim 1 wherein the subsequent reference includes a process fault.
-
7. A computer readable medium having stored therein instructions for performing the steps of claim 1.
-
8. In a multiprocessor computer having an operating system and having shared memory distributed among a multiple of nodes, a method of establishing a physical memory placement policy that governs the allocation of physical pages for a portion of a process'"'"'s virtual address space, the method comprising the following steps:
-
receiving a request to create a portion of virtual address space and to allocate, in accordance with a specified one of a plurality of policies specifiable by an application program, physical memory on at least one node as a result of a subsequent reference to the virtual address space portion; and
in response, creating a data structure that controls the allocation, in response to a subsequent reference to the virtual address space portion, of physical memory on a node in accordance with the specified policy for association with the virtual address space portion;
wherein the policy specified by the application program is to allocate the physical memory successively on the next node of a list of nodes at the time the subsequent reference is made. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A computer readable medium having stored therein instructions for performing, in a multiprocessor computer having an operating system and having shared memory distributed among a multiple of nodes, a method of establishing a physical memory placement policy that governs the allocation of physical pages for a portion of a process'"'"'s virtual address space, the method comprising the following steps:
-
receiving a request to create a portion of virtual address space and to allocate, in accordance with a specified one of a plurality of policies specifiable by an application program, physical memory on at least one node as a result of a subsequent reference to the virtual address space portion; and
in response, creating a data structure that controls the allocation, in response to a subsequent reference to the virtual address space portion, of physical memory on a node in accordance with the specified policy for association with the virtual address space portion. - View Dependent Claims (14, 15, 16, 17)
-
-
18. In a multiprocessor computer having shared memory distributed among multiple nodes, a method of allocating physical memory to a process, the method comprising:
-
creating a portion of virtual address space for the process; and
allocating, in accordance with a specified one of a plurality of policies specifiable by the process, physical memory on a node for association with the virtual address space portion;
wherein a policy specifiable by the process includes one of the following;
to allocate the physical memory on the node from which the first subsequent reference is made;
to allocate the physical memory on the node with the most amount of free physical memory at the time the subsequent reference is made;
orto allocate the physical memory successively on the next node of a list of nodes at the time the subsequent reference is made. - View Dependent Claims (19, 20, 21, 22)
to allocate the physical memory on the node from which the first subsequent reference is made;
to allocate the physical memory on the node with the most amount of free physical memory at the time the subsequent reference is made; and
to allocate the physical memory successively on the next node of a list of nodes at the time the subsequent reference is made.
-
-
21. The method of claim 18 including specifying in the process a set of nodes within the multiprocessor computer from which the physical memory must be allocated.
-
22. A computer readable medium having stored therein instructions for performing the steps of claim 18.
-
23. In a multiprocessor computer having shared memory distributed among multiple nodes, a method of allocating physical memory to a process, the method comprising:
-
creating first and second portions of virtual address space for the process;
allocating, in accordance with a first policy specified by the process, physical memory on a node for association with the first portion of virtual address space; and
allocating, in accordance with a second policy specified by the process, physical memory on a node for association with the second portion of virtual address space;
wherein allocating physical memory on a node for association with the first portion of virtual address space occurs in response to a subsequent reference to the first portion of virtual address space portion and allocating physical memory on a node for association with the second portion of virtual address space occurs in response to a subsequent reference to the second portion of virtual address space portion. - View Dependent Claims (24)
-
-
25. In a multiprocessor computer having shared memory distributed among multiple nodes, a method of allocating physical memory to a process, the method comprising:
-
creating first and second portions of virtual address space for the process;
allocating, in accordance with a first policy specified by the process, physical memory on a node for association with the first portion of virtual address space; and
allocating, in accordance with a second policy specified by the process, physical memory on a node for association with the second portion of virtual address space;
wherein the first and second policies specified by the process are from the following plurality of policies;
to allocate a page of physical memory on the node from the first subsequent reference to portion of virtual address space associated with the policy is made;
to allocate a page of physical memory on the node with the most amount of free physical memory at the time the subsequent reference to the portion of virtual address space associated with the policy is made; and
to allocate a page of physical memory successively on the next node of a list of nodes at the time the subsequent reference to the portion of virtual address space associated with the policy is made. - View Dependent Claims (26)
-
-
27. In a multiprocessor computer having shared memory distributed among multiple nodes, a data structure stored in a computer readable medium for allocating physical memory to a process, the data structure allocating, in accordance with a first policy specified by the process, physical memory on a node for association with a first virtual address space portion for the process, the data structure further allocating, in accordance with a second policy specified by the process, physical memory on a node for association with a second portion of virtual address space;
wherein allocating physical memory on a node for association with the first virtual address space portion for the process occurs in response to a subsequent reference to the first portion of virtual address space by the process and allocating physical memory on a node for association with the second portion of virtual address space occurs in response to subsequent reference to the second portion of virtual address space by the process.
Specification