KR101179275B1 - Apparatus and method for management of memory - Google Patents

Apparatus and method for management of memory Download PDF

Info

Publication number
KR101179275B1
KR101179275B1 KR1020110042457A KR20110042457A KR101179275B1 KR 101179275 B1 KR101179275 B1 KR 101179275B1 KR 1020110042457 A KR1020110042457 A KR 1020110042457A KR 20110042457 A KR20110042457 A KR 20110042457A KR 101179275 B1 KR101179275 B1 KR 101179275B1
Authority
KR
South Korea
Prior art keywords
memory
cache
block
page
main memory
Prior art date
Application number
KR1020110042457A
Other languages
Korean (ko)
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 KR1020110042457A priority Critical patent/KR101179275B1/en
Application granted granted Critical
Publication of KR101179275B1 publication Critical patent/KR101179275B1/en

Links

Images

Classifications

    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0804Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • 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

Landscapes

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

Abstract

PURPOSE: A memory management device and a method thereof are provided to efficiently and stably use a restricted cache memory resource and to setup a block group between a main memory and a cache memory. CONSTITUTION: A memory group setting unit(151) gives a group ID to each group. A page cache setting unit(152) sets up a plurality of blocks to a page cache. A memory mapping unit(153) maps a block of a virtual memory of each process. A page cache managing unit(154) selects a block of the page cache as the buffer in a data access command process. The page cache managing unit gives the group ID according to a selection sequence of the block.

Description

메모리 관리 장치 및 방법{APPARATUS AND METHOD FOR MANAGEMENT OF MEMORY}Memory management apparatus and method {APPARATUS AND METHOD FOR MANAGEMENT OF MEMORY}

본 발명은 메모리 관리 장치 및 방법에 관한 것이다.The present invention relates to a memory management apparatus and method.

컴퓨터 시스템의 가상화 환경에서 가상 머신(virtual machine)은 독립적인 하드웨어를 사용하는 것처럼 동작한다. 이와 같은, 가상화 환경에서 데이터 처리 시, 가상 머신(즉, 게스트)의 물리 주소를 호스트 물리 주소로 변환하고, 변환된 호스트 물리 주소에 의한 데이터 처리를 캐시 영역을 통해 처리하게 된다.In a virtualized environment of computer systems, a virtual machine behaves as if it uses independent hardware. When processing data in such a virtual environment, the physical address of the virtual machine (that is, a guest) is converted into a host physical address, and data processing by the converted host physical address is processed through a cache area.

그런데, 가상화 환경에서는 다수의 가상 머신들을 통한 데이터 처리가 동시 또는 연이어 발생하게 되어, 각 가상 머신의 물리 주소를 호스트 물리 주소로 변환하는 과정에서 오류가 발생될 수 있었다. 또한, 가상 머신의 물리 주소가 호스트 물리 주소로 변환된 이후에도 캐시의 특정 영역에 다수의 호스트 물리 주소에 따른 데이터 처리 실행이 몰리게 되어 캐시 미스가 발생하는 문제가 있었다.However, in a virtual environment, data processing through a plurality of virtual machines may occur simultaneously or consecutively, and an error may occur in the process of converting each virtual machine's physical address into a host physical address. In addition, even after the physical address of the virtual machine is converted to a host physical address, data processing according to a plurality of host physical addresses is concentrated in a specific area of the cache, thereby causing a cache miss.

따라서, 종래에는 가상 머신의 물리 주소 별로 호스트 물리 주소를 사전에 매핑하고, 호스트 물리 주소 별로 캐시 영역을 사전에 매핑하여 캐시 미스를 방지하는 방식이 제안되었다.Therefore, in the related art, a method of preventing a cache miss by previously mapping a host physical address for each physical address of a virtual machine and mapping a cache region for each host physical address in advance has been proposed.

그런데, 종래의 캐시 미스 방지 방식에서는 호스트 물리 주소 내에 설정된 공유 영역과 가상 머신의 물리 주소 간의 매핑 방식 및 상기 공유 영역과 캐시와의 매핑 방식이 고려되지 않았다. 참고로, 상기 공유 영역은 다수의 가상 머신이 물리 메모리 내에서 공유하여 사용하는 저장 영역이다. 이때, 종래의 캐시 미스 방지 방식에서와 같이 호스트 물리 주소 내의 공유 영역 또한 캐시 영역과 사전에 매핑된 경우, 다수의 가상 머신이 상기 공유 영역 중 특정 영역을 공유 사용할 때 오류가 발생하게 된다. 즉, 상기 특정 영역을 공유하여 사용하는 가상 머신들의 물리 주소와 사전에 매핑된 호스트 물리 주소가 상이하므로, 각 호스트 물리 주소에 매핑된 캐시 사용에 오류가 발생하거나 또는 캐시 사용 상에 낭비가 발생되는 문제점이 있다. However, in the conventional cache miss prevention scheme, the mapping scheme between the shared region configured in the host physical address and the physical address of the virtual machine and the mapping scheme between the shared region and the cache are not considered. For reference, the shared area is a storage area shared by a plurality of virtual machines in physical memory. In this case, as in the conventional cache miss prevention scheme, when the shared region in the host physical address is also mapped to the cache region in advance, an error occurs when a plurality of virtual machines share a specific region among the shared regions. That is, since the physical addresses of the virtual machines sharing and using the specific region are different from the host physical addresses mapped in advance, an error occurs in the use of the cache mapped to each host physical address or a waste occurs in the use of the cache. There is a problem.

본 발명은 전술한 종래 기술의 문제점을 해결하기 위한 것으로서, 한정된 캐시 메모리 자원을 효율적으로 사용할 수 있는 메모리 관리 장치 및 방법을 제공하고자 한다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems of the prior art, and to provide a memory management apparatus and method capable of efficiently using a limited cache memory resource.

또한, 본 발명은 가상화 환경에서 다수의 가상 머신들의 데이터 처리 속도를 높이기 위해 메인 메모리 내에 설정된 공유 영역을 효율적으로 관리할 수 있는 메모리 관리 장치 및 방법을 제공하고자 한다.In addition, the present invention is to provide a memory management apparatus and method capable of efficiently managing a shared area set in the main memory in order to increase the data processing speed of a plurality of virtual machines in a virtualized environment.

상기와 같은 기술적 과제를 달성하기 위한 본 발명의 일 측면에 따른 메모리 관리 장치는, 캐시 메모리 및 메인 메모리의 블록들을 기설정된 분류 기준에 따라 복수의 그룹으로 그룹화하고, 상기 캐시 메모리와 상기 메인 메모리의 그룹들이 서로 매칭되도록 상기 그룹 별로 그룹 식별 아이디를 부여하는 메모리 그룹 설정부; 상기 메인 메모리 내의 복수의 블록을 서브 메모리와의 데이터 처리용 버퍼로서 동작하는 페이지 캐시로 설정하는 페이지 캐시 설정부; 상기 페이지 캐시로서 설정된 블록을 제외한 상기 메인 메모리의 나머지 블록과 복수의 프로세스 별 가상 메모리의 블록을 매핑하는 메모리 매핑부; 및 상기 프로세스 별 데이터 액세스 명령 처리 시 상기 페이지 캐시의 일 블록을 상기 버퍼로서 선택하고, 상기 일 블록이 선택되는 순서에 따라 상기 그룹 식별 아이디를 종류에 기준하여 순차적으로 부여하는 페이지 캐시 관리부를 포함한다.Memory management apparatus according to an aspect of the present invention for achieving the above technical problem, grouping the blocks of the cache memory and the main memory into a plurality of groups according to a predetermined classification criteria, the cache memory and the main memory of the A memory group setting unit for assigning a group identification ID for each group so that groups match each other; A page cache setting unit configured to set a plurality of blocks in the main memory as a page cache that operates as a data processing buffer with a sub memory; A memory mapping unit for mapping a block of a plurality of process-specific virtual memories with the remaining blocks of the main memory except the block set as the page cache; And a page cache management unit that selects one block of the page cache as the buffer when processing the data access command for each process, and sequentially assigns the group identification ID based on the type according to the order in which the one block is selected. .

그리고, 본 발명의 다른 측면에 따른 메모리 관리 방법은, 캐시 메모리 및 메인 메모리의 블록들을 기설정된 분류 기준에 따라 복수의 그룹으로 분류하고, 상기 그룹 별로 그룹 식별 아이디를 부여하고, 상기 메인 메모리 내의 복수의 블록을 서브 메모리와의 데이터 처리용 버퍼로 동작하는 페이지 캐시로 설정하는 단계; 상기 페이지 캐시로 설정된 블록을 제외한 상기 메인 메모리의 나머지 블록과 복수의 프로세스 별 가상 메모리의 블록을 매핑하는 단계; 및 상기 프로세스 별 데이터 액세스 명령 발생 시, 상기 페이지 캐시 내의 일 블록을 선택하고, 상기 선택된 일 블록에 상기 그룹 식별 아이디를 부여하는 단계를 포함하되, 상기 일 블록이 선택되는 순서에 따라 상기 복수의 그룹 식별 아이디를 종류에 기준하여 순차적으로 부여한다.According to another aspect of the present invention, a memory management method includes classifying blocks of a cache memory and a main memory into a plurality of groups according to preset classification criteria, assigning a group identification ID to each of the groups, and providing a plurality of blocks in the main memory. Setting a block of to a page cache operating as a buffer for data processing with the sub memory; Mapping blocks of a plurality of process-specific virtual memories to the remaining blocks of the main memory except for the block configured as the page cache; And selecting one block in the page cache and assigning the group identification ID to the selected one block when the data access command for each process occurs, wherein the plurality of groups are arranged in the order in which the one block is selected. The identification ID is assigned sequentially based on the type.

전술한 본 발명의 과제 해결 수단에 의하면, 메인 메모리와 캐시 메모리 간에 서로 매칭되는 블록 그룹을 설정함으로써 한정된 캐시 메모리 자원을 효율적이고 안정적으로 사용할 수 있는 효과가 있다.According to the above-described problem solving means of the present invention, by setting a block group matching each other between the main memory and the cache memory, there is an effect that can use the limited cache memory resources efficiently and stably.

그리고, 본 발명의 과제 해결 수단에 의하면, 메인 메모리 내에 설정된 페이지 캐시 영역의 페이지가 선택되는 순서에 따라 데이터 처리를 위한 블록 그룹의 종류를 순차적으로 부여함으로써, 다수의 프로세스의 페이지 캐시에 대한 공유 사용 시 발생될 수 있는 캐시 미스를 방지할 수 있으며, 캐시 메모리가 블록 그룹의 종류 별로 균등하게 사용되도록 하여 캐시 사용 효율을 높일 수 있는 효과가 있다.According to the problem solving means of the present invention, the shared use of the page caches of a plurality of processes by sequentially assigning the types of block groups for data processing according to the order in which the pages of the page cache area set in the main memory are selected. It is possible to prevent a cache miss that may occur at the time, and to increase the cache usage efficiency by allowing the cache memory to be used evenly for each type of block group.

도 1은 본 발명의 일실시예에 따른 컴퓨터 시스템의 구성을 나타내는 블록도이다.
도 2는 본 발명의 일실시예에 따른 메모리 관리 장치의 구성을 나타내는 블록도이다.
도 3은 본 발명의 일실시예에 따른 페이지 컬러링 방식을 설명하기 위한 캐시 메모리 및 메인 메모리의 주소 패턴의 구조도이다.
도 4a는 본 발명의 일실시예에 따른 페이지 컬러링 방식을 설명하기 위한 도면이다.
도 4b는 본 발명의 일실시예에 따른 페이지 캐시 컬러링 방식을 설명하기 위한 도면이다.
도 5는 본 발명의 일실시예에 따른 메모리 관리 방법을 설명하기 위한 순서도이다.
1 is a block diagram showing the configuration of a computer system according to an embodiment of the present invention.
2 is a block diagram illustrating a configuration of a memory management apparatus according to an embodiment of the present invention.
3 is a structural diagram of address patterns of a cache memory and a main memory for explaining a page coloring scheme according to an embodiment of the present invention.
4A is a diagram for describing a page coloring method according to an embodiment of the present invention.
4B illustrates a page cache coloring scheme according to an embodiment of the present invention.
5 is a flowchart illustrating a memory management method according to an embodiment of the present invention.

아래에서는 첨부한 도면을 참조하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 본 발명의 실시예를 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다. 그리고 도면에서 본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings, which will be readily apparent to those skilled in the art. The present invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. In the drawings, parts irrelevant to the description are omitted in order to clearly describe the present invention, and like reference numerals designate like parts throughout the specification.

명세서 전체에서, 어떤 부분이 다른 부분과 "연결"되어 있다고 할 때, 이는 "직접적으로 연결"되어 있는 경우뿐 아니라, 그 중간에 다른 소자를 사이에 두고 "전기적으로 연결"되어 있는 경우도 포함한다. 또한 어떤 부분이 어떤 구성요소를 "포함"한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있는 것을 의미한다.Throughout the specification, when a part is referred to as being "connected" to another part, it includes not only "directly connected" but also "electrically connected" with another part in between . Also, when an element is referred to as "comprising ", it means that it can include other elements as well, without departing from the other elements unless specifically stated otherwise.

도 1은 본 발명의 일실시예에 따른 컴퓨터 시스템의 구성을 나타내는 블록도이다.1 is a block diagram showing the configuration of a computer system according to an embodiment of the present invention.

그리고, 도 2는 본 발명의 일실시예에 따른 메모리 관리 장치의 구성을 나타내는 블록도이다.2 is a block diagram illustrating a configuration of a memory management apparatus according to an embodiment of the present invention.

먼저, 도 1에서 도시한 바와 같이, 본 발명의 일실시예에 따른 컴퓨터 시스템(100)은 중앙 처리 장치(110), 캐시 메모리(120), 메인 메모리(130), 서브 메모리(140) 및 메모리 관리 장치(150)를 포함한다.First, as shown in FIG. 1, the computer system 100 according to an embodiment of the present invention may include a central processing unit 110, a cache memory 120, a main memory 130, a sub memory 140, and a memory. The management device 150 is included.

중앙 처리 장치(110)는 컴퓨터 시스템(100)의 운영체제에 따른 전반적인 연산 처리를 수행한다. 이때, 본 발명의 일실시예에 따른 컴퓨터 시스템 상에는 복수의 가상 머신(virtual machine)이 구동되며, 중앙 처리 장치(110)는 호스트 운영체제와 게스트 운영체제(즉, 가상 머신) 간에 발생되는 연산 처리를 수행한다. 참고로, 본 발명의 일실시예에 따른 각 게스트는 프로세스로서 동작한다.The central processing unit 110 performs overall computational processing according to the operating system of the computer system 100. In this case, a plurality of virtual machines are driven on the computer system according to an embodiment of the present invention, and the central processing unit 110 performs arithmetic processing generated between the host operating system and the guest operating system (ie, a virtual machine). do. For reference, each guest in accordance with one embodiment of the present invention operates as a process.

구체적으로, 중앙 처리 장치(110)는 각 프로세스 별 데이터 액세스 명령을 처리하며, 데이터 액세스 명령 처리 시 메인 메모리(130)로부터 데이터를 읽기 처리 또는 쓰기 처리한다. Specifically, the central processing unit 110 processes a data access command for each process, and reads or writes data from the main memory 130 during data access command processing.

이때, 중앙 처리 장치(110)는 고속의 데이터 처리를 위하여 빈번하게 발생되는 명령 및 자료 등의 데이터를 캐시 메모리(120)에 임시 저장한 후 필요 시에 호출함으로써 고속의 연산 처리가 가능하다.In this case, the central processing unit 110 may store the data such as frequently generated instructions and data in the cache memory 120 temporarily and call them when necessary for high speed data processing, thereby enabling high speed arithmetic processing.

한편, 캐시 메모리(120), 메인 메모리(130) 및 서브 메모리(140)의 각 저장 공간은 블록 단위로 분할되어 관리되며, 본 발명의 일실시예에서 상기 블록은 운영체제에 따라 기설정된 크기의 ‘페이지(page)’로 분할된다.Meanwhile, each of the storage spaces of the cache memory 120, the main memory 130, and the sub memory 140 is divided and managed in units of blocks. In an embodiment of the present invention, the blocks may have a predetermined size according to an operating system. Divided into 'pages'.

캐시 메모리(120)는 중앙 처리 장치(110)와 메인 메모리(130) 사이에서 처리되는 데이터를 임시로 저장하는 버퍼로서, 중앙 처리 장치(110)의 메인 메모리(130) 상의 데이터 액세스 시 빈번하게 사용되는 데이터를 임시로 저장해두고 중앙 처리 장치(110)의 호출 시 마다 제공한다.The cache memory 120 is a buffer for temporarily storing data processed between the central processing unit 110 and the main memory 130, and is frequently used to access data on the main memory 130 of the central processing unit 110. The data is temporarily stored and provided at each call of the central processing unit 110.

구체적으로, 캐시 메모리(120)는 중앙 처리 장치(110)의 데이터 액세스 처리 시 메인 메모리(130)의 블록으로부터 처리(즉, 쓰기 또는 읽기 처리)되는 데이터를 임시 저장할 블록을 할당한다. In detail, the cache memory 120 allocates a block to temporarily store data processed (that is, write or read) from a block of the main memory 130 during a data access process of the central processing unit 110.

그리고, 캐시 메모리(120)의 블록들은 메인 메모리(130)의 블록들과 매핑(mapping)되며, 상기 블록 할당 시 메인 메모리(130)의 해당 블록에 대해 사전에 매핑된 블록을 할당한다. 이에 따라, 캐시 메모리(120)는 데이터 처리용 블록 할당 시 각 그룹들을 균등하게 할당하게 됨으로써 캐시 미스를 방지하고 캐시 메모리 자원을 효율적으로 사용할 수 있다.The blocks of the cache memory 120 are mapped to the blocks of the main memory 130, and the blocks allocated in advance are allocated to the corresponding blocks of the main memory 130 when the block is allocated. Accordingly, the cache memory 120 is equally allocated to each group when allocating blocks for data processing, thereby preventing cache misses and efficiently using cache memory resources.

본 발명의 일실시예에 따른 캐시 메모리(120)의 블록들은 메모리 관리 장치(150)를 통해 그룹화되며, 각 그룹 별로 메인 메모리(130)의 블록 그룹들과 매칭된다. Blocks of the cache memory 120 according to an embodiment of the present invention are grouped through the memory management apparatus 150 and matched with the block groups of the main memory 130 for each group.

메인 메모리(130)는 중앙 처리 장치(110) 와의 직접적인 데이터 교환이 가능한 기억 장치로서, 프로세스의 실행 시 서브 메모리(140)에 저장되어 있는 데이터(프로그램 및 자료 등의 데이터)를 획득하여 중앙 처리 장치(110)로 제공하고 실행될 수 있도록 한다.The main memory 130 is a memory device capable of directly exchanging data with the central processing unit 110. The main memory 130 acquires data (data such as programs and data) stored in the sub memory 140 when a process is executed. 110 and provide for execution.

본 발명의 일실시예에 따른 메인 메모리(130)는 컴퓨터 시스템(100) 상의 가상 머신(즉, 게스트)들의 가상 메모리와 블록 단위로 매핑된다. 이때, 메인 메모리(130)는 각 프로세스(즉, 게스트)들의 데이터 액세스 명령 처리 시 가상 메모리의 블록으로부터 데이터를 읽기 처리하고, 가상 메모리의 블록에 대해 사전에 매핑된 메인 메모리(130)의 블록에 상기 읽기 처리된 데이터를 쓰기 처리한다.The main memory 130 according to an embodiment of the present invention is mapped in block units with virtual memory of virtual machines (ie, guests) on the computer system 100. In this case, the main memory 130 reads data from a block of virtual memory when processing a data access command of each process (that is, a guest), and stores the data in a block of the main memory 130 previously mapped to the block of the virtual memory. Write the read processed data.

서브 메모리(140)는 중앙 처리 장치(110)가 아닌 외부에서 데이터를 보관하기 위한 기억 장치로서, 메인 메모리(130) 보다 속도가 상대적으로 느리며 많은 양의 데이터를 영구적으로 보관한다. 예를 들어 디스크(disk) 등을 포함한다. The sub memory 140 is a storage device for storing data outside the central processing unit 110 and is relatively slower than the main memory 130 and permanently stores a large amount of data. Examples include disks and the like.

본 발명의 일실시예에 따른 서브 메모리(140)는 적어도 일부분이 가상 메모리의 물리 저장 공간(physical memory)으로써 사용되며, 가상 메모리로 사용되는 서브 메모리(140)의 블록들은 메인 메모리(130)의 블록들과 매핑된다.At least a portion of the sub memory 140 according to an exemplary embodiment of the present invention is used as a physical memory of the virtual memory, and the blocks of the sub memory 140 used as the virtual memory are the main memory 130. Mapped to blocks.

메모리 관리 장치(150)는 캐시 메모리(120) 및 메인 메모리(130)의 효율적인 사용을 위하여 캐시 메모리(120), 메인 메모리(130) 및 서브 메모리(140) 간의 데이터 처리를 위한 메모리 관리를 수행한다.The memory management apparatus 150 performs memory management for processing data between the cache memory 120, the main memory 130, and the sub memory 140 in order to efficiently use the cache memory 120 and the main memory 130. .

구체적으로, 도 2와 같이 본 발명의 일실시예에 따른 메모리 관리 장치(150)는 메모리 그룹 설정부(151), 페이지 캐시 설정부(152), 메모리 매핑부(153), 및 페이지 캐시 관리부(154)를 포함한다.Specifically, as shown in FIG. 2, the memory management apparatus 150 according to an embodiment of the present invention may include a memory group setting unit 151, a page cache setting unit 152, a memory mapping unit 153, and a page cache management unit ( 154).

메모리 그룹 설정부(151)는 캐시 메모리(120)와 메인 메모리(130)를 각각 복수의 블록을 포함하는 그룹들로 그룹화하고, 각 그룹 별로 그룹 식별 아이디를 부여한다. 이때, 메모리 그룹 설정부(151)는 캐시 메모리(120)와 메인 메모리(130)의 각 그룹들이 서로 매칭되도록 그룹 식별 아이디를 부여한다. The memory group setting unit 151 groups the cache memory 120 and the main memory 130 into groups each including a plurality of blocks, and assigns a group identification ID for each group. In this case, the memory group setting unit 151 assigns a group identification ID to match each group of the cache memory 120 and the main memory 130 with each other.

참고로, 본 발명의 일실시예에서는 상기 그룹화 처리를‘페이지 컬러링 처리’라고 지칭한다. 즉, 캐시 메모리(120) 및 메인 메모리(130)의 그룹 별로 부여되는 그룹 식별 아이디는 그룹의 종류로서 ‘컬러’라고 정의되며, 메인 메모리(130)의 특정 컬러 그룹에 포함되는 페이지들은 상기 특정 컬러 그룹과 동일한 컬러의 캐시 메모리(120)의 컬러 그룹의 페이지를 사용하여 데이터 처리된다.For reference, in the exemplary embodiment of the present invention, the grouping process is referred to as 'page coloring process'. That is, a group identification ID given to each group of the cache memory 120 and the main memory 130 is defined as 'color' as a group type, and pages included in a specific color group of the main memory 130 are the specific color. Data is processed using the pages of the color group in cache memory 120 of the same color as the group.

구체적으로, 메모리 그룹 설정부(151)는 기설정된 분류 기준에 따라 캐시 메모리(120) 및 메인 메모리(130)의 페이지들을 컬러링 처리한다. 이때, 메모리 그룹 설정부(151)는 캐시 메모리(120)의 주소 패턴과 메인 메모리(130)의 주소 패턴을 이용하여 상기 분류 기준을 설정할 수 있다.In detail, the memory group setting unit 151 colors the pages of the cache memory 120 and the main memory 130 according to a preset classification criterion. In this case, the memory group setting unit 151 may set the classification criteria by using the address pattern of the cache memory 120 and the address pattern of the main memory 130.

예를 들어, 도 3은 본 발명의 일실시예에 따른 페이지 컬러링 방식을 설명하기 위한 캐시 메모리 및 메인 메모리의 주소 패턴의 구조도이다.For example, FIG. 3 is a structural diagram of address patterns of a cache memory and a main memory for explaining a page coloring scheme according to an embodiment of the present invention.

도 3에서는, 캐시 메모리(120)의 용량이 4MB, 16-way set associative, 64B 오프셋인 경우를 나타내었다. 이때, 캐시 메모리(120)는 4096 개의 캐시 인덱스를 가지게 되고, 12비트가 캐시 인덱스를 표현하는데 사용된다. 따라서, 도 3에서 도시한 바와 같이, 메인 메모리(130)의 물리 저장 공간(Physical Memory)의 주소 패턴 상의 물리 페이지 넘버(Physical Page Number)의 하위 6비트(bit)와, 캐시 메모리(L2 Cache)(120)의 주소 패턴 상의 캐시 인덱스(Cache Set Index)의 상위 6비트가 대응된다. In FIG. 3, the cache memory 120 has a capacity of 4 MB, 16-way set associative, and 64B offset. At this time, the cache memory 120 has 4096 cache indexes, and 12 bits are used to represent the cache index. Accordingly, as shown in FIG. 3, the lower 6 bits of the physical page number on the address pattern of the physical memory of the main memory 130 and the cache memory (L2 Cache) are shown. The upper six bits of the Cache Set Index on the address pattern of 120 correspond.

이때, 메모리 그룹 설정부(151)는 캐시 메모리(120)와 메인 메모리(130)의 주소 패턴 간의 비트 패턴 차에 기초하여 상기 분류 기준을 설정한다. 즉, 도 3에서는, 캐시 메모리(120)의 캐시 인덱스 비트와 메인 메모리(130)의 물리 페이지 넘버 비트 간에 대응되는 6 비트의 값에 기초하여 64개의 컬러가 설정된다. 따라서, 캐시 메모리(120) 및 메인 메모리(130)의 각 블록(즉, 페이지)들은 상기 설정된 컬러 종류 중 어느 하나의 컬러가 부여된다.In this case, the memory group setting unit 151 sets the classification criteria based on a bit pattern difference between the address patterns of the cache memory 120 and the main memory 130. That is, in FIG. 3, 64 colors are set based on a value of 6 bits corresponding to a cache index bit of the cache memory 120 and a physical page number bit of the main memory 130. Therefore, each block (ie, page) of the cache memory 120 and the main memory 130 is given a color of any one of the above-described color types.

참고로, 도 3에서 도시한 캐시 메모리(120)는 16-way이므로, 동일 컬러 종류에 대한 페이지는 최대 16개까지 캐시 메모리(120)에 존재할 수 있다. 이처럼, 캐시 메모리(120) 상의 동일 컬러를 갖는 페이지 수가 정해져 있으므로, 메인 메모리(130)의 각 페이지들의 데이터 처리 시 캐시 메모리(120)의 컬러를 균등하게 사용함으로써 캐시 메모리(120) 자원을 효율적으로 사용할 수 있다.For reference, since the cache memory 120 illustrated in FIG. 3 is 16-way, up to 16 pages for the same color type may exist in the cache memory 120. As such, since the number of pages having the same color on the cache memory 120 is determined, the color of the cache memory 120 is equally used in the data processing of each page of the main memory 130 to efficiently use the resources of the cache memory 120. Can be used.

페이지 캐시 설정부(152)는 메인 메모리(130)의 페이지 중 기설정된 크기(또는 개수)의 페이지를 가상 메모리와의 데이터 처리를 위한 임시 저장 영역인 페이지 캐시(page cache) 영역으로 설정한다. 이때, 페이지 캐시 설정부(152)는 캐시 메모리(120)와의 페이지 컬러링 처리가 완료된 메인 메모리(130)의 페이지들 중 복수의 페이지를 페이지 캐시로 설정한다.The page cache setting unit 152 sets a page having a predetermined size (or number) among the pages of the main memory 130 as a page cache area which is a temporary storage area for data processing with the virtual memory. In this case, the page cache setting unit 152 sets a plurality of pages among the pages of the main memory 130 in which the page coloring process with the cache memory 120 is completed, as a page cache.

한편, 메인 메모리(130)의 페이지들은 다수의 프로세스의 가상 메모리의 페이지와 각각 매핑되며, 페이지 캐시 영역은 다수의 프로세스들이 공유하여 사용하는 임시 저장 영역이다. 따라서, 페이지 캐시의 각 페이지가 사전에 컬러링 처리된 상태에서 복수의 프로세스들이 페이지 캐시의 특정 페이지를 공유하여 사용하는 경우 페이지 캐시 영역에 컬러링 오류가 발생하게 된다.Meanwhile, pages of the main memory 130 are mapped to pages of virtual memory of a plurality of processes, respectively, and the page cache area is a temporary storage area shared and used by a plurality of processes. Therefore, when a plurality of processes share and use a specific page of the page cache while each page of the page cache is previously colored, a coloring error occurs in the page cache area.

예를 들어, 제 1 프로세스의 데이터 액세스 명령 처리 시 서브 메모리(140) 내의 제 1 프로세스의 특정 페이지(즉, 가상 메모리의 페이지)로부터 제 1 데이터가 읽기 처리된 후 페이지 캐시의 제 1 페이지에 제 1 데이터가 쓰기 처리될 수 있다. 그 후, 제 2 프로세스가 제 1 페이지에 저장된 제 1 데이터를 읽기 처리하는 경우 제 1 페이지의 컬러링은 깨지게 된다. 즉, 제 1 페이지가 제 1 프로세스에 의한 최초 데이터 처리 시 페이지 컬러링된 컬러와, 제 2 프로세스에 의한 두 번째 데이터 처리 시 페이지 컬러링된 컬러가 상이하여 제 1 페이지의 페이지 컬러링은 깨지게 된다.For example, when processing a data access command of the first process, the first data is read from a specific page of the first process (that is, a page of the virtual memory) in the sub memory 140, and then the first page of the page cache is read. 1 Data can be write processed. Then, when the second process reads the first data stored in the first page, the coloring of the first page is broken. That is, the page coloring of the first page is broken because the first page is page colored in the first data processing by the first process and the page colored color in the second data processing by the second process.

따라서, 페이지 캐시 설정부(152)는 페이지 캐시로 설정한 페이지들에 대한 컬러 설정을 해제한다. 참고로, 페이지 캐시 관리부(154)에 의해 페이지 캐시의 각 페이지들은 컬러링 처리된다.Therefore, the page cache setting unit 152 releases the color setting for the pages set as the page cache. For reference, the pages of the page cache are colored by the page cache manager 154.

메모리 매핑부(153)는 메인 메모리(130) 내에 설정된 페이지 캐시를 제외한 나머지 블록(즉, 페이지)과 프로세스 별 가상 메모리의 블록을 매핑한다. 이때, 메모리 매핑부(153)는 메인 메모리(130)의 각 블록들에 대해 설정된 컬러가 균일하게 사용되도록, 메인 메모리(130)의 블록을 컬러에 따라 순차적으로 가상 메모리의 블록을 매핑한다.The memory mapping unit 153 maps the blocks of the virtual memory for each process (ie, pages) except for the page cache set in the main memory 130. In this case, the memory mapping unit 153 sequentially maps the blocks of the virtual memory 130 according to the colors of the blocks of the main memory 130 so that the colors set for the blocks of the main memory 130 are uniformly used.

예를 들어, 도 4a는 본 발명의 일실시예에 따른 페이지 컬러링 방식을 설명하기 위한 도면이다.For example, FIG. 4A is a diagram for describing a page coloring scheme according to an embodiment of the present invention.

도 4a에서와 같이, 프로세스 A의 가상 메모리(Virtual Memory Process A)와 메인 메모리(130)의 물리 저장 공간(Physical Memory)의 각 페이지는 각각 대응되도록 매핑되며, 메인 메모리(130)의 각 페이지에 적용된 컬러가 균등하게 사용되도록 프로세스 A의 가상 메모리의 페이지가 메인 메모리(130)의 페이지에 매핑된다. 이처럼, 가상 메모리와 메인 메모리(130)가 컬러가 균등하게 매핑됨으로써, 도 4a에서와 같이 캐시 메모리(Cache)(120)의 페이지와 메인 메모리(Physical Memory)(140)의 페이지가 컬러 종류 별로 균등하게 매핑된다.As shown in FIG. 4A, each page of the virtual memory Process A of the process A and the physical memory of the main memory 130 is mapped to correspond to each page, and is mapped to each page of the main memory 130. The pages of virtual memory of process A are mapped to the pages of main memory 130 so that the applied colors are used evenly. As such, the colors of the virtual memory and the main memory 130 are uniformly mapped, so that the pages of the cache memory 120 and the pages of the main memory 140 are equally divided according to color types as shown in FIG. 4A. Is mapped.

그리고, 메모리 매핑부(153)는 가상 메모리의 각 블록과 매핑된 메인 메모리(130)의 블록의 각 주소를 매칭하여 매칭 테이블을 생성하여 저장한다. 이후, 메모리 매핑부(153)는 프로세스 별 데이터 액세스 명령 처리 시, 매칭 테이블로부터 가상 메모리의 주소에 매칭된 메인 메모리(130)의 물리 주소를 검출하여 중앙 처리 장치(110) 등으로 제공한다. The memory mapping unit 153 creates and stores a matching table by matching each block of the virtual memory with each address of the block of the main memory 130 mapped. Thereafter, the memory mapping unit 153 detects the physical address of the main memory 130 matched to the address of the virtual memory from the matching table and provides the same to the central processing unit 110 when the data access command is processed for each process.

페이지 캐시 관리부(154)는 프로세스 별 데이터 액세스 명령 처리 시 페이지 캐시의 페이지를 데이터 처리용 버퍼로서 선택하고, 페이지 캐시의 페이지가 선택되는 순서에 따라 컬러를 종류 별로 순차적으로 부여한다.The page cache manager 154 selects a page of a page cache as a data processing buffer when processing a data access instruction for each process, and sequentially assigns colors by types according to the order in which the pages of the page cache are selected.

구체적으로, 페이지 캐시 관리부(154)는 페이지 캐시 내에 포함된 복수의 페이지 중 미사용 중인 페이지를 선택한다. 참고로, 선택된 페이지에는 가상 메모리(즉, 서브 메모리)로부터 읽기 처리된 데이터가 쓰기 처리된다.In detail, the page cache manager 154 selects an unused page among a plurality of pages included in the page cache. For reference, the data read from the virtual memory (that is, the sub memory) is written to the selected page.

예를 들어, 도 4b는 본 발명의 일실시예에 따른 페이지 캐시 컬러링 방식을 설명하기 위한 도면이다.For example, FIG. 4B is a diagram for describing a page cache coloring scheme according to an embodiment of the present invention.

도 4b에서 도시한 바와 같이, 메인 메모리(130)의 물리 저장 공간(Physical Memory) 내에 페이지 캐시 영역이 설정되어 있다. 그리고, 프로세스 A의 가상 메모리(Virtual Memory Process A) 페이지와 메인 메모리(130)의 페이지 캐시 영역을 제외한 나머지 페이지는 사전에 매핑된 상태로써 각각 페이지 컬러링 처리된 상태이다. As shown in FIG. 4B, a page cache area is set in a physical memory of the main memory 130. The remaining pages, except for the page of the virtual memory process A of the process A and the page cache area of the main memory 130, are mapped to each other and are page colored.

도 4b에서는 페이지 캐시 영역의 페이지에 프로세스 A의 가상 메모리(Virtual Memory Process A)(즉, 서브 메모리)의 커널 영역 또는 유저 영역의 페이지의 데이터들이 읽기 또는 쓰기 처리되는 상태를 나타내었다. 이때, 프로세스 A의 가상 메모리(Virtual Memory Process A)의 페이지에 저장되어 있던 데이터들은 페이지 캐시 영역을 거쳐, 메인 메모리(130)의 페이지 중 사전에 매핑된 페이지에 쓰기 처리되거나 프로세스 A의 가상 메모리(Virtual Memory Process A)의 다른 페이지에 쓰기 처리될 수 있다.4B illustrates a state in which data of a page of a kernel area or a user area of a virtual memory Process A (that is, a sub memory) of a process A is read or written to a page of a page cache area. At this time, the data stored in the page of the virtual memory of the process A (Virtual Memory Process A) is written to the page mapped in advance of the page of the main memory 130 through the page cache area, or the virtual memory of the process A ( It can be written to another page in Virtual Memory Process A).

이때, 도 4b에서 도시한 바와 같이, 페이지 캐시 관리부(154)는 페이지 캐시 영역의 페이지에 프로세스 A의 가상 메모리(Virtual Memory Process A)의 페이지의 데이터가 처리된 후 컬러를 종류에 기준하여 순차적으로 부여하여 페이지 캐시의 컬러링 처리를 수행한다.In this case, as shown in FIG. 4B, the page cache manager 154 sequentially processes the data of the page of the virtual memory of the process A to the page of the page cache area, and then sequentially colors based on the type. To perform the coloring process of the page cache.

또한, 페이지 캐시 관리부(154)는 페이지 캐시의 일 페이지에 부여된 컬러의 정보를 해당 프로세스의 데이터 액세스 명령을 처리 시 중앙 처리 장치(110)로 제공한다. 이와 같은 경우, 중앙 처리 장치(110)는 상기 제공된 컬러의 정보와 동일한 컬러의 캐시 메모리(120)의 페이지를 통해 해당 데이터를 처리한다.In addition, the page cache manager 154 provides the central processing unit 110 with the information of the color assigned to one page of the page cache when processing the data access command of the corresponding process. In this case, the central processing unit 110 processes the corresponding data through the page of the cache memory 120 of the same color as the provided color information.

이하, 도 5를 참조하여 본 발명의 일실시예에 따른 컴퓨터 시스템(100) 상의 메모리 관리 방법에 대해서 상세히 설명하도록 한다.Hereinafter, a memory management method on the computer system 100 according to an exemplary embodiment of the present invention will be described in detail with reference to FIG. 5.

도 5는 본 발명의 일실시예에 따른 메모리 관리 방법을 설명하기 위한 순서도이다.5 is a flowchart illustrating a memory management method according to an embodiment of the present invention.

먼저, 캐시 메모리 및 메인 메모리의 블록들에 대해 페이지 컬러링 처리를 수행한다(S510).First, a page coloring process is performed on blocks of a cache memory and a main memory (S510).

구체적으로, 캐시 메모리의 주소 패턴 및 물리 메모리의 주소 패턴 간의 관계(예를 들어, 비트 패턴 차)에 기초하여 캐시 메모리 및 물리 메모리의 각 블록을 복수의 그룹으로 분류하고, 동일 그룹 내의 블록들에 대해 동일한 컬러(즉, 그룹 식별 아이디)를 부여한다. 이때, 캐시 메모리 및 물리 메모리의 각 그룹은 동일 컬러를 갖는 그룹끼리 대응된다.Specifically, each block of the cache memory and the physical memory is classified into a plurality of groups based on a relationship between the address pattern of the cache memory and the address pattern of the physical memory (for example, a bit pattern difference), and the blocks within the same group are classified into a plurality of groups. The same color (ie, group identification ID). At this time, each group of the cache memory and the physical memory correspond to groups having the same color.

다음으로, 메인 메모리 내에 페이지 캐시 영역을 설정한다(S520).Next, a page cache area is set in the main memory (S520).

구체적으로, 메인 메모리 내의 블록 중 기설정된 크기(또는 개수)의 블록들을 페이지 캐시 영역으로 설정하며, 페이지 캐시 영역은 복수의 프로세스들이 공유하여 사용하는 버퍼로서 동작한다. Specifically, a block having a predetermined size (or number) among the blocks in the main memory is set as a page cache area, and the page cache area operates as a buffer shared by a plurality of processes.

그런 후, 메인 메모리 및 가상 메모리 간에 메모리 매핑을 수행한다(S530).Thereafter, memory mapping is performed between the main memory and the virtual memory (S530).

이때, 메인 메모리의 페이지 중 페이지 캐시를 제외한 나머지 페이지와 복수의 프로세스 별 가상 메모리의 페이지를 매핑한다.At this time, the pages of the main memory, other than the page cache, are mapped to the pages of the virtual memory for each of the plurality of processes.

그런 다음, 프로세스 별 데이터 액세스 명령이 발생되면, 페이지 캐시에 대한 컬러링 처리를 수행한다(S540).Then, when a data access instruction for each process is generated, a coloring process for the page cache is performed (S540).

구체적으로, 가상 메모리(즉, 서브 메모리)의 페이지에 기저장되어 있는 데이터에 대한 액세스 처리 발생 시, 페이지 캐시 내의 임의의 페이지를 액세스할 데이터에 대한 데이터 처리를 수행할 버퍼로서 선택하고, 선택된 페이지 캐시의 페이지에 컬러를 부여한다. Specifically, when an access process for data previously stored in a page of virtual memory (ie, a sub-memory) occurs, an arbitrary page in the page cache is selected as a buffer to perform data processing for data to be accessed, and the selected page Colors pages in the cache.

이때, 페이지 캐시의 페이지가 선택되는 순서에 따라 컬러의 종류를 순차적으로 적용한다. 즉, 다수의 프로세스에 의해 데이터 액세스 명령이 발생되는 순서에 따라 페이지 캐시의 페이지가 선택되며, 각 선택된 페이지는 서로 상이한 컬러가 부여된다. 예를 들어, 현재 선택된 페이지에는 이전 선택된 페이지에 부여한 컬러와 상이한 컬러를 부여한다. 이와 같은, 각 선택된 페이지에 컬러의 종류를 순차적으로 적용하여 컬러를 부여함으로써 컬러들이 균등하게 부여되어 캐시 사용 효율을 높일 수 있다. At this time, the types of colors are sequentially applied according to the order in which the pages of the page cache are selected. That is, the pages of the page cache are selected according to the order in which the data access commands are issued by a plurality of processes, and each selected page is given a different color. For example, the currently selected page is given a color different from the color given to the previously selected page. By applying the color types to each selected page sequentially and assigning the colors, the colors are evenly applied to increase the cache usage efficiency.

전술한 본 발명의 설명은 예시를 위한 것이며, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명의 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 쉽게 변형이 가능하다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 예를 들어, 단일형으로 설명되어 있는 각 구성 요소는 분산되어 실시될 수도 있으며, 마찬가지로 분산된 것으로 설명되어 있는 구성 요소들도 결합된 형태로 실시될 수 있다.The foregoing description of the present invention is intended for illustration, and it will be understood by those skilled in the art that the present invention may be easily modified in other specific forms without changing the technical spirit or essential features of the present invention. will be. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. For example, each component described as a single entity may be distributed and implemented, and components described as being distributed may also be implemented in a combined form.

본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.The scope of the present invention is shown by the following claims rather than the above description, and all changes or modifications derived from the meaning and scope of the claims and their equivalents should be construed as being included in the scope of the present invention. do.

100: 가상화 장치 110: 중앙 처리 장치
120: 캐시 메모리 130: 메인 메모리
140: 서브 메모리 150: 메모리 관리 장치
100: virtualization unit 110: central processing unit
120: cache memory 130: main memory
140: sub memory 150: memory management device

Claims (11)

컴퓨터 시스템의 메모리 관리 장치에 있어서,
캐시 메모리 및 메인 메모리의 블록들을 기설정된 분류 기준에 따라 복수의 그룹으로 그룹화하고, 상기 캐시 메모리와 상기 메인 메모리의 그룹들이 서로 매칭되도록 상기 그룹 별로 그룹 식별 아이디를 부여하는 메모리 그룹 설정부;
상기 메인 메모리 내의 복수의 블록을 서브 메모리와의 데이터 처리용 버퍼로서 동작하는 페이지 캐시로 설정하는 페이지 캐시 설정부;
상기 페이지 캐시로서 설정된 블록을 제외한 상기 메인 메모리의 나머지 블록과 복수의 프로세스 별 가상 메모리의 블록을 매핑하는 메모리 매핑부; 및
상기 프로세스 별 데이터 액세스 명령 처리 시 상기 페이지 캐시의 일 블록을 상기 버퍼로서 선택하고, 상기 일 블록이 선택되는 순서에 따라 상기 그룹 식별 아이디를 순차적으로 부여하는 페이지 캐시 관리부를 포함하는 메모리 관리 장치.
In the memory management device of a computer system,
A memory group setting unit for grouping blocks of a cache memory and a main memory into a plurality of groups according to a predetermined classification criterion, and assigning a group identification ID for each group so that the groups of the cache memory and the main memory match each other;
A page cache setting unit configured to set a plurality of blocks in the main memory as a page cache that operates as a data processing buffer with a sub memory;
A memory mapping unit for mapping a block of a plurality of process-specific virtual memories with the remaining blocks of the main memory except the block set as the page cache; And
And a page cache manager which selects one block of the page cache as the buffer and sequentially assigns the group identification ID according to the order in which the one block is selected when processing the data access command for each process.
제 1 항에 있어서,
상기 메모리 그룹 설정부는,
상기 캐시 메모리 및 상기 메인 메모리의 주소 패턴 간의 비트(bit) 패턴 차에 기초하여 상기 분류 기준을 설정하는 메모리 관리 장치.
The method of claim 1,
The memory group setting unit,
And setting the classification criteria based on a bit pattern difference between the cache memory and the address pattern of the main memory.
제 1 항에 있어서,
상기 메모리 매핑부는,
상기 가상 메모리의 주소 별로 상기 메인 메모리의 물리 주소를 매핑하여 매칭 테이블을 저장하고,
상기 데이터 액세스 명령 처리 시 상기 매칭 테이블로부터 상기 가상 메모리의 주소에 매칭된 상기 메인 메모리의 물리 주소를 검출하여 상기 데이터 액세스 명령을 처리하는 중앙 처리 장치로 제공하는 메모리 관리 장치.
The method of claim 1,
The memory mapping unit,
Mapping a physical address of the main memory to each address of the virtual memory to store a matching table,
And processing the data access command by detecting a physical address of the main memory that matches the address of the virtual memory from the matching table when the data access command is processed.
제 1 항에 있어서,
상기 페이지 캐시 관리부는,
상기 일 블록에 부여된 그룹 식별 아이디를 상기 데이터 액세스 명령을 처리하는 중앙 처리 장치로 제공하여 상기 제공된 그룹 식별 아이디에 해당하는 상기 캐시 메모리의 그룹 내 블록이 선택되도록 하는 메모리 관리 장치.
The method of claim 1,
The page cache management unit,
And providing a group identification ID assigned to the one block to a central processing unit for processing the data access command so that a block in the group of the cache memory corresponding to the provided group identification ID is selected.
제 1 항 내지 제 4 항 중 어느 한 항에 있어서,
상기 페이지 캐시 관리부는,
상기 데이터 액세스 명령 처리 시 상기 페이지 캐시 내의 블록 중 미사용 중인 블록을 상기 일 블록으로 할당하는 메모리 관리 장치.
The method according to any one of claims 1 to 4,
The page cache management unit,
And an unused block among the blocks in the page cache as the one block when the data access command is processed.
제 1 항에 있어서,
상기 페이지 캐시 관리부는,
상기 그룹 식별 아이디 부여 시 현재 선택된 블록의 직전에 선택된 이전 블록에 부여된 그룹 식별 아이디와 상이한 종류의 그룹 식별 아이디를 상기 현재 선택된 블록에 부여하되,
상기 종류를 순차적으로 선택하는 메모리 관리 장치.
The method of claim 1,
The page cache management unit,
When the group identification ID is granted, a group identification ID different from the group identification ID given to the previous block selected immediately before the currently selected block is assigned to the currently selected block.
And a memory management device for sequentially selecting the types.
컴퓨터 시스템의 메모리 관리 방법에 있어서,
(a) 캐시 메모리 및 메인 메모리의 블록들을 기설정된 분류 기준에 따라 복수의 그룹으로 분류하고, 상기 그룹 별로 그룹 식별 아이디를 부여하는 단계;
(b) 상기 메인 메모리 내의 복수의 블록을 서브 메모리와의 데이터 처리용 버퍼로서 동작하는 페이지 캐시로 설정하는 단계;
(c) 상기 페이지 캐시로 설정된 블록을 제외한 상기 메인 메모리의 나머지 블록과 복수의 프로세스 별 가상 메모리의 블록을 매핑하는 단계; 및
(d) 상기 프로세스 별 데이터 액세스 명령 발생 시, 상기 페이지 캐시 내의 일 블록을 선택하고, 상기 선택된 일 블록에 상기 그룹 식별 아이디를 부여하는 단계를 포함하되,
상기 (d) 단계에서,
상기 일 블록이 선택되는 순서에 따라 상기 복수의 그룹 식별 아이디를 종류에 기준하여 순차적으로 부여하는 메모리 관리 방법.
In the memory management method of a computer system,
(a) classifying the blocks of the cache memory and the main memory into a plurality of groups according to preset classification criteria, and assigning group identification IDs to the groups;
(b) setting a plurality of blocks in the main memory as a page cache which operates as a buffer for data processing with a sub memory;
(c) mapping blocks of a plurality of process-specific virtual memories to the remaining blocks of the main memory except for the block set as the page cache; And
(d) selecting one block in the page cache and assigning the group identification ID to the selected one block when the data access command for each process occurs;
In the step (d)
And sequentially assigning the plurality of group identification IDs based on a type in the order in which the one block is selected.
제 7 항에 있어서,
상기 (a) 단계에서,
상기 캐시 메모리의 주소 패턴과 상기 메인 메모리의 주소 패턴 간의 비트(bit) 패턴 차에 기초하여 상기 분류 기준을 설정하는 메모리 관리 방법.
The method of claim 7, wherein
In the step (a)
And setting the classification criteria based on a bit pattern difference between an address pattern of the cache memory and an address pattern of the main memory.
제 7 항에 있어서,
상기 (a) 단계에서,
상기 캐시 메모리와 상기 메인 메모리의 그룹들이 서로 매칭되도록 상기 그룹 식별 아이디를 부여하는 메모리 관리 방법.
The method of claim 7, wherein
In the step (a)
And assigning the group identification ID so that the groups of the cache memory and the main memory match each other.
제 7 항에 있어서,
상기 (d) 단계 이후에,
상기 프로세스 별 데이터 액세스 명령에 따라 상기 일 블록에 상기 서브 메모리 또는 상기 메인 메모리로부터 읽기 처리된 데이터를 쓰기 처리하는 단계를 더 포함하는 메모리 관리 방법.
The method of claim 7, wherein
After the step (d)
And writing data read-processed from the sub memory or the main memory to the one block according to the data access command for each process.
제 7 항에 있어서,
상기 (d) 단계 이후에,
상기 프로세스 별 데이터 액세스 명령 처리 시 상기 일 블록에 부여된 그룹 식별 아이디와 매칭되는 상기 캐시 메모리의 그룹 내 블록 중 미사용 중인 블록을 데이터 처리용 블록으로 할당하는 단계를 더 포함하는 메모리 관리 방법.
The method of claim 7, wherein
After the step (d)
And allocating an unused block among the blocks in the group of the cache memory matching the group identification ID assigned to the one block as a data processing block when processing the data access command for each process.
KR1020110042457A 2011-05-04 2011-05-04 Apparatus and method for management of memory KR101179275B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020110042457A KR101179275B1 (en) 2011-05-04 2011-05-04 Apparatus and method for management of memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020110042457A KR101179275B1 (en) 2011-05-04 2011-05-04 Apparatus and method for management of memory

Publications (1)

Publication Number Publication Date
KR101179275B1 true KR101179275B1 (en) 2012-09-03

Family

ID=47073691

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020110042457A KR101179275B1 (en) 2011-05-04 2011-05-04 Apparatus and method for management of memory

Country Status (1)

Country Link
KR (1) KR101179275B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070157003A1 (en) 2005-12-30 2007-07-05 Durham David M Page coloring to associate memory pages with programs
US20080313420A1 (en) 2007-06-15 2008-12-18 Microsoft Corporation Managing working set use of a cache via page coloring

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070157003A1 (en) 2005-12-30 2007-07-05 Durham David M Page coloring to associate memory pages with programs
US20080313420A1 (en) 2007-06-15 2008-12-18 Microsoft Corporation Managing working set use of a cache via page coloring

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Reducing the harmful effects of last-level cache polluters with an OS-level, software-only pollute buffer", Livio Soares et al., 41st IEEE/ACM International Symposium on Microarchitecture MICRO-41, N
한국정보과학회 2010 한국컴퓨터종합 학술발표논문집 제37권 제1호(A)(2010.06) - "가상화 환경에서 페이지 컬러링 동기화를 이용한 캐시 성능 향상 기법에 관한 연구" - 김정훈, 김인혁, 엄영익

Similar Documents

Publication Publication Date Title
US10552337B2 (en) Memory management and device
US20200334067A1 (en) Live page migration for hybrid memory virtual machines
US8769190B1 (en) System and method for reducing contentions in solid-state memory access
US8190839B2 (en) Using domains for physical address management in a multiprocessor system
CN113795828B (en) Service class of multifunctional device
TWI614669B (en) Migrating pages of different sizes between heterogeneous processors
CN103577345A (en) Methods and structure for improved flexibility in shared storage caching by multiple systems
JP2006277723A5 (en)
US10310986B1 (en) Memory management unit for shared memory allocation
US9875132B2 (en) Input output memory management unit based zero copy virtual machine to virtual machine communication
CN102279712A (en) Storage control method, system and device applied to network storage system
US10430327B2 (en) Virtual machine based huge page balloon support
US8006055B2 (en) Fine granularity hierarchiacal memory protection
CN102346682A (en) Information processing device and information processing method
US9304946B2 (en) Hardware-base accelerator for managing copy-on-write of multi-level caches utilizing block copy-on-write differential update table
CN104021094B (en) Data storage device and flash memory control method
CN115904212A (en) Data processing method and device, processor and hybrid memory system
JP2021033845A (en) Memory system and control method
US20200201691A1 (en) Enhanced message control banks
KR101179275B1 (en) Apparatus and method for management of memory
US8762647B2 (en) Multicore processor system and multicore processor
US20220229777A1 (en) Data storage system with multiple-size object allocator for disk cache
WO2015161804A1 (en) Cache partitioning method and device
US20240111672A1 (en) Data co-location using address hashing for high-performance processing in memory
US12008248B2 (en) Systems, methods, and devices for utilization aware memory allocation

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20150703

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20160607

Year of fee payment: 5