TW201810042A - Memory management system and method thereof - Google Patents

Memory management system and method thereof Download PDF

Info

Publication number
TW201810042A
TW201810042A TW105127132A TW105127132A TW201810042A TW 201810042 A TW201810042 A TW 201810042A TW 105127132 A TW105127132 A TW 105127132A TW 105127132 A TW105127132 A TW 105127132A TW 201810042 A TW201810042 A TW 201810042A
Authority
TW
Taiwan
Prior art keywords
memory
host
host device
resource allocation
memory management
Prior art date
Application number
TW105127132A
Other languages
Chinese (zh)
Other versions
TWI619013B (en
Inventor
胡嘉真
陳懷恩
Original Assignee
康齊科技股份有限公司
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 康齊科技股份有限公司 filed Critical 康齊科技股份有限公司
Priority to TW105127132A priority Critical patent/TWI619013B/en
Publication of TW201810042A publication Critical patent/TW201810042A/en
Application granted granted Critical
Publication of TWI619013B publication Critical patent/TWI619013B/en

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Disclosed is a memory management system and method thereof. The memory management system is configured on a mother board to assist a central processing unit to manage the memory accesses by a device system. The central processing unit is connected to a memory block. The device system comprises a plurality of host devices. The memory management system is configured to: set the number of the host devices of the device system; provide a device code for each host device; set the memory size for the memory block; and distribute the memory for each host device to access and accordingly generate an allocate table. When one host device sends a request to the central processing unit for accessing data, the central processing unit replies the host device according to the allocate table, such that the host device can read data from or write data in the memory block.

Description

記憶體管理系統及其方法 Memory management system and method thereof

本發明乃是關於一種記憶體管理系統及其方法,特別是指一種用以輔助一伺服器中的中央處理器對一裝置系統進行記憶體管理之記憶體管理系統及其方法。 The present invention relates to a memory management system and method thereof, and more particularly to a memory management system and method for assisting a central processor in a server to perform memory management on a device system.

隨著電腦硬體裝置的成本越來越降低以及大型伺服器的需求越來越高,虛擬裝置也越來越被重視。虛擬裝置可視為一種介面,應用於一軟體與電腦系統之間,並可提供此電腦系統的各種資源給上述軟體使用。此軟體通常為一作業系統,因此,作業系統可以透過虛擬裝置來存取電腦系統上的資源。然而,在一電腦系統上可以安裝多個虛擬裝置,每個虛擬裝置上可安裝不同的作業系統。舉例來說,微軟的Windows作業系統與Linux作業系統便可同時安裝在一個電腦系統上不同的虛擬裝置中。簡言之,虛擬裝置必是一種主機裝置。而為了滿足使用者不同的工作需求,不同的主機裝置可能用以進行不同的工作。因此,該如何有效地將電腦系統上的資源(尤其是記憶體)依照不同使用者的多種工作需求分配給不同的主機裝置為目前仍存在討論空間的問題。 As the cost of computer hardware devices has decreased and the demand for large servers has increased, virtual devices have become more and more important. The virtual device can be regarded as an interface between a software and a computer system, and can provide various resources of the computer system to the software. This software is usually an operating system, so the operating system can access resources on the computer system through the virtual device. However, multiple virtual devices can be installed on a single computer system, and different operating systems can be installed on each virtual device. For example, Microsoft's Windows operating system and Linux operating system can be installed simultaneously on different virtual devices on a computer system. In short, a virtual device must be a host device. In order to meet the different work needs of users, different host devices may be used to perform different tasks. Therefore, how to effectively allocate resources (especially memory) on a computer system to different host devices according to various job requirements of different users is still a problem of discussion space.

本發明實施例提供一種記憶體管理方法,用以輔助伺服器中的中央處理器進行對一裝置系統進行記憶體管理。中央處理器連 接一記憶體區塊,且該裝置系統設置有複數個主機裝置。此記憶體管理方法包括:設定設置於裝置系統中之主機裝置的數量;提供裝置代碼予每一主機裝置;設定記憶體區塊之記憶體容量大小;以及設定每一主機裝置所能使用之記憶體容量,並據以建立一資源分配表。當主機裝置向中央處理器請求進行資料存讀取時,中央處理器根據該資源分配表回應主機裝置,使得主機裝置能使用記憶體區塊進行資料存讀取。 Embodiments of the present invention provide a memory management method for assisting a central processing unit in a server to perform memory management on a device system. Central processor A memory block is connected, and the device system is provided with a plurality of host devices. The memory management method includes: setting a number of host devices installed in the device system; providing a device code to each host device; setting a memory capacity size of the memory block; and setting a memory usable by each host device Body capacity, and based on which to establish a resource allocation table. When the host device requests the central processor to perform data storage, the central processor responds to the host device according to the resource allocation table, so that the host device can use the memory block to perform data storage.

本發明實施例亦提供一種記憶體管理系統,設置於伺服器之主機板,用以輔助伺服器中的中央處理器對一裝置系統進行記憶體管理。中央處理器連接一記憶體區塊,且該裝置系統設置有複數個主機裝置。記憶體管理系統包括記憶體分配模組與實體資源協定模組,且實體資源協定模組連接於記憶體分配模組與裝置系統之複數個主機裝置之間。記憶體分配模組係用以:設定設置於裝置系統中之主機裝置的數量;提供裝置代碼予每一主機裝置;設定記憶體區塊之記憶體容量大小;以及設定每一主機裝置所能使用之記憶體容量,並據以建立一資源分配表。當主機裝置發送一請求信號以進行資料存讀取時,實體資源協定模組將該請求信號進行格式轉換後傳送至中央處理器。接著,中央處理器根據該資源分配表回應主機裝置之請求信號,使得主機裝置能使用記憶體區塊進行資料存讀取。 The embodiment of the present invention also provides a memory management system, which is disposed on a motherboard of the server to assist the central processor in the server to perform memory management on a device system. The central processing unit is connected to a memory block, and the device system is provided with a plurality of host devices. The memory management system includes a memory distribution module and an entity resource agreement module, and the physical resource agreement module is connected between the memory distribution module and a plurality of host devices of the device system. The memory distribution module is configured to: set the number of host devices installed in the device system; provide the device code to each host device; set the memory capacity of the memory block; and set the use of each host device The memory capacity and the establishment of a resource allocation table. When the host device sends a request signal for reading the data, the physical resource agreement module formats the request signal and transmits the signal to the central processing unit. Then, the central processing unit responds to the request signal of the host device according to the resource allocation table, so that the host device can use the memory block to perform data storage reading.

綜上所述,本發明所提供之記憶體管理系統及其方法主要的目的便是在於輔助中央處理器將記憶體資源予裝置系統中的主機裝置使用。同時,此種記憶體管理系統系直接設置於主機板上,也就是說,透過本發明,依照客戶端/企業端的需求客製化出一個記憶體管理系統後,只要將其設置於客戶端/企業端之伺服器主機板上,便可輔助中央處理器將記憶體資源予裝置系統中的主機裝置使用。 In summary, the main purpose of the memory management system and method of the present invention is to assist the central processing unit in using memory resources for host devices in the device system. At the same time, the memory management system is directly disposed on the motherboard. That is to say, after the memory management system is customized according to the requirements of the client/enterprise, as long as it is set on the client/ The server board on the enterprise side can assist the central processor to use the memory resources to the host device in the device system.

為使能更進一步瞭解本發明之特徵及技術內容,請參閱以下有關本發明之詳細說明與附圖,但是此等說明與所附圖式僅係用來說明本發明,而非對本發明的權利範圍作任何的限制。 The detailed description of the present invention and the accompanying drawings are to be understood by the claims The scope is subject to any restrictions.

100‧‧‧記憶體管理方法 100‧‧‧ memory management method

S101~S106‧‧‧步驟 S101~S106‧‧‧Steps

M‧‧‧記憶體區塊 M‧‧‧ memory block

V‧‧‧裝置系統 V‧‧‧ device system

VM1、VM2…VMn‧‧‧主機裝置 VM1, VM2...VMn‧‧‧ host device

B‧‧‧主機板 B‧‧‧ motherboard

3‧‧‧記憶體管理系統 3‧‧‧Memory Management System

30‧‧‧中央處理器 30‧‧‧Central processor

32‧‧‧記憶體分配模組 32‧‧‧Memory Distribution Module

34‧‧‧實體資源協定模組 34‧‧‧Physical Resource Agreement Module

圖1為根據本發明例示性實施例所繪示之記憶體管理方法之流程圖。 FIG. 1 is a flow chart of a memory management method according to an exemplary embodiment of the invention.

圖2為根據本發明例示性實施例所繪示之資源分配表的示意圖。 2 is a schematic diagram of a resource allocation table according to an exemplary embodiment of the present invention.

圖3為根據本發明例示性實施例所繪示之記憶體管理系統之方塊圖。 3 is a block diagram of a memory management system in accordance with an exemplary embodiment of the present invention.

在下文將參看隨附圖式更充分地描述各種例示性實施例,在隨附圖式中展示一些例示性實施例。然而,本發明概念可能以許多不同形式來體現,且不應解釋為限於本文中所闡述之例示性實施例。確切而言,提供此等例示性實施例使得本發明將為詳盡且完整,且將向熟習此項技術者充分傳達本發明概念的範疇。在諸圖式中,類似數字始終指示類似元件。 Various illustrative embodiments are described more fully hereinafter with reference to the accompanying drawings. However, the inventive concept may be embodied in many different forms and should not be construed as being limited to the illustrative embodiments set forth herein. Rather, these exemplary embodiments are provided so that this invention will be in the In the figures, like numerals are used to indicate like elements.

〔記憶體管理方法的實施例〕 [Embodiment of Memory Management Method]

本實施例所提供之記憶體管理方法主要是用以輔助客戶端或企業端的伺服器中的中央處理器對其所使用的裝置系統進行記憶體管理,以下將進行較詳細的說明。 The memory management method provided in this embodiment is mainly used to assist the central processing unit in the server of the client or the enterprise to perform memory management on the device system used by the client, which will be described in more detail below.

請先參照圖1,圖1為根據本發明例示性實施例所繪示之記憶體管理方法之流程圖。如圖1所示,本實施例所提之記憶體管理方法100主要是透過以下步驟具體實現:步驟S101:設定設置於裝置系統中之主機裝置的數量;步驟S102:提供裝置代碼予每一主機裝置;步驟S103:設定記憶體區塊之記憶體容量大小;步驟S104: 將記憶體區塊劃分為複數個記憶體子區塊;步驟S105:設定每一主機裝置所能使用之記憶體容量,並據以建立資源分配表;以及步驟S106:當主機裝置向中央處理器請求進行資料存讀取時,中央處理器根據資源分配表與主機裝置之裝置代碼回應主機裝置,以允許主機裝置使用複數個記憶體子區塊之一來進行資料存讀取。 Please refer to FIG. 1. FIG. 1 is a flowchart of a memory management method according to an exemplary embodiment of the present invention. As shown in FIG. 1 , the memory management method 100 in this embodiment is mainly implemented by the following steps: Step S101: setting the number of host devices set in the device system; Step S102: providing device code to each host Device S203: setting the memory capacity size of the memory block; step S104: Dividing the memory block into a plurality of memory sub-blocks; Step S105: setting a memory capacity that can be used by each host device, and establishing a resource allocation table; and step S106: when the host device is directed to the central processor When requesting to perform data storage, the central processing unit responds to the host device according to the resource allocation table and the device code of the host device, to allow the host device to use one of the plurality of memory sub-blocks to perform data storage reading.

進一步說明,於步驟S101中,針對客戶端或企業端的不同需求,將設定其所使用的裝置系統中主機裝置的數量。於此所述之裝置系統即係於客戶端或企業端的伺服器上設置多個主機裝置,裝置系統中的每一主機裝置可以被提供給一個使用者使用。當使用者使用主機裝置機器時,將需要存取伺服器的實體資源,且於本實施例中,伺服器的實體資源即為記憶體。 Further, in step S101, the number of host devices in the device system used by the client or the enterprise terminal is set. The device system described herein is a plurality of host devices set on a client or enterprise server, and each host device in the device system can be provided to a user. When the user uses the host device machine, the physical resource of the server needs to be accessed, and in this embodiment, the physical resource of the server is the memory.

接著,於步驟S102中,裝置系統中的每一個主機裝置會被給予一個裝置代碼。舉例來說,若於步驟S102中所設定之主機裝置的數量為8,則於步驟S102中,裝置系統中的這八個主機裝置會被給予0~7的裝置代碼,但本發明對於裝置代碼的實施方式並不限制。 Next, in step S102, each host device in the device system is given a device code. For example, if the number of host devices set in step S102 is 8, then in step S102, the eight host devices in the device system are given device codes of 0-7, but the present invention is for device codes. The implementation is not limited.

接下來,於步驟S103中,將設定記憶體區塊之記憶體容量大小。此記憶體區塊即為前述伺服器的實體資源。於本實施例中,記憶體區塊係為雙倍資料率同步動態隨機存取記憶體(Double Data Rate Synchronous Dynamic Random Access Memory;DDR SDRAM)。為便於後續說明,於此步驟中,係將記憶體區塊之記憶體容量大小設定為512GB。此外,於步驟S104中,會進一步將記憶體區塊劃分為複數個記憶體子區塊。也就是說,於此步驟中,記憶體容量大小為512GB的記憶體區塊將進一步被區分成複數個記憶體子區塊。這些記憶體子區塊之記憶體容量大小可為1GB、2GB、4GB、8GB、16GB…等,以此類推。於是,記憶體子區塊 會具有不同的記憶體容量大小,且可能產生多個相同記憶體容量大小之記憶體子區塊。 Next, in step S103, the memory capacity size of the memory block is set. This memory block is the physical resource of the aforementioned server. In this embodiment, the memory block is a Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM). For the convenience of the following description, in this step, the memory capacity of the memory block is set to 512 GB. In addition, in step S104, the memory block is further divided into a plurality of memory sub-blocks. That is to say, in this step, the memory block having a memory capacity of 512 GB will be further divided into a plurality of memory sub-blocks. The memory capacity of these memory sub-blocks can be 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, etc., and so on. Thus, the memory sub-block There will be different memory capacity sizes, and it is possible to generate a plurality of memory sub-blocks of the same memory capacity.

前述將記憶體區塊劃分為複數個記憶體子區塊之步驟S104主要係以客戶端或企業端可能分別使用不同的主機裝置來進行不同的工作內容為考量。當記憶體區塊被區分成複數個記憶體容量大小為1GB、2GB、4GB、8GB、16GB…等的記憶體子區塊後,於步驟S105中,將設定每一主機裝置所能使用之記憶體容量。須說明地是,每一主機裝置被設定之能使用的記憶體容量係對應於記憶體子區塊的記憶體容量大小,承上例,每一主機裝置能使用的記憶體容量須為1GB、2GB、4GB、8GB或16GB…等。 The step S104 of dividing the memory block into a plurality of memory sub-blocks is mainly based on the fact that the client or the enterprise may separately use different host devices to perform different work contents. After the memory block is divided into a plurality of memory sub-blocks having a memory capacity of 1 GB, 2 GB, 4 GB, 8 GB, 16 GB, etc., in step S105, the memory usable by each host device is set. Body capacity. It should be noted that the memory capacity that can be used for each host device corresponds to the memory capacity of the memory sub-block. According to the above example, the memory capacity of each host device must be 1 GB. 2GB, 4GB, 8GB or 16GB...etc.

於步驟S105中,還會建立一資源分配表,此資源分配表主要紀錄有每一主機裝置之裝置代碼與每一主機裝置所分配到之記憶體容量的對應關係。請參照圖2,圖2為根據本發明例示性實施例所繪示之資源分配表的示意圖。根據圖2所示之資源分配表,裝置代碼為「0」的主機裝置所分配到的記憶體容量為16GB,裝置代碼為「1」的主機裝置所分配到的記憶體容量為64GB,裝置代碼為「7」的主機裝置所分配到的記憶體容量為2GB。然而,圖2所示之資源分配表中記憶體的分配方式僅用以舉例說明本實施例所提供之記憶體管理方法中的資源分配表,並不用以限制本發明。另外,於本實施例中,資源分配表還紀錄有所設定之記憶體區塊之記憶體容量大小(即,於圖2中,紀錄有所設定之記憶體區塊之記憶體容量大小為512GB),以及裝置系統中之主機裝置的數量(即,於圖2中,紀錄有裝置系統中之主機裝置的數量為8)。 In step S105, a resource allocation table is further established, and the resource allocation table mainly records the correspondence between the device code of each host device and the memory capacity allocated by each host device. Please refer to FIG. 2. FIG. 2 is a schematic diagram of a resource allocation table according to an exemplary embodiment of the present invention. According to the resource allocation table shown in FIG. 2, the memory capacity allocated to the host device having the device code of "0" is 16 GB, and the memory capacity allocated to the host device having the device code "1" is 64 GB, and the device code is The memory capacity allocated to the "7" host device is 2 GB. However, the allocation manner of the memory in the resource allocation table shown in FIG. 2 is only used to exemplify the resource allocation table in the memory management method provided in this embodiment, and is not intended to limit the present invention. In addition, in this embodiment, the resource allocation table also records the memory capacity of the set memory block (ie, in FIG. 2, the memory capacity of the memory block set by the record is 512 GB. And the number of host devices in the device system (i.e., in Figure 2, the number of host devices recorded in the device system is 8).

最後,於步驟S106中,當使用者操作裝置系統中一主機裝置進行工作時,此主機裝置會向中央處理器請求進行資料存讀取。此時,中央處理器便會辨識此主機裝置之裝置代碼,以根據前述資源分配表與辨識出的裝置代碼來回應此主機裝置。此處所指的回應動作係為允許此主機裝置使用複數個記憶體子區塊之一來進 行資料存讀取,其中此主機裝置被允許使用的記憶體子區塊的記憶體容量大小決定於前述資源分配表中所記錄之內容。此外如前述,記憶體子區塊會具有不同的記憶體容量大小,但也可能產生多個相同記憶體容量大小之記憶體子區塊。因此,於資源分配表所紀錄的內容中,不同的裝置代碼可以被分配到相同的記憶體容量大小。 Finally, in step S106, when the user operates a host device in the device system to operate, the host device requests the central processor to perform data storage. At this time, the central processor recognizes the device code of the host device to respond to the host device according to the foregoing resource allocation table and the identified device code. The response action referred to here is to allow the host device to use one of the plurality of memory sub-blocks. The data storage is read, wherein the memory capacity of the memory sub-block that the host device is allowed to use is determined by the content recorded in the foregoing resource allocation table. In addition, as described above, the memory sub-blocks may have different memory capacity sizes, but it is also possible to generate a plurality of memory sub-blocks of the same memory capacity. Therefore, in the content recorded in the resource allocation table, different device codes can be assigned to the same memory capacity size.

值得注意地是,於本實施例中,裝置系統可為實體裝置系統或虛擬裝置系統。也就是說,本實施例所提供之記憶體管理方法可以應用於建立有多個虛擬裝置的虛擬裝置系統。於此所指的虛擬裝置即為一般所稱的虛擬機器(Virtual Machine;VM)。 Notably, in this embodiment, the device system may be a physical device system or a virtual device system. That is to say, the memory management method provided by this embodiment can be applied to a virtual device system in which a plurality of virtual devices are established. The virtual device referred to herein is a virtual machine (VM) generally referred to as a virtual machine.

〔記憶體管理系統的一實施例〕 [An embodiment of a memory management system]

本實施例提供了一種用以執行前述實施例之記憶體管理系統。請參照圖3,圖3為根據本發明例示性實施例所繪示之記憶體管理系統之方塊圖。 This embodiment provides a memory management system for performing the foregoing embodiments. Please refer to FIG. 3. FIG. 3 is a block diagram of a memory management system according to an exemplary embodiment of the present invention.

本實施例所提供之記憶體管理系統3主要用以輔助伺服器之中央處理器30對其所使用的裝置系統V進行記憶體管理。如圖3所示,主機板B上的中央處理器30連接有一記憶體區塊M,且裝置系統V包括有複數個主機裝置VM1、VM2…VMn,其中n為一正整數。於本實施例中,記憶體區塊亦為雙倍資料率同步動態隨機存取記憶體(Double Data Rate Synchronous Dynamic Random Access Memory;DDR SDRAM),且裝置系統V中所包含的主機裝置數量(即,n的值)決定於不同客戶端或企業端的需求。 The memory management system 3 provided in this embodiment is mainly used to assist the central processing unit 30 of the server to perform memory management on the device system V used by the server. As shown in FIG. 3, the central processing unit 30 on the motherboard B is connected to a memory block M, and the device system V includes a plurality of host devices VM1, VM2, ... VMn, where n is a positive integer. In this embodiment, the memory block is also a Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), and the number of host devices included in the device system V (ie, , the value of n) depends on the needs of different clients or enterprises.

本實施例所提供之記憶體管理系統3包括記憶體分配模組32與實體資源協定模組34。記憶體分配模組32與實體資源協定模組34係直接地設置於一伺服器之主機板B上。於本實施例中,實體資源協定模組34可為PCI-E匯流排、單徑I/O虛擬化(Single Root I/O virtualization,SRIOV)匯流排或多徑I/O虛擬化(Multi Root I/O virtualization,MRIOV)匯流排,尤其以單徑I/O虛擬化(Single Root I/O virtualization,SRIOV)匯流排為佳。另外,記憶體分配模組32係以現場可程式化閘陣列(Field-programmable gate array,FPGA)晶片來實現,FPGA晶片為可重複程式設計的晶片,因此本實施例能夠為使用者提供客製化的記憶體管理系統。 The memory management system 3 provided in this embodiment includes a memory allocation module 32 and an entity resource agreement module 34. The memory allocation module 32 and the physical resource agreement module 34 are directly disposed on the motherboard B of a server. In this embodiment, the physical resource agreement module 34 can be a PCI-E bus, a single root I/O virtualization (SRIOV) bus, or a multipath I/O virtualization (Multi Root). I/O virtualization, MRIOV) bus, especially with single-path I/O virtualization (Single Root) I/O virtualization, SRIOV) bus is better. In addition, the memory distribution module 32 is implemented by a field-programmable gate array (FPGA) chip, and the FPGA chip is a reprogrammable chip. Therefore, the embodiment can provide a user-customized system. Memory management system.

進一步說明,透過設計記憶體分配模組32(即,FPGA晶片),便可設定設置於裝置系統V中之主機裝置VM1、VM2…VMn的數量,並提供裝置代碼予每一主機裝置VM1、VM2…VMn。接著,根據客戶端或企業端所需要之記憶體區塊的容量,記憶體分配模組32設定記憶體區塊之記憶體容量,並且將此記憶體區塊劃分為複數個記憶體子區塊(未圖示)。最後,透過設計記憶體分配模組32,便可設定每一主機裝置VM1、VM2…VMn所能使用之記憶體容量,並據以建立一資源分配表。此資源分配表主要紀錄有每一主機裝置之裝置代碼與每一主機裝置所分配到之記憶體容量的對應關係,請復參照圖2與前述實施例中的對應說明,於此針對資源分配表的內容便不再次描述。 Further, by designing the memory allocation module 32 (ie, the FPGA chip), the number of host devices VM1, VM2, . . . VMn disposed in the device system V can be set, and the device code is provided to each of the host devices VM1 and VM2. ...VMn. Then, according to the capacity of the memory block required by the client or the enterprise, the memory allocation module 32 sets the memory capacity of the memory block, and divides the memory block into a plurality of memory sub-blocks. (not shown). Finally, by designing the memory allocation module 32, the memory capacity that can be used by each of the host devices VM1, VM2, ... VMn can be set, and a resource allocation table can be established accordingly. The resource allocation table mainly records the correspondence between the device code of each host device and the memory capacity allocated by each host device. Please refer to FIG. 2 and the corresponding description in the foregoing embodiment, for the resource allocation table. The content will not be described again.

當使用者操作裝置系統V中一主機裝置VM1、VM2…VMn進行工作時,此主機裝置VM1、VM2…VMn會向中央處理器請求進行資料存讀取。此時,中央處理器便會辨識此主機裝置之裝置代碼,以根據前述資源分配表與辨識出的裝置代碼來回應此主機裝置。此處所指的回應動作係為允許此主機裝置使用複數個記憶體子區塊(未圖示)之一來進行資料存讀取,其中此主機裝置VM1、VM2…VMn被允許使用的記憶體子區塊的記憶體容量大小決定於前述資源分配表中所記錄之內容。 When the user operates a host device VM1, VM2 ... VMn in the device system V to operate, the host devices VM1, VM2, ... VMn request the central processor to perform data storage reading. At this time, the central processor recognizes the device code of the host device to respond to the host device according to the foregoing resource allocation table and the identified device code. The response action referred to herein is to allow the host device to use one of a plurality of memory sub-blocks (not shown) for data storage, wherein the host devices VM1, VM2, ... VMn are allowed to use the memory. The size of the memory capacity of the block is determined by the content recorded in the aforementioned resource allocation table.

如前述,記憶體子區塊會具有不同的記憶體容量大小,但也可能產生多個相同記憶體容量大小之記憶體子區塊。因此,於資源分配表所紀錄的內容中,不同的裝置代碼可以被分配到相同的記憶體容量大小。總而言之,於本實施例中,每一主機裝置VM1、VM2…VMn被分配到之記憶體容量必然會等於複數個記憶體子區 塊之一的記憶體容量。因此,記憶體區塊切割成複數個記憶體子區塊的方式係相關於每一主機裝置VM1、VM2…VMn所需或所分配到之記憶體容量。 As mentioned above, the memory sub-blocks will have different memory capacity sizes, but it is also possible to generate a plurality of memory sub-blocks of the same memory capacity. Therefore, in the content recorded in the resource allocation table, different device codes can be assigned to the same memory capacity size. In summary, in this embodiment, the memory capacity allocated to each host device VM1, VM2, ... VMn is necessarily equal to a plurality of memory sub-regions. The memory capacity of one of the blocks. Thus, the manner in which the memory block is cut into a plurality of memory sub-blocks is related to the memory capacity required or allocated by each host device VM1, VM2, ... VMn.

此外須說明地是,於本實施例中,裝置系統V可為實體裝置系統或虛擬裝置系統。也就是說,本實施例所提供之記憶體管理系統可以用以對建立有多個虛擬裝置的虛擬裝置系統來進行記憶體管理。於此所指的虛擬裝置即為一般所稱的虛擬機器(Virtual Machine;VM)。近年來,越來越多企業為了達到簡化管理的目的傾向採用虛擬裝置系統。根據實際的使用需求,不同企業所採用的虛擬裝置系統中的每個虛擬機器均被賦予不同的工作內容,而本發明便是能針對不同企業用戶其實際的使用需求客製化出一套記憶體管理系統以及與其搭配的管理方法,使得任一企業用戶所採用之虛擬裝置系統中的每一個虛擬裝置能夠簡單且有效率地被分配到能夠使用的記憶體資源。 In addition, it should be noted that, in this embodiment, the device system V may be a physical device system or a virtual device system. That is to say, the memory management system provided in this embodiment can be used for memory management on a virtual device system in which a plurality of virtual devices are established. The virtual device referred to herein is a virtual machine (VM) generally referred to as a virtual machine. In recent years, more and more companies have adopted a virtual device system in order to achieve simplified management. According to the actual use requirements, each virtual machine in the virtual device system adopted by different enterprises is given different work contents, and the present invention can customize a set of memories for different practical needs of different enterprise users. The volume management system and the management method associated therewith enable each virtual device in the virtual device system employed by any enterprise user to be easily and efficiently allocated to usable memory resources.

〔實施例的可能功效〕 [Possible effects of the examples]

綜上所述,本發明所提供之記憶體管理方法及其系統能夠輔助一伺服器之中央處理器對其所使用的裝置系統進行記憶體管理。本發明所提供之記憶體管理方法及其系統能夠根據使用者的需求被客製化,且本發明所提供之記憶體管理系統係直接地被設置於伺服器的主機板上,使得使用者能針對裝置系統中不同工作內容的主機裝置來獲得適用的記憶體管理系統,且只要將此記憶體管理系統設置於伺服器的主機板上運作。 In summary, the memory management method and system thereof provided by the present invention can assist a central processor of a server to perform memory management on the device system used by the server. The memory management method and system thereof provided by the present invention can be customized according to the needs of the user, and the memory management system provided by the present invention is directly disposed on the motherboard of the server, so that the user can A suitable memory management system is obtained for the host device of different working contents in the device system, and the memory management system is set to operate on the server board of the server.

以上所述僅為本發明之實施例,其並非用以侷限本發明之專利範圍。 The above description is only an embodiment of the present invention, and is not intended to limit the scope of the invention.

Claims (10)

一種記憶體管理方法,用以輔助一伺服器之一中央處理器進行一裝置系統之記憶體管理,該伺服器之該中央處理器連接一記憶體區塊,且該裝置系統設置有複數個主機裝置,該記憶體管理方法包括:設定設置於該裝置系統中之該主機裝置的數量;提供一裝置代碼予每一該主機裝置;設定該記憶體區塊之記憶體容量大小;以及設定每一該主機裝置所能使用之記憶體容量,並據以建立一資源分配表;其中,當該主機裝置向該中央處理器請求進行資料存讀取時,該中央處理器根據該資源分配表回應該主機裝置,使得該主機裝置能使用該記憶體區塊進行資料存讀取。 A memory management method for assisting a central processing unit of a server to perform memory management of a device system, the central processing unit of the server is connected to a memory block, and the device system is provided with a plurality of hosts The device management method includes: setting a quantity of the host device disposed in the device system; providing a device code to each of the host devices; setting a memory capacity of the memory block; and setting each a memory capacity that can be used by the host device, and a resource allocation table is established; wherein, when the host device requests the central processor to perform data storage, the central processor responds according to the resource allocation table The host device enables the host device to use the memory block for data storage. 如請求項1所述之記憶體管理方法,其中該資源分配表紀錄有每一該主機裝置之該裝置代碼與每一該主機裝置所分配到之記憶體容量的對應關係。 The memory management method of claim 1, wherein the resource allocation table records a correspondence between the device code of each host device and a memory capacity allocated by each of the host devices. 如請求項1所述之記憶體管理方法,更包括:將該記憶體區塊劃分為複數個記憶體子區塊;其中,當該主機裝置向該中央處理器請求進行資料存讀取時,該中央處理器根據該資源分配表與該主機裝置之該裝置代碼回應該主機裝置,以允許該主機裝置使用該複數個記憶體子區塊之一來進行資料存讀取,且被允許使用之該複數個記憶體子區塊之一的記憶體容量等於該主機裝置所分配到之記憶體容量。 The memory management method of claim 1, further comprising: dividing the memory block into a plurality of memory sub-blocks; wherein, when the host device requests the central processor to perform data storage, The central processor responds to the host device according to the resource allocation table and the device code of the host device, to allow the host device to use one of the plurality of memory sub-blocks to perform data storage, and is allowed to use. The memory capacity of one of the plurality of memory sub-blocks is equal to the memory capacity allocated by the host device. 如請求項1所述之記憶體管理方法,其中該資源分配表還紀錄有所設定之該記憶體區塊之記憶體容量大小,以及該裝置系統中之該主機裝置的數量。 The memory management method of claim 1, wherein the resource allocation table further records a memory capacity size of the memory block that is set, and a number of the host devices in the device system. 如請求項1所述之記憶體管理方法,其中該裝置系統為一虛擬裝置系統,設置有複數個虛擬主機裝置。 The memory management method according to claim 1, wherein the device system is a virtual device system, and a plurality of virtual host devices are disposed. 一種記憶體管理系統,設置於一伺服器之一主機板,用以輔助該伺服器之一中央處理器進行一裝置系統之記憶體管理,該伺服器之該中央處理器連接一記憶體區塊,且該裝置系統設置有複數個主機裝置,該記憶體管理系統包括:一記憶體分配模組,用以:設定設置於該裝置系統中之該主機裝置的數量;提供一裝置代碼予每一該主機裝置;設定該記憶體區塊之記憶體容量大小;以及設定每一該主機裝置所能使用之記憶體容量,並據以建立一資源分配表;以及一實體資源協定模組,連接於該記憶體分配模組與該裝置系統之該複數個主機裝置之間;其中,該主機裝置發送一請求信號以進行資料存讀取時,該實體資源協定模組將該請求信號進行格式轉換後傳送至該中央處理器,該中央處理器根據該資源分配表回應該主機裝置之該請求信號,使得該主機裝置能使用該記憶體區塊進行資料存讀取。 A memory management system is provided on a motherboard of a server for assisting a central processing unit of the server to perform memory management of a device system, wherein the central processing unit of the server is connected to a memory block And the device system is provided with a plurality of host devices, the memory management system includes: a memory distribution module, configured to: set the number of the host devices disposed in the device system; provide a device code for each a host device; setting a memory capacity of the memory block; setting a memory capacity that can be used by each of the host devices, and establishing a resource allocation table; and an entity resource agreement module The memory distribution module and the plurality of host devices of the device system; wherein, when the host device sends a request signal to perform data storage, the physical resource agreement module performs format conversion on the request signal Transmitting to the central processor, the central processor responds to the request signal of the host device according to the resource allocation table, so that the host device Using this data memory blocks were kept reading. 如請求項6所述之記憶體管理系統,其中該資源分配表紀錄有每一該主機裝置之該裝置代碼與每一該主機裝置所分配到之記憶體容量的對應關係。 The memory management system of claim 6, wherein the resource allocation table records a correspondence between the device code of each of the host devices and the memory capacity allocated by each of the host devices. 如請求項6所述之記憶體管理系統,其中該記憶體分配模組更用以:將該記憶體區塊劃分為複數個記憶體子區塊;其中,該主機裝置發送該請求信號以進行資料存讀取時,該實體資源協定模組將該請求信號進行格式轉換後傳送至該 中央處理器,該中央處理器根據該資源分配表與該主機裝置之該裝置代碼回應該主機裝置之該請求信號,以允許該主機裝置使用該複數個記憶體子區塊之一來進行資料存讀取,且被允許使用之該複數個記憶體子區塊之一的記憶體容量等於該主機裝置所分配到之記憶體容量。 The memory management system of claim 6, wherein the memory allocation module is further configured to: divide the memory block into a plurality of memory sub-blocks; wherein the host device sends the request signal to perform When the data is read, the physical resource agreement module converts the request signal into a format and transmits the data to the a central processing unit, the central processor responding to the request signal of the host device according to the resource allocation table and the device code of the host device, to allow the host device to use one of the plurality of memory sub-blocks for data storage The memory capacity of one of the plurality of memory sub-blocks that are read and allowed to be used is equal to the memory capacity allocated by the host device. 如請求項6所述之記憶體管理系統,其中該資源分配表還紀錄有所設定之該記憶體區塊之記憶體容量大小,以及該裝置系統中之該主機裝置的數量。 The memory management system of claim 6, wherein the resource allocation table further records the size of the memory capacity of the memory block that is set, and the number of the host devices in the device system. 如請求項6所述之記憶體管理系統,其中該裝置系統為一虛擬裝置系統,設置有複數個虛擬主機裝置。 The memory management system of claim 6, wherein the device system is a virtual device system, and a plurality of virtual host devices are disposed.
TW105127132A 2016-08-24 2016-08-24 Memory management system and method thereof TWI619013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW105127132A TWI619013B (en) 2016-08-24 2016-08-24 Memory management system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW105127132A TWI619013B (en) 2016-08-24 2016-08-24 Memory management system and method thereof

Publications (2)

Publication Number Publication Date
TW201810042A true TW201810042A (en) 2018-03-16
TWI619013B TWI619013B (en) 2018-03-21

Family

ID=62189425

Family Applications (1)

Application Number Title Priority Date Filing Date
TW105127132A TWI619013B (en) 2016-08-24 2016-08-24 Memory management system and method thereof

Country Status (1)

Country Link
TW (1) TWI619013B (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8001543B2 (en) * 2005-10-08 2011-08-16 International Business Machines Corporation Direct-memory access between input/output device and physical memory within virtual machine environment
US8966477B2 (en) * 2011-04-18 2015-02-24 Intel Corporation Combined virtual graphics device
US10346095B2 (en) * 2012-08-31 2019-07-09 Sandisk Technologies, Llc Systems, methods, and interfaces for adaptive cache persistence
US9069669B2 (en) * 2012-10-11 2015-06-30 Industrial Technology Research Institute Method and computer system for memory management on virtual machine
TW201447763A (en) * 2013-06-06 2014-12-16 Hon Hai Prec Ind Co Ltd System and method for controlling virtual machine
US9454497B2 (en) * 2014-08-15 2016-09-27 Intel Corporation Technologies for secure inter-virtual-machine shared memory communication
TWI546681B (en) * 2014-12-09 2016-08-21 英業達股份有限公司 Method of resource allocation in a server system

Also Published As

Publication number Publication date
TWI619013B (en) 2018-03-21

Similar Documents

Publication Publication Date Title
US10423361B2 (en) Virtualized OCSSDs spanning physical OCSSD channels
EP3608792B1 (en) Managed switching between one or more hosts and solid state drives (ssds) based on the nvme protocol to provide host storage services
EP3214553B1 (en) Storage resource access method supporting sr-iov, storage controller and storage device
JP6329318B2 (en) Information processing device
US10275348B2 (en) Memory controller for requesting memory spaces and resources
US9304828B2 (en) Hierarchy memory management
US10540303B2 (en) Module based data transfer
US9830110B2 (en) System and method to enable dynamic changes to virtual disk stripe element sizes on a storage controller
US9229891B2 (en) Determining a direct memory access data transfer mode
US10210007B2 (en) Parallel mapping of client partition memory to multiple physical adapters
US20150326684A1 (en) System and method of accessing and controlling a co-processor and/or input/output device via remote direct memory access
WO2016119618A1 (en) Remote memory allocation method, device and system
TWI619013B (en) Memory management system and method thereof
US11687443B2 (en) Tiered persistent memory allocation
US10223284B2 (en) Flexible I/O DMA address allocation in virtualized systems
CN111444113B (en) Nonvolatile storage medium sharing method and device, electronic equipment and storage equipment
US8719466B2 (en) Direct data transfer for device drivers
US11163475B2 (en) Block input/output (I/O) accesses in the presence of a storage class memory
WO2016085461A1 (en) Computing resource with memory resource memory management
WO2017113329A1 (en) Cache management method for host cluster and host
US20180107392A1 (en) Memory management system and method thereof
KR20210043001A (en) Hybrid memory system interface

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees