WO2013162531A1 - Dynamic memory allocation - Google Patents

Dynamic memory allocation Download PDF

Info

Publication number
WO2013162531A1
WO2013162531A1 PCT/US2012/034891 US2012034891W WO2013162531A1 WO 2013162531 A1 WO2013162531 A1 WO 2013162531A1 US 2012034891 W US2012034891 W US 2012034891W WO 2013162531 A1 WO2013162531 A1 WO 2013162531A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
value
slice
function
access
Prior art date
Application number
PCT/US2012/034891
Other languages
French (fr)
Inventor
Toshimitsu Kani
Original Assignee
Hewlett-Packard Development Company L.P.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hewlett-Packard Development Company L.P. filed Critical Hewlett-Packard Development Company L.P.
Priority to CN201280072698.7A priority Critical patent/CN104272273A/en
Priority to PCT/US2012/034891 priority patent/WO2013162531A1/en
Priority to EP12874965.2A priority patent/EP2842039A4/en
Priority to US14/396,383 priority patent/US20150127916A1/en
Priority to TW102114416A priority patent/TWI506538B/en
Publication of WO2013162531A1 publication Critical patent/WO2013162531A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/0644Management of space entities, e.g. partitions, extents, pools
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45566Nested virtual machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45583Memory management, e.g. access or allocation

