1. Field of the Invention
Embodiments of the present invention relate generally to virtual memory, and, more specifically, to migration directives in a unified virtual memory system architecture.
2. Description of the Related Art
Most modern computer systems typically implement some type of virtual memory architecture. Among other things, the virtual memory architecture enables instructions to access memory using virtual memory addresses, rather than physical memory addresses. By providing this virtual memory layer between physical memory and application software, user-level software is shielded from the details of physical memory management, which is left to a dedicated memory management system.
A typical computer system that implements a virtual memory architecture includes a central processing unit (CPU) and one or more parallel processing units (GPUs). In operation, a software process executing on either a CPU or a GPU may request data via a virtual memory address. In many traditional architectures, the virtual memory systems that handle requests for data via virtual memory addresses for a CPU and a GPU are independent. More specifically, a separate CPU memory management system and a separate GPU memory management system handle requests for data from the CPU and GPU, respectively.
Some computer systems implement a shared memory architecture, in which multiple processors, such as a CPU and a GPU, may access multiple physical memory units. In such shared memory architectures, software or hardware actors that control memory perform various operations such as changing access permissions for memory pages, copying memory pages, and the like. Additionally, in such shared memory architectures, many different settings by which these various operations may be performed are possible.
Compiler directives are a mechanism by which a program writer may request that a compiler perform certain operations when the code is executed on a certain type of computer platform. As such, a program's source code may include compiler directives directed at more than platform, and depending on the platform and compiler being used, the compiler will generate object code optimized for the specific platform. Because this mechanism is a compiler directive, the compiler is able to convert the directives to appropriate computer instructions based on a system architecture at compile-time. Many compiler directives exist. For example, compiler directives exist for copying memory from one processor's memory to another processor's memory. Many standards implement compiler directives. For example, OpenACC, OpenHMPP, and OpenMP all implement compiler directives. While compiler directive standards exist, no comprehensive standard for compiler directives for a shared memory architecture exists.
As the foregoing illustrates, what is needed is a comprehensive standard for compiler directives for a shared memory architecture.