Definitions

  • a computer system environment may be designed to enable a plurality of users to share hardware and software resources.
  • Shared hardware resources may include, for example, printers or other output devices, data storage and memory devices, and computer processing resources.
  • a host machine and its operating system may manage the shared resources.
  • a user in such an environment may be provided with access to a subset of the environment that is herein referred to as a virtual machine.
  • a virtual machine emulates a separate machine environment (e.g. processor) that is assigned to a guest operating system. (A virtual machine may, in turn, be shared by multiple users, e.g. that remotely log in to the virtual machine.)
  • a user that interacts with a virtual machine is not aware of any activity that takes place on any other virtual machine that shares the same hardware.
  • a computer memory that is accessible by several virtual machines may be partitioned such that each virtual machine has exclusive access to a different portion of the computer memory.
  • a user of one virtual machine may store data in its assigned portion of the computer memory that is not accessible by a user of a different virtual machine.
  • each user may interact with a virtual machine in the same manner as one would with a separate physical machine.
  • a networked computer system environment may be configured to enable a virtual machine or guest operating system to migrate from one system or host to another. During migration, functionality of virtual machine may be transferred from one hardware device to another. The migration may occur without perceptible interruption of operation of the virtual.
  • Devices in a computing environment may be configured in accordance with a standard such as the Advanced Configuration and Power Interface (ACPI) specification.
  • ACPI Advanced Configuration and Power Interface
  • each device in the environment is represented under an operating system as an object.
  • An object that represents a device includes a hardware identifier (HID) that identifies a type of device.
  • Each object also includes a unique identifier (UID) that is assigned uniquely to a single device (which may share an HID).
  • An object also may include methods. For example, a status method may return a current status of a device (e.g. enabled or disabled).
  • An object may include one or more device-specific methods that are specific to a particular type of device.
  • a system may be configured to enable connecting or disconnecting a device while the system is running. Such a capability is variously referred to as hot plugging or unplugging, or as dynamic addition or deletion.
  • hot plugging or unplugging or as dynamic addition or deletion.
  • an object that corresponds to the device under ACPI may be provided with an eject method.
  • FIG. 1 is a schematic illustration of a system for application of an example of dynamic allocation of memory resources
  • FIG. 2 is a schematic illustration of organization of the computer system shown in Fig. 1;
  • FIG. 3 is a flowchart depicting an example of a method for dynamic allocation of memory resources.
  • a portion of a memory device may be accessible by an operating system, e.g. of a virtual machine.
  • the memory device system may be treated by the operating system as a partitioned memory that is partitioned into a plurality of divisions.
  • the divisions are herein referred to as memory slices. Some of the memory slices may be accessible by the operating system while others are not.
  • the partitioned memory device may be partitioned into contiguous memory slices of equal size, or may be partitioned into arbitrarily sized contiguous memory slices.
  • a single operating system may be granted access to some or all of the memory slices, which may not be contiguous with respect to one another.
  • Dynamic allocation refers to a capability to modify accessibility to a memory slice by an operating system during operation of the machine (e.g. virtual machine) on which the operating system is running. For example, during operation of the operating system, one or more additional memory slices may be added (access enabled) or deleted (access disabled).
  • a memory device may be incorporated into, or otherwise associated with or accessible by, a host system.
  • a "host system” also referred to as a virtual machine manager or “hypervisor” system
  • a machine e.g. a computer or processor
  • the memory device of the host system may thus be made available to one or more virtual machines that are running as guest systems on the host system.
  • a virtual machine may be accessible by a user device (e.g. a network terminal) that is located at a location that is remote from the host system.
  • the user device may be configured to communicate with the host system via a network (to be understood as including any wired or wireless communications medium that is capable of transmitting data).
  • the virtual machine may operate under a configuration specification such as Advanced Configuration and Power Interface (ACPI) specification.
  • ACPI firmware may be incorporated into the resources that are made available to each virtual machine.
  • the partitioned memory device may be represented under ACPI (used herein as representative of any object-based specification for configuration or resource management) as a single object that is referred to herein as a memory class device object.
  • the memory class object includes information regarding available memory slices (memory address ranges within the memory device) that are available to the virtual machine.
  • the memory class object may be characterized by a single hardware identifier (HID) that identifies the corresponding hardware device as a memory device capable of partitioning into memory slices.
  • the memory class object may be characterized by a single unique identifier (UID).
  • the memory class object may include a memory slice table (which may refer to a set of structures, objects, or array variables) or similar listing that defines each available memory slice (e.g. by an address and size).
  • An available memory slice may be characterized by a value of in the memory slice table that corresponds to a property of that memory slice. For example, the value may indicate whether that memory slice is enabled, and thus accessible to the virtual machine for data storage, or disabled and thus inaccessible by the virtual machine.
  • the memory class object includes functions or methods that enable the memory device to operate, including online addition and deletion of available memory slices.
  • functions may include functions for returning memory slice information and for setting or changing a status of a memory slice (e.g. changing the status to disabled so as to effectively eject the memory slice, making the memory slice inaccessible to a virtual machine).
  • a processor of a virtual machine may call one or more functions of the memory class object in order to determine a status of one or more memory slices, or to cause change a status (e.g. dynamically add or delete) of a memory slice (e.g. by requesting a host system to change the status).
  • a function that accesses e.g.
  • Dynamic memory allocation as described herein may enable division of a memory of any size into arbitrarily small memory slices. Access to and reading of a memory slice table of a single memory class object may enable relatively rapid and efficient access to memory slices (e.g. as opposed to accessing a similar number of separate objects). Thus, an arbitrary number of memory slices may be efficiently managed, enabling dynamic addition or deletion (hot plugging or unplugging) of small memory slices.
  • the ability to reduce the size of the memory slices into which a memory device is partitioned may increase flexibility and efficiency of a system. With small memory slices, the amount of memory that is allocated or reallocated may be more closely matched to the needs of the each virtual machine.
  • Examples of dynamic allocation of memory resources as described herein may be advantageous when a virtual machine migrates from one host system to another.
  • the accessible memory resources e.g. partitioned into one megabyte slices
  • the accessible memory resources may be transferred from a smaller (e.g. one gigabyte) memory device to a larger (e.g. one terabyte) memory device.
  • the virtual system may be capable of accessing the entire larger memory device by appropriately modifying the memory slice table of a memory class object of the guest operating system.
  • Allocation of small memory slices as described herein may be more efficient at handling small memory slices than some previously described techniques in which each partition or slice of the memory device would be associated with a separate object under ACPI.
  • the amount of time and resources required to access a large number of separate objects would be much larger than the amount of time required to access a similarly large number of entries in a memory slice table of a single memory class object.
  • the example of migration of memory resources while retaining a one-megabyte slice size) from a one-gigabyte memory device to a one-terabyte memory device would require an increase in the required number of separate objects associated with memory slices from 1024 to 1024 2 .
  • a system may be configured for application of an example of dynamic allocation of memory resources.
  • FIG. 1 is a schematic illustration of a system for application of an example of dynamic allocation of memory resources.
  • Computer system 12 may represent one or more intercommunicating computers or servers that may be located at various locations that may be remote from one another.
  • Computer system 12 may include, be associated with, or communicate with, one or more devices or other resources that may be managed by a host system 25 and made available to one or more virtual machines 22.
  • the resources may include a processor 20, a memory 16, or data storage device 24.
  • Various regions of shared memory 16 may be accessed by different guest operating systems of different virtual machines 22.
  • a virtual machine 22 may be accessible from a remote location, e.g. by a remote terminal or other device that communicates with computer system 12 via a network.
  • a remote terminal e.g. by a remote terminal or other device that communicates with computer system 12 via a network.
  • user operating a remote terminal may log into a virtual machine 22 via the network.
  • Such a terminal include one or more of a processor, an input device (e.g. keyboard, keypad, pointing device, control, microphone), an output device (e.g. computer monitor or screen, printer, display panel, speaker, or another device capable of producing visible, audible, or tactile output), data storage device, or memory device.
  • Computer system 12 may be operated to provide resources, such as memory resources, for access by one or more virtual machines 22.
  • Computer system 12 may be configured to enable dynamic allocation of memory resources.
  • Computer system 12 may be configured to run a host system 25 or virtual machine manager that allocates hardware resources to one or more virtual machines running under guest operating systems. For example, a virtual machine manager may determine that a region of shared memory 16, being accessible by one virtual machine, is to be characterized as unavailable to all other virtual machines that share memory resources of shared memory 16.
  • FIG. 2 is a schematic illustration of organization of the computer system shown in Fig. 1.
  • One or more components of computer system 12 may be incorporated into, or connected to, one or more intercommunicating machines.
  • Computer system 12 is configured for operation of host system 25 and of virtual machines 22A and 22B (for the sake of clarity, only two virtual machines are illustrated and only virtual machine 22A is illustrated in detail). Host system 25 and virtual machines 22A and 22B may run on processor 20 of computer system 12.
  • Host system 25 is configured to manage resources of computer system 12 and to enable access to the resources by virtual machines 22A and 22B.
  • Resources that are managed by host system 25 may include processor 20, memory 16, and data storage device 24.
  • Processor 20 may include one or more processing units, e.g. of one or more computers. Processor 20 may be configured to operate in accordance with programmed instructions stored in memory 16. Processor 20 may be capable of executing an application for enabling dynamic allocation of memory resources.
  • Processor 20 may execute a virtual machine manager application to enable operation of host system 25.
  • Processor 20 may communicate with data storage device 24.
  • Data storage device 24 may include one or more fixed or removable nonvolatile data storage devices.
  • data storage device 24 may include a computer readable medium for storing program instructions for operation of processor 20.
  • the programmed instructions may include a driver 32 for enabling dynamic allocation of memory resources as described herein.
  • driver 32 may be operated under a guest operating system 19 of a virtual machine 22A.
  • data storage device 24 may be remote from processor 20. In such cases data storage device 24 may be a storage device of a remote server that stores programmed instructions in the form of an installation package or packages that can be downloaded and installed for execution by processor 20.
  • Data storage device 24 may be utilized to store data or parameters for use by processor 20 during operation, or results of operation of processor 20.
  • Processor 20 may communicate with memory 16.
  • Memory 16 may include one or more volatile or nonvolatile memory devices that are accessible by processor 20.
  • Memory 16 may be utilized to store, for example, programmed instructions for operation of processor 20, data or parameters for use by processor 20 during operation, or results of operation of processor 20.
  • memory 16 may be utilized to store programmed instructions for a guest operating system 19 of virtual machine 22A, a driver 32 to enable dynamic allocation of memory resources, or a host system 25.
  • At least of portion of memory 16 may be made available to a virtual machine 22A or 22B.
  • the available portion of memory 16 may include a shared memory 16 that is partitioned into memory slices 18.
  • memory 16 may be partitioned under virtual machine 22A or 22B into a plurality of memory slices 18.
  • each memory slice 18 may represent a functionally contiguous region of (e.g. adjacent addresses in) of shared memory 16.
  • Memory slices 18 may be of equal size, or may vary in size. (Although memory slices 18 of memory 16 are shown as being of equal size in both virtual machine 22A and in virtual machine 22B, each guest operating system 19 may partition memory 16 differently.)
  • Memory slices 18 of memory 16 that are enabled for access by virtual machine 22A are indicated by shading within virtual machine 22A.
  • memory slices 18 of memory 16 that are enabled for access by virtual machine 22B are indicated by shading within virtual machine 22B.
  • the regions of memory 16 that are enabled for access by either virtual machine 22A or by virtual machine 22B are indicated by the letters A or B, respectively.
  • Guest operating system 19 may include a memory class object 26.
  • Memory class object 26 may be available to virtual machine 22A (and may reside in a virtual processor of virtual machine 22A).
  • a memory class object 26 may include, for example, an HID, a UID, and an indication of a status (e.g. memory 16 being available or not available).
  • the HID may be unique to a memory device that is compatible with dynamic allocation of memory resources via a memory class object 26 as described herein.
  • a memory class object 26 may also include information to enable compatibility with a guest operating system 19 that is not configured to interact with a memory class object 26. For example, such a guest operating system 19 may not include driver 32 that enables dynamic allocation of memory resources via memory class object 26.
  • Such information to enable compatibility may include, for example, a compatible identifier (CID).
  • CID compatible identifier
  • a guest operating system may include a in which the driver that is incompatible with dynamic memory allocation.
  • the HID (which is checked before the CID) may not be recognized.
  • the CID (which is checked when the HID is not recognized) may be interpreted to treat memory class object 26 as an object that represents a memory device.
  • a resource table identifies (statically) available regions of the memory device (the resource table being ignored if HID is recognized by driver 32 of guest operating system 19).
  • a guest operating system may include a driver that enables dynamic memory allocation by representing each memory slice by a separate object, each slice being defined by a separate resource table.
  • the CID may be interpreted so to treat memory class object 26 as representing a memory device (whose range is determined by the resource table).
  • memory class object 26 lacks a standard eject operation for disconnecting the memory device, the memory device is treated as not ejectable and is protected from any attempt to eject it.
  • Memory class object 26 includes a memory slice table 28.
  • Memory slice table 28 may include a listing or enumeration of memory slices 18 (e.g. as an array of objects).
  • each memory slice 18 may be represented in memory slice table 28 as a set of flags, variables, or parameters.
  • the variables may indicate properties of a corresponding memory slice 18.
  • Such variables may include, for example, a location in shared memory 16 of each memory slice 18 (e.g. as a starting address and an ending address, or as an address and a size), and a status of each memory slice 18 with regard to virtual machine 22A.
  • Memory class object 26 includes one or more functions 30.
  • a function 30 may be called by a guest operating system 19 under which virtual machine 22A is running (different virtual machines, such as virtual machines 22A and 22B may run under different operating systems).
  • calling a function 30 may return a value that indicates a property of one or more memory slices 18.
  • the returned value may be a current value of a variable that indicates a property of a memory slice 18.
  • calling a function may modify a properly of a memory slice 18.
  • calling the function may modify a value of a variable that determines a property of a memory slice 18.
  • functions 30 may include a function that returns a representation of memory slice table 28 when called by a guest operating system 19.
  • the representation may include a number of listed representations of memory slices.
  • the representation of memory slice table 28 may include for each memory slice 18: a universal unique identifier (UUID) , an indication of a status (e.g. enabled or available, or disabled or not available), a starting (minimum base) address, a length (e.g. in terms of memory units or addresses), or an eject status (e.g. whether the slice is to be ejected).
  • UUID universal unique identifier
  • T e UUID may be treated under guest operating system 19 as being interchangeable with a UID, e.g. as of an object that represents an individual memory slice.
  • Functions 30 may include a function that may be called by a guest operating system 19 when dynamically adding (making accessible to virtual machine 22A that is running under guest operating system 19) one or more memory slices 18 (e.g. each identified by its UUID) that guest operating system 19 requests (e.g. from host system 25) to add.
  • a function may return an updated representation of memory slice table 28 that includes the added memory slices.
  • Functions 30 may include a function that may be called by a guest operating system 19 when dynamically deleting (making inaccessible to virtual machine 22A that is running under guest operating system 19) one or more memory slices 18 (e.g. each identified by its UUID) that guest operating system 19 requests (e.g. from host system 25) to delete.
  • a function may ensure that any data that is stored on the memory slice 18 to be deleted is moved to another, accessible memory slice 18 by guest operating system 19 before the requested memory slice is ejected.
  • the function may return a list of the slices that are to be deleted (e.g. each identified by its UUID).
  • Functions 30 may include a function that may be called by a guest operating system 19 to eject (dynamically delete) one or more memory slices 18 (e.g. each identified by its UUID).
  • An ejected memory slice 18 is no longer accessible by virtual machine 22A that is running under guest operating system 19.
  • a variable or flag may be modified in memory table 28 of memory class object 26 to indicate that the ejected memory slice 18 is not accessible by virtual machine 22A.
  • Such a function may return an indication (e.g. flag or variable) that indicates whether or not the eject operation was successful.
  • Functions 30 may include a function that may be called by a guest operating system 19 to mark one or more memory slices 18 (e.g. each identified by its UUID) as not ejectable. For example, a variable or flag may be modified in memory table 28 of memory class object 26 to indicate a memory slice 18 as not ejectable by virtual machine 22A.
  • a function may ensure that a minimum quantity of memory remains accessible by a virtual machine 22A that is running under guest operating system 19. For example, such a minimum quantity of memory may be necessary for storing memory class object 26, a guest operating system 19, and programmed instructions that may be required for operating a virtual machine 22A or an example of an application for dynamic allocation of memory resources. For example, such a function may return an updated representation of memory slice table 28.
  • processor 20 may execute a method for dynamic allocation of memory resources.
  • Fig. 3 is a flowchart depicting an example of a method for dynamic allocation of memory resources.
  • Dynamic memory allocation method 100 may be executed by a processor of a system for dynamic allocation of memory resources.
  • dynamic memory allocation method 100 may be executed by a guest operating system that is running on a virtual processor of a virtual machine.
  • Dynamic memory allocation method 100 may be executed automatically at predetermined periodic intervals, in response to a predetermined event or situation (e.g. when booting a virtual machine, prior to performing an action that requires memory resources, upon receiving a request to increase or decrease a quantity of accessible memory resources, upon receiving an indication that a quantity of accessible memory resources is to be increased or decreased), or upon a request or command that is issued by a user or automatically issued by another application (e.g. a guest operating system of a virtual machine, or by a virtual machine manager application).
  • a guest operating system of a virtual machine or by a virtual machine manager application.
  • Dynamic memory allocation method 100 includes accessing (e.g. creating or accessing a previously created) a memory class object that corresponds to a partitioned memory device (block 110).
  • the memory class object may be created by a guest operating system of a virtual machine when the virtual machine is started up (booted), or when a memory device becomes available to the virtual machine (e.g. when access to memory is required or requested, or as a result of operation of a virtual machine manager application).
  • the memory class object may be accessed by the operating system.
  • the memory class object may be accessed when booting to get all memory slice information.
  • the memory class object may control access to one or more memory slices of a partitioned memory device.
  • access to a memory slice may be controlled by the operating system of the virtual machine in accordance with one or more properties of that memory slice.
  • Properties of each memory slice may be determined by one or more component structures of the memory class object that may be collectively referred to as a memory slice table.
  • Properties of the memory slice may be set by a virtual machine manager application or by the guest operating system. Properties of the memory slice may be ascertained, set, or modified by the guest operating system by calling an appropriate function of the memory class object.
  • the guest operating system may receive a notification to dynamically add (make accessible) a memory slice (block 120).
  • the guest operating system may receive such a notification from an application that is running on the virtual machine under the guest operating system in response to a detected requirement or request to increase a volume of accessible memory.
  • the guest operating system may call an appropriate add function of the memory class object to enable an indicated memory slice (block 130). For example, a memory slice may be selected for addition in accordance with a predetermined sequence or in accordance with other criteria (e.g. proximity to other enabled memory slices). The memory slice may be indicated by its associated UUID, address, or other indication.
  • Calling the add function may request a host system to provide one or more enabled memory slices. As a result of calling the add function, an updated memory slice table in which one or more properties of one or more memory slices are modified may be provided so as to enable access those memory slices by the guest operating system of the virtual machine. The host system may ensure that no memory resources that are currently allocated to a different virtual machine would be added to the requesting guest operating system.
  • the guest operating system may receive a notification to dynamically delete (make inaccessible) a memory slice (block 140).
  • the guest operating system may receive such a notification from an application that is running on the virtual machine under the guest operating system in response to a detecting a surplus of available memory resources.
  • Such a notification may be received from a virtual machine manager application, e.g. in response to a requirement for increased memory resources by another virtual machine.
  • the guest operating system may call an appropriate delete function of the memory class object to prepare an indicated memory slice (or slices) for deletion (block 150).
  • a memory slice may be selected for deletion in accordance with a predetermined sequence or in accordance with other criteria (e.g. volume of data currently stored in each memory slice, distance from other enabled memory slices).
  • the memory slice may be indicated by its associated UUID, address, or other indication.
  • Calling the delete function may cause any data that is currently stored on the indicated memory slice to be copied to one or more other currently enabled memory slices, or may return a list of memory slices to be deleted, whose data content is to be moved by the guest operating system to other memory slices.
  • Memory management techniques may be applied to determine a destination memory slice for any moved data. A list of memory slices to be deleted may be returned by the function.
  • the guest operating system of the virtual machine may call an appropriate eject function to eject (delete or disable) one or more memory slices that are indicated for deletion (block 160).
  • Calling the eject function may cause one or more properties of the indicated memory slice to be modified so as to disable access to that memory slice by the guest operating system of the virtual machine. For example, a request to eject the memory slices may be made to a host system. Success of the eject operation may be determined from one or more values that are returned by the eject function.
  • a computer program application stored in a computer-readable medium may include code or executable instructions that when executed may instruct or cause a controller or processor to perform methods discussed herein, such as an example of a method for dynamic memory allocation.
  • the computer-readable medium may be a non-transitory computer-readable media including all forms and types of computer-readable media except for a transitory, propagating signal.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Memory System Of A Hierarchy Structure (AREA)
  • Storage Device Security (AREA)

Abstract

A method includes calling a function of a memory class object to cause access to a value in a memory table of the memory class object so as to dynamically allocate a memory for access by an operating system. The memory class object represents the memory. The value corresponds to a property of a memory slice selected from a plurality of memory slices into which the memory is partitioned.

Description

DYNAMIC MEMORY ALLOCATION
BACKGROUND
[0001] A computer system environment may be designed to enable a plurality of users to share hardware and software resources. Shared hardware resources may include, for example, printers or other output devices, data storage and memory devices, and computer processing resources. A host machine and its operating system may manage the shared resources. A user in such an environment may be provided with access to a subset of the environment that is herein referred to as a virtual machine. A virtual machine emulates a separate machine environment (e.g. processor) that is assigned to a guest operating system. (A virtual machine may, in turn, be shared by multiple users, e.g. that remotely log in to the virtual machine.) In such an environment, a user that interacts with a virtual machine is not aware of any activity that takes place on any other virtual machine that shares the same hardware. For example, a computer memory that is accessible by several virtual machines may be partitioned such that each virtual machine has exclusive access to a different portion of the computer memory. A user of one virtual machine may store data in its assigned portion of the computer memory that is not accessible by a user of a different virtual machine. Thus, each user may interact with a virtual machine in the same manner as one would with a separate physical machine.
[0002] A networked computer system environment may be configured to enable a virtual machine or guest operating system to migrate from one system or host to another. During migration, functionality of virtual machine may be transferred from one hardware device to another. The migration may occur without perceptible interruption of operation of the virtual.
[0003] Devices in a computing environment may be configured in accordance with a standard such as the Advanced Configuration and Power Interface (ACPI) specification. With such a standard, each device in the environment is represented under an operating system as an object. An object that represents a device includes a hardware identifier (HID) that identifies a type of device. Each object also includes a unique identifier (UID) that is assigned uniquely to a single device (which may share an HID). An object also may include methods. For example, a status method may return a current status of a device (e.g. enabled or disabled). An object may include one or more device-specific methods that are specific to a particular type of device.
[0004] A system may be configured to enable connecting or disconnecting a device while the system is running. Such a capability is variously referred to as hot plugging or unplugging, or as dynamic addition or deletion. For example, to enable disconnecting a device when the system is running, an object that corresponds to the device under ACPI may be provided with an eject method.
BRIEF DESCRIPTION OF THE DRAWINGS
[0005] Examples described herein may best be understood by reference to the following detailed description when read with the accompanied drawings in which:
[0006] Fig. 1 is a schematic illustration of a system for application of an example of dynamic allocation of memory resources;
[0007] Fig. 2 is a schematic illustration of organization of the computer system shown in Fig. 1; and
[0008] Fig. 3 is a flowchart depicting an example of a method for dynamic allocation of memory resources.
DETAILED DESCRIPTION
[0009] In accordance with examples of dynamic allocation of memory resources, a portion of a memory device may be accessible by an operating system, e.g. of a virtual machine. The memory device system may be treated by the operating system as a partitioned memory that is partitioned into a plurality of divisions. The divisions are herein referred to as memory slices. Some of the memory slices may be accessible by the operating system while others are not. The partitioned memory device may be partitioned into contiguous memory slices of equal size, or may be partitioned into arbitrarily sized contiguous memory slices. A single operating system may be granted access to some or all of the memory slices, which may not be contiguous with respect to one another.
[0010] Dynamic allocation ("hot plugging or unplugging") of memory resources refers to a capability to modify accessibility to a memory slice by an operating system during operation of the machine (e.g. virtual machine) on which the operating system is running. For example, during operation of the operating system, one or more additional memory slices may be added (access enabled) or deleted (access disabled).
[0011] In a system lacking a capability for dynamic allocation, memory resources would be allocated only when a machine were to be started or restarted. Any change in allocation would require restarting the virtual machine.
[0012] Advantages of dynamic allocation of memory resources may be understood (and are herein described) within the context of a system that is capable of supporting a plurality of virtual machines that share memory resources. However, examples of dynamic allocation of memory resources may be implemented on a single physical machine or processor running a single operating system, or on any computing machine, computer, or processor that utilizes access to memory.
[0013] For example, in accordance with examples of dynamic allocation of memory resources, a memory device may be incorporated into, or otherwise associated with or accessible by, a host system. A "host system" (also referred to as a virtual machine manager or "hypervisor" system) herein refers to a machine (e.g. a computer or processor) that provides resources to one or more virtual machines (e.g. virtual computers or processors). The memory device of the host system may thus be made available to one or more virtual machines that are running as guest systems on the host system. A virtual machine may be accessible by a user device (e.g. a network terminal) that is located at a location that is remote from the host system. For example, the user device may be configured to communicate with the host system via a network (to be understood as including any wired or wireless communications medium that is capable of transmitting data). [0014] The virtual machine may operate under a configuration specification such as Advanced Configuration and Power Interface (ACPI) specification. ACPI firmware may be incorporated into the resources that are made available to each virtual machine. The partitioned memory device may be represented under ACPI (used herein as representative of any object-based specification for configuration or resource management) as a single object that is referred to herein as a memory class device object. The memory class object includes information regarding available memory slices (memory address ranges within the memory device) that are available to the virtual machine. The memory class object may be characterized by a single hardware identifier (HID) that identifies the corresponding hardware device as a memory device capable of partitioning into memory slices. In addition, the memory class object may be characterized by a single unique identifier (UID). The memory class object may include a memory slice table (which may refer to a set of structures, objects, or array variables) or similar listing that defines each available memory slice (e.g. by an address and size). An available memory slice may be characterized by a value of in the memory slice table that corresponds to a property of that memory slice. For example, the value may indicate whether that memory slice is enabled, and thus accessible to the virtual machine for data storage, or disabled and thus inaccessible by the virtual machine.
[0015] The memory class object includes functions or methods that enable the memory device to operate, including online addition and deletion of available memory slices. For example, such functions may include functions for returning memory slice information and for setting or changing a status of a memory slice (e.g. changing the status to disabled so as to effectively eject the memory slice, making the memory slice inaccessible to a virtual machine). A processor of a virtual machine may call one or more functions of the memory class object in order to determine a status of one or more memory slices, or to cause change a status (e.g. dynamically add or delete) of a memory slice (e.g. by requesting a host system to change the status). A function that accesses (e.g. reads or modifies) or causes a host system or guest operating system to access a value in a memory slice table is herein referred to as causing access to the value. [0016] Examples of dynamic allocation of memory resources as described herein may be advantageous over other techniques used for allocation of memory resources. Dynamic memory allocation as described herein may enable division of a memory of any size into arbitrarily small memory slices. Access to and reading of a memory slice table of a single memory class object may enable relatively rapid and efficient access to memory slices (e.g. as opposed to accessing a similar number of separate objects). Thus, an arbitrary number of memory slices may be efficiently managed, enabling dynamic addition or deletion (hot plugging or unplugging) of small memory slices. The ability to reduce the size of the memory slices into which a memory device is partitioned may increase flexibility and efficiency of a system. With small memory slices, the amount of memory that is allocated or reallocated may be more closely matched to the needs of the each virtual machine.
[0017] Examples of dynamic allocation of memory resources as described herein may be advantageous when a virtual machine migrates from one host system to another. For example, when migrating, the accessible memory resources (e.g. partitioned into one megabyte slices) may be transferred from a smaller (e.g. one gigabyte) memory device to a larger (e.g. one terabyte) memory device. After such a migration, the virtual system may be capable of accessing the entire larger memory device by appropriately modifying the memory slice table of a memory class object of the guest operating system.
[0018] Allocation of small memory slices as described herein may be more efficient at handling small memory slices than some previously described techniques in which each partition or slice of the memory device would be associated with a separate object under ACPI. Typically, the amount of time and resources required to access a large number of separate objects would be much larger than the amount of time required to access a similarly large number of entries in a memory slice table of a single memory class object. In such a previously-described system, for example, the example of migration of memory resources (while retaining a one-megabyte slice size) from a one-gigabyte memory device to a one-terabyte memory device would require an increase in the required number of separate objects associated with memory slices from 1024 to 10242. Such an increase in the number of objects could significantly reduce the speed of operation of such a system. If, on the other hand, if the size of each memory slice were to be increased (e.g. to one gigabyte that the number of memory slices remain at 1024), flexibility of the system in reallocating memory resources would be impaired or reconfiguring the guest operating system would be required.
[0019] A system may be configured for application of an example of dynamic allocation of memory resources.
[0020] Fig. 1 is a schematic illustration of a system for application of an example of dynamic allocation of memory resources.
[0021] Computer system 12 may represent one or more intercommunicating computers or servers that may be located at various locations that may be remote from one another. Computer system 12 may include, be associated with, or communicate with, one or more devices or other resources that may be managed by a host system 25 and made available to one or more virtual machines 22. For example, the resources may include a processor 20, a memory 16, or data storage device 24. Various regions of shared memory 16 may be accessed by different guest operating systems of different virtual machines 22.
[0022] A virtual machine 22 may be accessible from a remote location, e.g. by a remote terminal or other device that communicates with computer system 12 via a network. For example, user operating a remote terminal may log into a virtual machine 22 via the network. Such a terminal include one or more of a processor, an input device (e.g. keyboard, keypad, pointing device, control, microphone), an output device (e.g. computer monitor or screen, printer, display panel, speaker, or another device capable of producing visible, audible, or tactile output), data storage device, or memory device.
[0023] Computer system 12 may be operated to provide resources, such as memory resources, for access by one or more virtual machines 22. Computer system 12 may be configured to enable dynamic allocation of memory resources. Computer system 12 may be configured to run a host system 25 or virtual machine manager that allocates hardware resources to one or more virtual machines running under guest operating systems. For example, a virtual machine manager may determine that a region of shared memory 16, being accessible by one virtual machine, is to be characterized as unavailable to all other virtual machines that share memory resources of shared memory 16.
[0024] Fig. 2 is a schematic illustration of organization of the computer system shown in Fig. 1. One or more components of computer system 12 may be incorporated into, or connected to, one or more intercommunicating machines.
[0025] Computer system 12 is configured for operation of host system 25 and of virtual machines 22A and 22B (for the sake of clarity, only two virtual machines are illustrated and only virtual machine 22A is illustrated in detail). Host system 25 and virtual machines 22A and 22B may run on processor 20 of computer system 12.
[0026] Host system 25 is configured to manage resources of computer system 12 and to enable access to the resources by virtual machines 22A and 22B. Resources that are managed by host system 25 may include processor 20, memory 16, and data storage device 24.
[0027] Processor 20 may include one or more processing units, e.g. of one or more computers. Processor 20 may be configured to operate in accordance with programmed instructions stored in memory 16. Processor 20 may be capable of executing an application for enabling dynamic allocation of memory resources.
[0028] Processor 20 may execute a virtual machine manager application to enable operation of host system 25.
[0029] Processor 20 may communicate with data storage device 24. Data storage device 24 may include one or more fixed or removable nonvolatile data storage devices. For example, data storage device 24 may include a computer readable medium for storing program instructions for operation of processor 20. For example, the programmed instructions may include a driver 32 for enabling dynamic allocation of memory resources as described herein. For example, driver 32 may be operated under a guest operating system 19 of a virtual machine 22A. It is noted that data storage device 24 may be remote from processor 20. In such cases data storage device 24 may be a storage device of a remote server that stores programmed instructions in the form of an installation package or packages that can be downloaded and installed for execution by processor 20. Data storage device 24 may be utilized to store data or parameters for use by processor 20 during operation, or results of operation of processor 20.
[0030] Processor 20 may communicate with memory 16. Memory 16 may include one or more volatile or nonvolatile memory devices that are accessible by processor 20. Memory 16 may be utilized to store, for example, programmed instructions for operation of processor 20, data or parameters for use by processor 20 during operation, or results of operation of processor 20. For example, memory 16 may be utilized to store programmed instructions for a guest operating system 19 of virtual machine 22A, a driver 32 to enable dynamic allocation of memory resources, or a host system 25.
[0031] At least of portion of memory 16 may be made available to a virtual machine 22A or 22B. The available portion of memory 16 may include a shared memory 16 that is partitioned into memory slices 18.
[0032] For example, memory 16 may be partitioned under virtual machine 22A or 22B into a plurality of memory slices 18. For example, each memory slice 18 may represent a functionally contiguous region of (e.g. adjacent addresses in) of shared memory 16. Memory slices 18 may be of equal size, or may vary in size. (Although memory slices 18 of memory 16 are shown as being of equal size in both virtual machine 22A and in virtual machine 22B, each guest operating system 19 may partition memory 16 differently.)
[0033] Memory slices 18 of memory 16 that are enabled for access by virtual machine 22A are indicated by shading within virtual machine 22A. Similarly, memory slices 18 of memory 16 that are enabled for access by virtual machine 22B are indicated by shading within virtual machine 22B. Within host system 25, the regions of memory 16 that are enabled for access by either virtual machine 22A or by virtual machine 22B are indicated by the letters A or B, respectively.
[0034] Guest operating system 19 may include a memory class object 26. Memory class object 26 may be available to virtual machine 22A (and may reside in a virtual processor of virtual machine 22A). [0035] A memory class object 26 may include, for example, an HID, a UID, and an indication of a status (e.g. memory 16 being available or not available). The HID may be unique to a memory device that is compatible with dynamic allocation of memory resources via a memory class object 26 as described herein. A memory class object 26 may also include information to enable compatibility with a guest operating system 19 that is not configured to interact with a memory class object 26. For example, such a guest operating system 19 may not include driver 32 that enables dynamic allocation of memory resources via memory class object 26. Such information to enable compatibility may include, for example, a compatible identifier (CID).
[0036] For example, a guest operating system may include a in which the driver that is incompatible with dynamic memory allocation. In this case, the HID (which is checked before the CID) may not be recognized. The CID (which is checked when the HID is not recognized) may be interpreted to treat memory class object 26 as an object that represents a memory device. A resource table identifies (statically) available regions of the memory device (the resource table being ignored if HID is recognized by driver 32 of guest operating system 19). As another example, a guest operating system may include a driver that enables dynamic memory allocation by representing each memory slice by a separate object, each slice being defined by a separate resource table. In this case, the CID may be interpreted so to treat memory class object 26 as representing a memory device (whose range is determined by the resource table). However, since memory class object 26 lacks a standard eject operation for disconnecting the memory device, the memory device is treated as not ejectable and is protected from any attempt to eject it.
[0037] Memory class object 26 includes a memory slice table 28. Memory slice table 28 may include a listing or enumeration of memory slices 18 (e.g. as an array of objects). For example, each memory slice 18 may be represented in memory slice table 28 as a set of flags, variables, or parameters. The variables may indicate properties of a corresponding memory slice 18. Such variables may include, for example, a location in shared memory 16 of each memory slice 18 (e.g. as a starting address and an ending address, or as an address and a size), and a status of each memory slice 18 with regard to virtual machine 22A. [0038] Memory class object 26 includes one or more functions 30. A function 30 may be called by a guest operating system 19 under which virtual machine 22A is running (different virtual machines, such as virtual machines 22A and 22B may run under different operating systems). In some cases, calling a function 30 may return a value that indicates a property of one or more memory slices 18. For example, the returned value may be a current value of a variable that indicates a property of a memory slice 18. In other cases, calling a function may modify a properly of a memory slice 18. For example, calling the function may modify a value of a variable that determines a property of a memory slice 18.
[0039] For example, functions 30 may include a function that returns a representation of memory slice table 28 when called by a guest operating system 19. The representation may include a number of listed representations of memory slices. The representation of memory slice table 28 may include for each memory slice 18: a universal unique identifier (UUID) , an indication of a status (e.g. enabled or available, or disabled or not available), a starting (minimum base) address, a length (e.g. in terms of memory units or addresses), or an eject status (e.g. whether the slice is to be ejected). (T e UUID may be treated under guest operating system 19 as being interchangeable with a UID, e.g. as of an object that represents an individual memory slice.)
[0040] Functions 30 may include a function that may be called by a guest operating system 19 when dynamically adding (making accessible to virtual machine 22A that is running under guest operating system 19) one or more memory slices 18 (e.g. each identified by its UUID) that guest operating system 19 requests (e.g. from host system 25) to add. For example, such a function may return an updated representation of memory slice table 28 that includes the added memory slices.
[0041] Functions 30 may include a function that may be called by a guest operating system 19 when dynamically deleting (making inaccessible to virtual machine 22A that is running under guest operating system 19) one or more memory slices 18 (e.g. each identified by its UUID) that guest operating system 19 requests (e.g. from host system 25) to delete. Such a function may ensure that any data that is stored on the memory slice 18 to be deleted is moved to another, accessible memory slice 18 by guest operating system 19 before the requested memory slice is ejected. The function may return a list of the slices that are to be deleted (e.g. each identified by its UUID).
[0042] Functions 30 may include a function that may be called by a guest operating system 19 to eject (dynamically delete) one or more memory slices 18 (e.g. each identified by its UUID). An ejected memory slice 18 is no longer accessible by virtual machine 22A that is running under guest operating system 19. For example, a variable or flag may be modified in memory table 28 of memory class object 26 to indicate that the ejected memory slice 18 is not accessible by virtual machine 22A. Such a function may return an indication (e.g. flag or variable) that indicates whether or not the eject operation was successful.
[0043] Functions 30 may include a function that may be called by a guest operating system 19 to mark one or more memory slices 18 (e.g. each identified by its UUID) as not ejectable. For example, a variable or flag may be modified in memory table 28 of memory class object 26 to indicate a memory slice 18 as not ejectable by virtual machine 22A. Such a function may ensure that a minimum quantity of memory remains accessible by a virtual machine 22A that is running under guest operating system 19. For example, such a minimum quantity of memory may be necessary for storing memory class object 26, a guest operating system 19, and programmed instructions that may be required for operating a virtual machine 22A or an example of an application for dynamic allocation of memory resources. For example, such a function may return an updated representation of memory slice table 28.
[0044] In operation, processor 20 may execute a method for dynamic allocation of memory resources. Fig. 3 is a flowchart depicting an example of a method for dynamic allocation of memory resources.
[0045] Dynamic memory allocation method 100 may be executed by a processor of a system for dynamic allocation of memory resources. For example, dynamic memory allocation method 100 may be executed by a guest operating system that is running on a virtual processor of a virtual machine. Dynamic memory allocation method 100 may be executed automatically at predetermined periodic intervals, in response to a predetermined event or situation (e.g. when booting a virtual machine, prior to performing an action that requires memory resources, upon receiving a request to increase or decrease a quantity of accessible memory resources, upon receiving an indication that a quantity of accessible memory resources is to be increased or decreased), or upon a request or command that is issued by a user or automatically issued by another application (e.g. a guest operating system of a virtual machine, or by a virtual machine manager application).
[0046] It should be understood with respect to the flowchart that the division of the illustrated method into discrete operations represented by blocks of the flowchart has been selected for convenience and clarity only. Alternative division of the illustrated method into discrete operations is possible with equivalent results. Such alternative division of the illustrated method into discrete operations should be understood as representing other examples of the illustrated method.
[0047] Similarly, it should be understood that, unless indicated otherwise, the illustrated order of execution of the operations represented by blocks of the flowchart has been selected for convenience and clarity only. Operations of the illustrated method may be executed in an alternative order, or concurrently, with equivalent results. Such reordering of operations of the illustrated method should be understood as representing other examples of the illustrated method.
[0048] Dynamic memory allocation method 100 includes accessing (e.g. creating or accessing a previously created) a memory class object that corresponds to a partitioned memory device (block 110). For example, the memory class object may be created by a guest operating system of a virtual machine when the virtual machine is started up (booted), or when a memory device becomes available to the virtual machine (e.g. when access to memory is required or requested, or as a result of operation of a virtual machine manager application). Once created, the memory class object may be accessed by the operating system. For example, the memory class object may be accessed when booting to get all memory slice information. [0049] The memory class object may control access to one or more memory slices of a partitioned memory device. For example, access to a memory slice may be controlled by the operating system of the virtual machine in accordance with one or more properties of that memory slice. Properties of each memory slice may be determined by one or more component structures of the memory class object that may be collectively referred to as a memory slice table. Properties of the memory slice may be set by a virtual machine manager application or by the guest operating system. Properties of the memory slice may be ascertained, set, or modified by the guest operating system by calling an appropriate function of the memory class object.
[0050] During operation of a guest operating system of a virtual machine, the guest operating system may receive a notification to dynamically add (make accessible) a memory slice (block 120). For example, the guest operating system may receive such a notification from an application that is running on the virtual machine under the guest operating system in response to a detected requirement or request to increase a volume of accessible memory.
[0051] In response to the notification to dynamically add a memory slice (or slices), the guest operating system may call an appropriate add function of the memory class object to enable an indicated memory slice (block 130). For example, a memory slice may be selected for addition in accordance with a predetermined sequence or in accordance with other criteria (e.g. proximity to other enabled memory slices). The memory slice may be indicated by its associated UUID, address, or other indication. Calling the add function may request a host system to provide one or more enabled memory slices. As a result of calling the add function, an updated memory slice table in which one or more properties of one or more memory slices are modified may be provided so as to enable access those memory slices by the guest operating system of the virtual machine. The host system may ensure that no memory resources that are currently allocated to a different virtual machine would be added to the requesting guest operating system.
[0052] During operation of a guest operating system of a virtual machine, the guest operating system may receive a notification to dynamically delete (make inaccessible) a memory slice (block 140). For example, the guest operating system may receive such a notification from an application that is running on the virtual machine under the guest operating system in response to a detecting a surplus of available memory resources. Such a notification may be received from a virtual machine manager application, e.g. in response to a requirement for increased memory resources by another virtual machine.
[0053] In response to the notification to dynamically delete a memory slice, the guest operating system may call an appropriate delete function of the memory class object to prepare an indicated memory slice (or slices) for deletion (block 150). For example, a memory slice may be selected for deletion in accordance with a predetermined sequence or in accordance with other criteria (e.g. volume of data currently stored in each memory slice, distance from other enabled memory slices). The memory slice may be indicated by its associated UUID, address, or other indication. Calling the delete function may cause any data that is currently stored on the indicated memory slice to be copied to one or more other currently enabled memory slices, or may return a list of memory slices to be deleted, whose data content is to be moved by the guest operating system to other memory slices. Memory management techniques may be applied to determine a destination memory slice for any moved data. A list of memory slices to be deleted may be returned by the function.
[0054] The guest operating system of the virtual machine may call an appropriate eject function to eject (delete or disable) one or more memory slices that are indicated for deletion (block 160). Calling the eject function may cause one or more properties of the indicated memory slice to be modified so as to disable access to that memory slice by the guest operating system of the virtual machine. For example, a request to eject the memory slices may be made to a host system. Success of the eject operation may be determined from one or more values that are returned by the eject function.
[0055] Whether or not a memory slice is added or deleted, the virtual machine may operate, utilizing any memory slices that are allocated to the virtual machine as indicated by the accessed memory class object (block 170). The memory class object may be accessed as needed (returning to block 110). [0056] In accordance with an example of a method for dynamic allocation of memory resources, a computer program application stored in a computer-readable medium (e.g., register memory, processor cache, RAM, ROM, hard drive, flash memory, CD ROM, magnetic media, etc.) may include code or executable instructions that when executed may instruct or cause a controller or processor to perform methods discussed herein, such as an example of a method for dynamic memory allocation. The computer-readable medium may be a non-transitory computer-readable media including all forms and types of computer-readable media except for a transitory, propagating signal.

Claims

We claim:
1. A method comprising calling a function of a memory class object to cause access to a value in a memory table of the memory class object so as to dynamically allocate a memory for access by an operating system, the memory class object representing the memory, and the value corresponding to a property of a memory slice selected from a plurality of memory slices into which the memory is partitioned.
2. The method of claim 1 , wherein the operating system is an operating system of a virtual machine, and wherein the memory is configured to be shared by a plurality of virtual machines.
3. The method of claim 1 , wherein the value indicates whether or not the selected memory slice is accessible by the operating system.
4. The method of claim 3, wherein calling the function to cause access to the value comprises causing a change in the value to dynamically add the selected memory slice.
5. The method of claim 3, wherein calling the function to cause access to the value comprises causing a change in the value to dynamically eject the selected memory slice.
6. The method of claim 1 , wherein calling the function to cause access to the value comprises obtaining a representation of the memory table.
7. The method of claim 1 , wherein calling the function to cause access to the value comprises changing the value to indicate that the selected memory slice is not ejectable.
8. The method of claim 1 , wherein calling the function to cause access to the value comprises requesting a host system to provide access to the value.
9. A non-transitory computer readable storage medium having stored thereon instructions that when executed by a processor will cause the processor to perform the method of: accessing a memory class object, the object representing a memory, the object
including a memory table that includes a plurality of values, each value indicating a property of each memory slice of a corresponding plurality of memory slices of the memory, the object including a function that is callable to enable access to a value of said plurality of values; calling the function to cause access a value of said plurality of values that corresponds to a selected memory slice of said plurality of memory slices.
10. The non-transitory computer readable storage medium of claim 9, wherein calling the function comprises causing access to the value to dynamically add the selected memory slice.
11. The non-transitory computer readable storage medium of claim 9, wherein calling the function comprises causing access to the value to dynamically eject the selected memory slice.
12. The non-transitory computer readable storage medium of claim 11 , wherein the method further comprises calling a function of the memory class object to move data from the selected memory slice to another accessible memory slice prior to dynamically ejecting the selected memory slice.
13. The non-transitory computer readable storage medium of claim 9, wherein calling the function comprises accessing a representation of the memory table.
14. A system comprising: a memory; a processing unit in communication with a computer readable medium, wherein the
computer readable medium contains a set of instructions wherein the processing unit is designed to carry out the set of instructions to: create a memory class object that represents the memory, the object including a
memory table that includes a plurality of values, each value indicating a property of each memory slice of a corresponding plurality of memory slices of the represented memory, the object including a function that is callable to enable access to a value of said plurality of values, the memory class object including a hardware identifier that identifies the memory as being partitionable into slices that are capable of dynamic allocation, and including a compatible identifier that identifies the memory as a memory; access the memory class object; in the event that the hardware identifier is recognizable, call the function to cause
access a value of said plurality of values that corresponds to a selected memory slice of said plurality of memory slices; in the event that the hardware identifier is not recognizable, access the compatible
identifier to identify the memory.
15. The system of claim 14, wherein the processing unit is a processing unit of a host system, the host system being configured to host a plurality of virtual machines, wherein an operating system of each virtual machine is configured to carry out the set of instructions.
PCT/US2012/034891 2012-04-25 2012-04-25 Dynamic memory allocation WO2013162531A1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201280072698.7A CN104272273A (en) 2012-04-25 2012-04-25 Dynamic memory allocation
PCT/US2012/034891 WO2013162531A1 (en) 2012-04-25 2012-04-25 Dynamic memory allocation
EP12874965.2A EP2842039A4 (en) 2012-04-25 2012-04-25 Dynamic memory allocation
US14/396,383 US20150127916A1 (en) 2012-04-25 2012-04-25 Dynamic memory allocation
TW102114416A TWI506538B (en) 2012-04-25 2013-04-23 Dynamic memory allocation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/US2012/034891 WO2013162531A1 (en) 2012-04-25 2012-04-25 Dynamic memory allocation

Publications (1)

Publication Number Publication Date
WO2013162531A1 true WO2013162531A1 (en) 2013-10-31

Family

ID=49483640

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2012/034891 WO2013162531A1 (en) 2012-04-25 2012-04-25 Dynamic memory allocation

Country Status (5)

Country Link
US (1) US20150127916A1 (en)
EP (1) EP2842039A4 (en)
CN (1) CN104272273A (en)
TW (1) TWI506538B (en)
WO (1) WO2013162531A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201504937A (en) * 2013-07-31 2015-02-01 Ibm Virtual storage devices formed by selected partitions of a physical storage device
US11030105B2 (en) * 2014-07-14 2021-06-08 Oracle International Corporation Variable handles
US20170060736A1 (en) * 2015-12-09 2017-03-02 Mediatek Inc. Dynamic Memory Sharing
US10430249B2 (en) * 2016-11-02 2019-10-01 Red Hat Israel, Ltd. Supporting quality-of-service for virtual machines based on operational events
US20190286327A1 (en) * 2018-03-15 2019-09-19 Apple Inc. Memory Objects
US11086686B2 (en) * 2018-09-28 2021-08-10 International Business Machines Corporation Dynamic logical partition provisioning

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6026462A (en) * 1993-06-01 2000-02-15 International Business Machines Corporation Main storage and expanded storage reassignment facility
KR20070100367A (en) * 2005-02-17 2007-10-10 인텔 코오퍼레이션 Method, apparatus and system for dynamically reassigning memory from one virtual machine to another
US20090113422A1 (en) * 2007-10-31 2009-04-30 Toshimitsu Kani Dynamic allocation of virtual machine devices
US20090216519A1 (en) 2008-02-25 2009-08-27 Mohan Parthasarathy Data Processing System And Method
KR20120000089A (en) * 2009-03-20 2012-01-03 휴렛트-팩카드 캄파니 Inter operating system memory hotswap to support memory growth in a non-virtualized system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6983463B1 (en) * 1998-10-02 2006-01-03 Microsoft Corporation Network independent profiling of applications for automatic partitioning and distribution in a distributed computing environment
US7565398B2 (en) * 2002-06-27 2009-07-21 International Business Machines Corporation Procedure for dynamic reconfiguration of resources of logical partitions
US7509392B2 (en) * 2005-03-24 2009-03-24 International Business Machines Corporation Creating and removing application server partitions in a server cluster based on client request contexts
US7409489B2 (en) * 2005-08-03 2008-08-05 Sandisk Corporation Scheduling of reclaim operations in non-volatile memory
US8516037B2 (en) * 2008-06-16 2013-08-20 International Business Machines Corporation Methods for dynamic partitioning of applications in client-server environments
US8296526B2 (en) * 2009-06-17 2012-10-23 Mediatek, Inc. Shared memory having multiple access configurations
US8935317B2 (en) * 2010-06-23 2015-01-13 Microsoft Corporation Dynamic partitioning of applications between clients and servers

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6026462A (en) * 1993-06-01 2000-02-15 International Business Machines Corporation Main storage and expanded storage reassignment facility
KR20070100367A (en) * 2005-02-17 2007-10-10 인텔 코오퍼레이션 Method, apparatus and system for dynamically reassigning memory from one virtual machine to another
US20090113422A1 (en) * 2007-10-31 2009-04-30 Toshimitsu Kani Dynamic allocation of virtual machine devices
EP2056199A2 (en) 2007-10-31 2009-05-06 Hewlett-packard Development Company, L. P. Dynamic allocation of virtual machine devices
US20090216519A1 (en) 2008-02-25 2009-08-27 Mohan Parthasarathy Data Processing System And Method
KR20120000089A (en) * 2009-03-20 2012-01-03 휴렛트-팩카드 캄파니 Inter operating system memory hotswap to support memory growth in a non-virtualized system

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
HEWLETT-PACKARD CORPORATION ET AL., ADVANCED CONFIGURATION AND POWER INTERFACE SPECIFICATION - REVISION 5.0, 6 December 2011 (2011-12-06), pages 1 - 67, Retrieved from the Internet <URL:http://acpi.info/DOWNLOADS/ACPIspec50.pdf>
JOEL SCHOPP ET AL.: "Hotplug Memory Redux", PROCEEDINGS OF THE LINUX SYMPOSIUM, vol. 2, 1 July 2005 (2005-07-01), pages 1 - 24, XP055223302, Retrieved from the Internet <URL:http://landley.net/kdocs/mirror/ols2005v2.pdf#page=159>
See also references of EP2842039A4
WEIMING ZHAO ET AL.: "Dynamic memory balancing for virtual machines", EE'09: PROCEEDINGS OF THE 2009 ACM SIGPLAN/SIGOPS INTERNATIONAL CONFERENCE ON VIRTUAL EXECUTION ENVIRONMENTS, 13 March 2009 (2009-03-13), pages 21 - 30, XP007911487

Also Published As

Publication number Publication date
TW201351270A (en) 2013-12-16
EP2842039A1 (en) 2015-03-04
EP2842039A4 (en) 2015-12-09
US20150127916A1 (en) 2015-05-07
CN104272273A (en) 2015-01-07
TWI506538B (en) 2015-11-01

Similar Documents

Publication Publication Date Title
US11243707B2 (en) Method and system for implementing virtual machine images
JP5510556B2 (en) Method and system for managing virtual machine storage space and physical hosts
KR102269452B1 (en) Supporting multiple operating system environments in computing device without contents conversion
CN107209683B (en) Backup image restore
US20150127916A1 (en) Dynamic memory allocation
EP3502877A1 (en) Data loading method and device
EP2940615A1 (en) Method and apparatus for isolating management virtual machine
CN110908609B (en) Method, system and equipment for processing disk and readable storage medium
JP2014520346A5 (en)
CN108073423B (en) Accelerator loading method and system and accelerator loading device
CN109960569B (en) Virtualization processing method and device
CN112596950A (en) Virtual machine data backup method, device, equipment and storage medium
CN115480931A (en) Inter-core communication processing method and device and computer system
CN107832097B (en) Data loading method and device
JP5966466B2 (en) Backup control method and information processing apparatus
US9864609B1 (en) Rebooting a hypervisor without disrupting or moving an associated guest operating system
CN112711469A (en) Cloud host migration method and device, computer equipment and storage medium
JP2012079245A (en) Volume assignment method of virtual machine and computer system using method thereof
CN107766122B (en) Method and device for setting available memory space of host machine
CN107341073B (en) Method and device for realizing compatibility of container host and virtual host image file
JP2016173741A (en) Information processing apparatus, information processing method, and program
CN103729233A (en) Multiple virtual machines management method and device
CN109933409B (en) Docker data saving method and system, electronic device and computer readable storage medium
US20160139850A1 (en) Managing method of storage device, computer system and storage medium
CN114356231B (en) Data processing method, device and computer storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12874965

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012874965

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 14396383

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE