KR20230011787A - Method and apparatus for switching migration policy - Google Patents

Method and apparatus for switching migration policy Download PDF

Info

Publication number
KR20230011787A
KR20230011787A KR1020210092466A KR20210092466A KR20230011787A KR 20230011787 A KR20230011787 A KR 20230011787A KR 1020210092466 A KR1020210092466 A KR 1020210092466A KR 20210092466 A KR20210092466 A KR 20210092466A KR 20230011787 A KR20230011787 A KR 20230011787A
Authority
KR
South Korea
Prior art keywords
data
migration
module
stored
segment
Prior art date
Application number
KR1020210092466A
Other languages
Korean (ko)
Other versions
KR102514268B1 (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 KR1020210092466A priority Critical patent/KR102514268B1/en
Publication of KR20230011787A publication Critical patent/KR20230011787A/en
Application granted granted Critical
Publication of KR102514268B1 publication Critical patent/KR102514268B1/en

Links

Images

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/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0647Migration mechanisms
    • 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
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0638Combination of memories, e.g. ROM and RAM such as to permit replacement or supplementing of words in one module by words in another module
    • 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/0604Improving or facilitating administration, e.g. storage management
    • 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/0653Monitoring storage devices or systems
    • 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/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • 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/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/068Hybrid storage device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

Embodiments of the present invention provide a method and device for switching migration policy by considering application characteristics and memory writing characteristics in a hybrid memory system to which heterogeneous memories are applied. A migration policy switching device includes: a memory module including heterogeneous memories; and a memory manager which selects a migration policy suitable for the memory module based on stored application characteristics.

Description

마이그레이션 정책 스위칭 방법 및 장치 {METHOD AND APPARATUS FOR SWITCHING MIGRATION POLICY}Migration policy switching method and device {METHOD AND APPARATUS FOR SWITCHING MIGRATION POLICY}

본 발명이 속하는 기술 분야는 어플리케이션 특성 및 메모리 쓰기 특성에 따라 마이그레이션 정책을 스위칭하는 방법 및 장치에 관한 것이다. The technical field to which the present invention belongs relates to a method and apparatus for switching a migration policy according to application characteristics and memory write characteristics.

이 부분에 기술된 내용은 단순히 본 실시예에 대한 배경 정보를 제공할 뿐 종래기술을 구성하는 것은 아니다.The contents described in this part merely provide background information on the present embodiment and do not constitute prior art.

DRAM(dynamic random access memory), DDR(N)(Double Data Rate SDRAM) 등과 같은 휘발성 메모리(Volatile Memory, VM)는 쓰기 속도가 빠르다는 장점이 있으나, 전원이 공급되지 않으면 데이터가 소실되며, 데이터를 유지하기 위해서는 주기적으로 리플레시를 수행해야 하므로 전력 소비가 증가한다는 단점이 있다. Volatile memory (VM), such as DRAM (dynamic random access memory) and DDR(N) (Double Data Rate SDRAM), has the advantage of high writing speed, but data is lost when power is not supplied, and data In order to maintain, there is a disadvantage in that power consumption increases because refresh must be periodically performed.

상변화 메모리(Phase-Change Memory, PCM) 등와 같은 비휘발성 메모리(Non-Volatile Memory, NVM)는 휘발성 메모리보다 높은 집적도를 가져 고용량으로 구현하기에 유리하며, 전원이 인가되지 않아도 데이터가 유지되며, 대기 전력을 소비하지 않아 저전력 기기로 구현 가능하다는 장점이 있다. 그러나 NVM의 경우, 읽기(read) 속도에서는 VM과 유사한 수준을 나타내지만, 쓰기(write) 속도는 VM에 비해 크게 느려 병목 현상을 발생할 가능성이 높다는 단점과 함께 라이트 횟수에 제한이 있어 라이트 동작이 빈번하게 발생하는 어플리케이션에 적용하기에는 부적합하다는 단점이 있다. Non-Volatile Memory (NVM), such as Phase-Change Memory (PCM), has a higher density than volatile memory, so it is advantageous to implement high capacity, and data is maintained even when power is not applied, It has the advantage that it can be implemented as a low-power device because it does not consume standby power. However, NVM shows a similar level to VM in terms of read speed, but its write speed is much slower than that of VM, which is highly likely to cause bottlenecks. However, it has the disadvantage that it is not suitable for application to applications that occur frequently.

메모리의 종류별 장단점을 고려하여 이종의 메모리를 사용하는 하이브리드 방식을 적용한다. 하이브리드 메모리는 VM와 NVM의 조합을 포함하며 VM과 NVM의 단점을 서로 보완한다. 하이브리드 메모리에서는 NVM의 비휘발성, 고집적도 및 저전력 소비의 장점을 이용하되, 느린 라이트 속도 및 라이트 횟수 제한에 따른 문제를 VM을 이용하여 해소하는데 중점을 두고 있다.Considering the advantages and disadvantages of each type of memory, a hybrid method using different types of memory is applied. Hybrid memory includes a combination of VM and NVM and compensates for the disadvantages of VM and NVM. Hybrid memory uses the advantages of non-volatility, high integration, and low power consumption of NVM, but focuses on solving problems caused by slow write speed and limited number of writes by using VM.

여러 종류의 메모리 디바이스들로 구성된 하이브리드 메모리 시스템에서 어플리케이션의 특성에 따라 마이그레이션 정책을 변경할 필요가 있다.In a hybrid memory system composed of various types of memory devices, it is necessary to change a migration policy according to the characteristics of an application.

한국공개특허공보 제10-2015-0043102호 (2015.04.22)Korean Patent Publication No. 10-2015-0043102 (2015.04.22) 한국등록특허공보 제10-1894132호 (2018.08.27)Korean Registered Patent Publication No. 10-1894132 (2018.08.27)

본 발명의 실시예들은 이종의 메모리가 적용된 하이브리드 메모리 시스템에서 어플리케이션 특성 및 메모리 쓰기 특성을 고려하여 마이그레이션 정책을 스위칭하는데 주된 목적이 있다.The main purpose of embodiments of the present invention is to switch a migration policy in consideration of application characteristics and memory write characteristics in a hybrid memory system to which heterogeneous memories are applied.

본 발명의 명시되지 않은 또 다른 목적들은 하기의 상세한 설명 및 그 효과로부터 용이하게 추론할 수 있는 범위 내에서 추가적으로 고려될 수 있다.Other non-specified objects of the present invention may be additionally considered within the scope that can be easily inferred from the following detailed description and effects thereof.

본 실시예의 일 측면에 의하면 이종의 메모리를 포함하는 메모리 모듈; 및 저장된 어플리케이션 특징을 기준으로 상기 메모리 모듈에 적합한 마이그레이션 정책을 선택하는 메모리 매니저를 포함하는 마이그레이션 정책 스위칭 장치를 제공한다.According to an aspect of the present embodiment, a memory module including a heterogeneous memory; and a memory manager selecting a migration policy suitable for the memory module based on stored application characteristics.

상기 메모리 매니저는, 상기 마이그레이션 정책에 따라 마이그레이션을 수행하는 마이그레이션 엔진; 및 상기 마이그레이션의 대상이 되는 데이터의 원래 주소와 새로운 주소를 저장하는 리매핑 테이블을 포함할 수 있다.The memory manager may include a migration engine performing migration according to the migration policy; and a remapping table for storing an original address and a new address of the data to be migrated.

상기 마이그레이션 엔진은, 상기 어플리케이션 특징을 저장하는 컨트롤 레지스터; 상기 어플리케이션 특징을 기반으로 복수의 마이그레이션 정책 중에서 하나의 마이그레이션 정책을 선택하는 마이그레이션 정책 선택부; 상기 복수의 마이그레이션 정책을 저장하는 마이그레이션 정책 저장부; 및 상기 선택된 하나의 마이그레이션 정책을 진행하는 마이그레이션 정책 실행부를 포함할 수 있다.The migration engine may include a control register for storing the application characteristics; a migration policy selector selecting one migration policy from among a plurality of migration policies based on the characteristics of the application; a migration policy storage unit that stores the plurality of migration policies; and a migration policy execution unit that proceeds with the selected one migration policy.

상기 어플리케이션 특징은 민감도(sensitivity), 접근 빈도(access frequency), 쓰기 정도(write-intensity), 지역성(locality), 또는 이들의 조합을 포함할 수 있다.The application characteristics may include sensitivity, access frequency, write-intensity, locality, or a combination thereof.

상기 어플리케이션 특징은 어플리케이션 실행 초기에 운영체제에 의해 상기 컨트롤 레지스터에 저장될 수 있다.The application characteristics may be stored in the control register by an operating system at the beginning of application execution.

상기 마이그레이션 정책 실행부가 상기 선택된 하나의 마이그레이션 정책을 진행하면, 상기 리매핑 테이블은 업데이트될 수 있다.When the migration policy execution unit proceeds with the selected one migration policy, the remapping table may be updated.

상기 메모리 모듈은 다수의 휘발성 메모리 셀을 포함하는 VM(Volatile Memory) 모듈 및 다수의 비휘발성 메모리 셀을 포함하는 NVM(Non-Volatile Memory) 모듈을 포함할 수 있다.The memory module may include a volatile memory (VM) module including a plurality of volatile memory cells and a non-volatile memory (NVM) module including a plurality of non-volatile memory cells.

상기 마이그레이션 정책 실행부는 상기 NVM 모듈에 저장된 어플리케이션을 기지정된 세그먼트 단위로 구분하고, 각 세그먼트에 포함된 라이트 명령의 개수인 세그먼트 카운트를 획득하고 합산하여, 어플리케이션에 대한 라이트 카운트인 어플리케이션 카운트를 계산하고, 상기 어플리케이션 카운트가 기지정된 제1 문턱값 이상인 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 기지정된 제2 문턱값 이상인 세그먼트를 선택하여 상기 VM 모듈에 저장된 데이터와 마이그레이션하고, 마이그레이션된 세그먼트의 데이터 어드레스를 리맵핑하는 상기 NVM 모듈에 저장된 어플리케이션을 기지정된 세그먼트 단위로 구분하고, 각 세그먼트에 포함된 라이트 명령의 개수인 세그먼트 카운트를 획득하고 합산하여, 어플리케이션에 대한 라이트 카운트인 어플리케이션 카운트를 계산하고, 상기 어플리케이션 카운트가 기지정된 제1 문턱값 이상인 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 기지정된 제2 문턱값 이상인 세그먼트를 선택하여 상기 VM 모듈에 저장된 데이터와 마이그레이션하고, 마이그레이션된 세그먼트의 데이터 어드레스를 리맵핑할 수 있다.The migration policy execution unit classifies applications stored in the NVM module into predetermined segments, obtains and sums segment counts, which are the number of write commands included in each segment, and calculates an application count, which is a write count for the application; Selecting a segment having a segment count equal to or greater than a predetermined second threshold value among a plurality of segments of applications having the application count equal to or greater than a predetermined first threshold value, migrating the segment with data stored in the VM module, and remapping the data address of the migrated segment. The application stored in the NVM module is divided into predetermined segments, and segment counts, which are the number of write commands included in each segment, are obtained and summed to calculate an application count, which is a write count for the application, and the application count is A segment having a segment count equal to or greater than a predetermined second threshold may be selected from among a plurality of segments of applications having a predetermined first threshold or greater, migrated with data stored in the VM module, and a data address of the migrated segment may be remapped.

상기 VM 모듈은 상기 VM 모듈에 저장되는 데이터에 대한 액세스를 제어하는 VM 컨트롤러를 포함하고, 상기 NVM 모듈은 상기 NVM 모듈에 저장되는 데이터에 대한 액세스를 제어하는 NVM 컨트롤러를 포함할 수 있다.The VM module may include a VM controller controlling access to data stored in the VM module, and the NVM module may include an NVM controller controlling access to data stored in the NVM module.

상기 마이그레이션 정책 실행부는 상기 NVM 모듈에 저장된 어플리케이션의 세그먼트를 선택적으로 상기 VM 모듈에 저장된 데이터와 마이그레이션시키고, 마이그레이션된 데이터에 대한 액세스 명령이 인가되면, 리맵핑된 데이터 어드레스에 대한 액세스 명령으로 수정할 수 있다.The migration policy execution unit selectively migrates the segment of the application stored in the NVM module with the data stored in the VM module, and when an access command for the migrated data is applied, it can be modified with an access command for the remapped data address. .

상기 마이그레이션 정책 실행부는, 리드 또는 라이트 명령을 포함하는 액세스 명령이 인가되면, 인가된 액세스 명령을 분석하여, 리드 또는 라이트 명령과 어플리케이션 정보와 데이터 어드레스를 포함하는 라이트 요청 정보로 구분하는 명령 분석부를 포함할 수 있다.The migration policy execution unit includes a command analysis unit that, when an access command including a read or write command is applied, analyzes the applied access command and divides it into a read or write command, application information, and write request information including data address. can do.

상기 마이그레이션 정책 실행부는, 상기 라이트 요청 정보를 인가받아 인가된 어플리케이션을 다수의 세그먼트로 구분하고, 세그먼트 카운트와 어플리케이션 카운트를 획득하여 라이트 히스토리 테이블에 저장하며, 저장된 라이트 히스토리 테이블에 기초하여 상기 NVM 모듈에 저장된 프로그램의 세그먼트를 선택적으로 상기 VM 모듈의 대응하는 데이터와 마이그레이션시키고, 마이그레이션되어 변경된 데이터 어드레스를 획득하는 재할당부를 포함할 수 있다.The migration policy executor receives the write request information, divides the authorized application into a plurality of segments, obtains a segment count and an application count, stores them in a write history table, and based on the stored light history table, the NVM module and a reassignment unit for selectively migrating segments of the stored program with corresponding data of the VM module and obtaining a data address that has been migrated and changed.

상기 마이그레이션 정책 실행부는, 세그먼트의 데이터가 저장된 데이터 어드레스와 변경된 데이터 어드레스를 리맵핑하여 저장하고, 상기 리드 또는 라이트 명령이 인가되면, 인가된 리드 또는 라이트 명령에서 지정되는 데이터 어드레스를 리맵핑된 데이터 어드레스로 수정하여 상기 VM 컨트롤러와 상기 NVM 컨트롤러로 출력하는 리맵핑부를 포함할 수 있다.The migration policy executor remaps and stores the data address where segment data is stored and the changed data address, and when the read or write command is applied, the data address specified in the read or write command is converted to the remapped data address. It may include a remapping unit that is modified and outputs to the VM controller and the NVM controller.

상기 마이그레이션 정책 실행부는, 상기 NVM 모듈과 상기 VM 모듈 사이에서 마이그레이션되는 데이터를 인가받아 임시 저장하여 상대 모듈로 전달하는 스왑 버퍼를 포함할 수 있다.The migration policy execution unit may include a swap buffer for receiving data migrated between the NVM module and the VM module, temporarily storing the data, and transferring the data to the counterpart module.

상기 재할당부는 상기 라이트 히스토리 테이블을 분석하여, 어플리케이션 카운트가 상기 제1 문턱값 이상인 어플리케이션을 스왑 후보 어플리케이션으로 설정하고, 설정된 스왑 후보 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 상기 제2 문턱값 이상인 세그먼트를 마이그레이션이 수행되는 마이그레이션 대상 세그먼트로 선택할 수 있다.The reallocation unit analyzes the light history table, sets an application having an application count greater than or equal to the first threshold as a swap candidate application, and selects a segment having a segment count greater than or equal to the second threshold among a plurality of segments of the set swap candidate applications. It can be selected as the migration target segment from which migration is performed.

상기 재할당부는 상기 마이그레이션 대상 세그먼트에 대한 데이터 어드레스를 상기 NVM 컨트롤러로 전달하여, 상기 NVM 컨트롤러의 제어에 따라 상기 NVM 모듈에 저장된 상기 마이그레이션 대상 세그먼트가 상기 스왑 버퍼와 상기 VM 컨트롤러를 통해 상기 VM 모듈에 저장되도록 할 수 있다.The reallocation unit transfers the data address of the migration target segment to the NVM controller, and the migration target segment stored in the NVM module is transferred to the VM module through the swap buffer and the VM controller under the control of the NVM controller. can be saved.

상기 재할당부는 마이그레이션되는 세그먼트의 데이터 어드레스를 확인하여, 순차적으로 마이 그레이션되는 데이터의 데이터 어드레스 차이가 기지정된 기준 어드레스 단위 이하이면, 기지정된 개수의 데이터 스코프 중 동일한 데이터 스코프에 누적카운트하고, 기준 어드레스 단위를 초과하면 다른 데이터 스코프에 다시 누적 카운트하여 순차적으로 전달되는 데이터의 어드레스 변화를 기지정된 다수의 데이터 스코프에 누적 기록하며, 다수의 데이터 스코프에 누적 기록된 크기를 확인하고, 과반수 이상의 데이터 스코프에 누적 기록된 크기가 현재 설정된 마이그레이션 단위를 기준으로 미리 지정된 단위 유지 구간과 단위 감소 구간 및 단위 증가 구간 중 어느 구간에 해당하는지 확인하여 확인된 구간에 따라 마이그레이션되는 데이터의 마이그레이션 단위 크기를 조절할 수 있다.The reallocation unit checks the data addresses of the segments to be migrated, and if the data address difference between the sequentially migrated data is less than or equal to a predetermined reference address unit, the same data scope among the predetermined number of data scopes is accumulated and counted, and the reference If the address unit is exceeded, it is accumulated and counted again in other data scopes, and the address changes of sequentially delivered data are accumulated and recorded in a number of predetermined data scopes, the accumulated and recorded sizes in multiple data scopes are checked, and more than half of the data scopes You can adjust the size of the migration unit of the data to be migrated according to the checked interval by checking whether the cumulatively recorded size in .

상기 마이그레이션 정책 실행부는 마이그레이션 실행 중 액세스 명령이 인가되면, 마이그레이션되는 세그먼트의 데이터 중 스왑 버퍼로 전송되는 데이터의 전송 완료 후, 마이그레이션을 일시 중지시키고, 액세스 명령에 대응하는 동작을 수행할 수 있다.When an access command is applied during migration, the migration policy executor may pause migration and perform an operation corresponding to the access command after completing transfer of data transferred to a swap buffer among data of a segment to be migrated.

상기 마이그레이션 정책 실행부는 상기 액세스 명령에 의해 지정되는 데이터가 상기 스왑 버퍼에 저장되어 있는지 판별하고, 상기 스왑 버퍼에 저장된 것으로 판별되면, 상기 스왑 버퍼에 저장된 데이터에 액세스를 수행하며, 상기 스왑 버퍼에 저장되지 않은 것으로 판별되면, 상기 VM 컨트롤러 또는 상기 NVM 컨트롤러를 통해 상기 VM 모듈 또는 상기 NVM 모듈에 저장된 데이터에 액세스를 수행할 수 있다.The migration policy execution unit determines whether the data designated by the access command is stored in the swap buffer, and if it is determined that the data stored in the swap buffer is stored, accesses the data stored in the swap buffer and stores the data in the swap buffer. If it is determined that it is not, access to data stored in the VM module or the NVM module may be performed through the VM controller or the NVM controller.

본 실시예의 다른 측면에 의하면 마이그레이션 정책 스위칭 방법에 있어서, 어플리케이션 작성 과정 또는 컴파일 과정에서 어플리케이션 특징을 획득하는 단계; 어플리케이션 실행 초기에 운영체제에 의해 메모리 매니저의 컨트롤 레지스터에 상기 어플리케이션 특징을 입력하는 단계; 및 상기 컨트롤 레지스터에 저장된 어플리케이션 특징을 기준으로 마이그레이션 정책을 선택하는 단계를 포함하는 마이그레이션 정책 스위칭 방법을 제공한다.According to another aspect of the present embodiment, in a migration policy switching method, acquiring application characteristics in a process of writing or compiling an application; inputting the application characteristics into a control register of a memory manager by an operating system at the beginning of application execution; and selecting a migration policy based on application characteristics stored in the control register.

상기 마이그레이션 정책을 선택하는 단계는, 메모리 접근 횟수 또는 수행 시간을 획득하는 단계; 상기 메모리 접근 횟수 또는 수행 시간을 기준치와 비교한 결과에 따라 마이그레이션 수행을 판단하는 단계; 상기 어플리케이션 특징을 기준으로 상기 마이그레이션 후보를 결정하는 단계; 상기 마이그레이션 후보에 따른 마이그레이션을 수행하는 단계; 및 상기 마이그레이션의 대상이 되는 데이터의 주소가 저장된 상기 리매핑 테이블을 업데이트하는 단계를 포함할 수 있다.The selecting of the migration policy may include obtaining a memory access count or an execution time; determining migration execution according to a result of comparing the number of times of access to the memory or execution time with a reference value; determining the migration candidate based on the characteristics of the application; performing migration according to the migration candidate; and updating the remapping table in which addresses of the data to be migrated are stored.

이상에서 설명한 바와 같이 본 발명의 실시예들에 의하면, 이종의 메모리가 적용된 하이브리드 메모리 시스템에서 어플리케이션 특성 및 메모리 쓰기 특성을 고려하여 마이그레이션 정책을 스위칭할 수 있는 효과가 있다.As described above, according to the embodiments of the present invention, in a hybrid memory system to which heterogeneous memories are applied, a migration policy can be switched in consideration of application characteristics and memory write characteristics.

여기에서 명시적으로 언급되지 않은 효과라 하더라도, 본 발명의 기술적 특징에 의해 기대되는 이하의 명세서에서 기재된 효과 및 그 잠정적인 효과는 본 발명의 명세서에 기재된 것과 같이 취급된다.Even if the effects are not explicitly mentioned here, the effects described in the following specification expected by the technical features of the present invention and their provisional effects are treated as described in the specification of the present invention.

도 1 및 도 2는 본 발명의 일 실시예에 따른 마이그레이션 정책 스위칭 방법을 예시한 흐름도이다.
도 3 내지 도 6은 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치를 예시한 도면이다.
도 7 내지 도 12는 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 쓰기 특성을 고려한 마이그레이션 정책에 따른 마이그레이션 동작을 예시한 도면이다.
도 13은 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 마이그레이션 실행부를 예시한 도면이다.
도 14는 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 재할당부를 예시한 도면이다.
도 15는 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 마이그레이션 데이터 단위 크기를 결정하는 개념을 예시한 도면이다.
1 and 2 are flowcharts illustrating a migration policy switching method according to an embodiment of the present invention.
3 to 6 are diagrams illustrating a migration policy switching device according to another embodiment of the present invention.
7 to 12 are diagrams illustrating a migration operation according to a migration policy considering write characteristics of a migration policy switching device according to another embodiment of the present invention.
13 is a diagram illustrating a migration execution unit of a migration policy switching device according to another embodiment of the present invention.
14 is a diagram illustrating a reallocation unit of a migration policy switching device according to another embodiment of the present invention.
15 is a diagram illustrating a concept of determining a migration data unit size of a migration policy switching device according to another embodiment of the present invention.

이하, 본 발명을 설명함에 있어서 관련된 공지기능에 대하여 이 분야의 기술자에게 자명한 사항으로서 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략하고, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. Hereinafter, in the description of the present invention, if it is determined that a related known function may unnecessarily obscure the subject matter of the present invention as an obvious matter to those skilled in the art, the detailed description thereof will be omitted, and some embodiments of the present invention will be described. It will be described in detail through exemplary drawings.

도 1 및 도 2는 본 발명의 일 실시예에 따른 마이그레이션 정책 스위칭 방법을 예시한 흐름도이다. 마이그레이션 정책 스위칭 방법은 마이그레이션 정책 스위칭 장치에 의해 수행될 수 있다.1 and 2 are flowcharts illustrating a migration policy switching method according to an embodiment of the present invention. The migration policy switching method may be performed by a migration policy switching device.

마이그레이션 정책 스위칭 방법은, 어플리케이션 작성 과정 또는 컴파일 과정에서 어플리케이션 특징을 획득하는 단계(S10), 어플리케이션 실행 초기에 운영체제에 의해 메모리 매니저의 컨트롤 레지스터에 상기 어플리케이션 특징을 입력하는 단계(S20), 및 컨트롤 레지스터에 저장된 어플리케이션 특징을 기준으로 마이그레이션 정책을 선택하는 단계(S30)를 포함한다.The migration policy switching method includes acquiring application characteristics in an application writing process or compiling process (S10), inputting the application characteristics to a control register of a memory manager by an operating system at the beginning of application execution (S20), and a control register. and selecting a migration policy based on application characteristics stored in (S30).

어플리케이션을 동작시키는 단계(S21) 이후에 마이그레이션 정책을 선택하는 단계(S30)를 수행한다.After the step of operating the application (S21), the step of selecting a migration policy (S30) is performed.

마이그레이션 정책을 선택하는 단계(S30)는 메모리 접근 횟수 또는 수행 시간을 획득하는 단계(S31), 메모리 접근 횟수 또는 수행 시간을 기준치와 비교한 결과(예컨대 기준치를 초과하는 조건)에 따라 마이그레이션 수행을 판단하는 단계(S32), 어플리케이션 특징을 기준으로 마이그레이션 후보를 결정하는 단계(S33), 마이그레이션 후보에 따른 마이그레이션을 수행하는 단계(S34), 및 마이그레이션의 대상이 되는 데이터의 주소가 저장된 리매핑 테이블을 업데이트하는 단계(S35)를 포함할 수 있다.The step of selecting a migration policy (S30) is the step of acquiring the number of memory accesses or execution time (S31), and the result of comparing the number of memory accesses or execution time with a reference value (for example, a condition exceeding the reference value) determines migration execution. (S32), determining a migration candidate based on application characteristics (S33), performing migration according to the migration candidate (S34), and updating a remapping table in which addresses of data to be migrated are stored. Step S35 may be included.

리매핑 테이블을 업데이트하는 단계(S35)를 완료하면, 일반 메모리 동작을 수행하는 단계(S36)를 수행한다.When the step of updating the remapping table (S35) is completed, the step of performing a general memory operation (S36) is performed.

마이그레이션 수행을 판단하는 단계(S32)에 따른 결과가 마이그레이션 수행이 필요없음을 나타내면, 일반 메모리 동작을 수행하는 단계(S36)를 수행한다.If the result of determining whether migration is performed (S32) indicates that migration is not necessary, a normal memory operation (S36) is performed.

도 3 내지 도 6은 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치를 예시한 도면이다.3 to 6 are diagrams illustrating a migration policy switching device according to another embodiment of the present invention.

마이그레이션 정책 스위칭 장치는 이종의 메모리를 포함하는 메모리 모듈(200, 300) 및 저장된 어플리케이션 특징을 기준으로 메모리 모듈에 적합한 마이그레이션 정책을 선택하는 메모리 매니저(100)를 포함한다.The migration policy switching device includes memory modules 200 and 300 including heterogeneous memories and a memory manager 100 that selects a migration policy suitable for the memory module based on stored application characteristics.

메모리 매니저(100)는, 마이그레이션의 대상이 되는 데이터의 원래 주소와 새로운 주소를 저장하는 리매핑 테이블(110) 및 마이그레이션 정책에 따라 마이그레이션을 수행하는 마이그레이션 엔진(120)을 포함할 수 있다.The memory manager 100 may include a remapping table 110 that stores original addresses and new addresses of data to be migrated, and a migration engine 120 that performs migration according to a migration policy.

마이그레이션 엔진(120)은, 어플리케이션 특징을 저장하는 컨트롤 레지스터(121), 어플리케이션 특징을 기반으로 복수의 마이그레이션 정책 중에서 하나의 마이그레이션 정책을 선택하는 마이그레이션 정책 선택부(122), 복수의 마이그레이션 정책을 저장하는 마이그레이션 정책 저장부(123), 및 선택된 하나의 마이그레이션 정책을 진행하는 마이그레이션 정책 실행부(124)를 포함할 수 있다.The migration engine 120 includes a control register 121 that stores application characteristics, a migration policy selector 122 that selects one migration policy from among a plurality of migration policies based on the application characteristics, and a plurality of migration policies that stores the migration policies. It may include a migration policy storage unit 123 and a migration policy execution unit 124 that proceeds with one selected migration policy.

컨트롤 레지스터(Control Register, 121)는 마이그레이션 정책 선택부(122)에서 결정에 필요한 정보를 담고 있다. 어플리케이션 특징은 어플리케이션 실행 초기에 운영체제에 의해 컨트롤 레지스터에 저장될 수 있다. A control register (Control Register, 121) contains information necessary for decision in the migration policy selection unit (122). Application characteristics may be stored in control registers by the operating system at the beginning of application execution.

어플리케이션 특징은 컴파일러의 분석 또는 프로그래머의 기입을 통해 획득할 수 있다. 어플리케이션 특징은 민감도(sensitivity), 접근 빈도(access frequency), 쓰기 정도(write-intensity), 지역성(locality), 또는 이들의 조합을 포함할 수 있다. 어플리케이션 특징은 파일의 형태일 수도 있고 컴파일된 바이너리의 헤더에 존재할 수도 있고 컴파일러 지시자 #pragma의 전처리기에 존재할 수도 있다.Application characteristics can be obtained through compiler analysis or programmer writing. Application characteristics may include sensitivity, access frequency, write-intensity, locality, or a combination thereof. Application features may be in the form of files, may exist in the headers of compiled binaries, or may exist in the preprocessor of #pragma compiler directives.

컨트롤 레지스터(121)는 시스템 메모리 맵에 메모리 매핑 I/O로 존재하여 자신의 주소가 있다. 운영체제는 메모리 매니저의 드라이버를 통해 컨트롤 레지스터에 어플리케이션 특징을 어플리케이션 실행 시작에 저장한다.The control register 121 exists as a memory mapped I/O in the system memory map and has its own address. The operating system stores the application characteristics in the control register through the driver of the memory manager at the start of application execution.

마이그레이션 정책 선택부(Migration Policy Selector, 122)는 컨트롤 레지스터의 정보를 바탕으로 어떠한 마이그레이션 정책을 적용할지 선택한다. The migration policy selector 122 selects a migration policy to be applied based on control register information.

마이그레이션 정책 실행부(124)는 선택된 마이그레이션 정책을 바탕으로 마이그레이션을 진행하고 리매핑 테이블(110)을 업데이트한다. 마이그레이션 정책 실행부가 선택된 하나의 마이그레이션 정책을 진행하면, 리매핑 테이블에서 마이그레이션에 따라 해당하는 주소가 업데이트될 수 있다. 리매핑 테이블(110)은 마이그레이션 정책 실행부(124)에서 마이그레이션을 진행하면 해당 데이터들의 원래 주소와 새로운 주소를 저장한다.The migration policy executor 124 performs migration based on the selected migration policy and updates the remapping table 110 . When the migration policy execution unit proceeds with one selected migration policy, a corresponding address may be updated according to migration in the remapping table. The remapping table 110 stores original addresses and new addresses of corresponding data when migration is performed by the migration policy execution unit 124 .

메모리 모듈은 다수의 휘발성 메모리 셀을 포함하는 VM(Volatile Memory) 모듈 및 다수의 비휘발성 메모리 셀을 포함하는 NVM(Non-Volatile Memory) 모듈을 포함할 수 있다.The memory module may include a volatile memory (VM) module including a plurality of volatile memory cells and a non-volatile memory (NVM) module including a plurality of non-volatile memory cells.

마이그레이션 정책 실행부는 NVM 모듈(300)에 저장된 어플리케이션을 기지정된 세그먼트 단위로 구분하고, 각 세그먼트에 포함된 라이트 명령의 개수인 세그먼트 카운트를 획득하고 합산하여, 어플리케이션에 대한 라이트 카운트인 어플리케이션 카운트를 계산하고, 어플리케이션 카운트가 기지정된 제1 문턱값 이상인 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 기지정된 제2 문턱값 이상인 세그먼트를 선택하여 VM 모듈에 저장된 데이터와 마이그레이션하고, 마이그레이션된 세그먼트의 데이터 어드레스를 리맵핑하는 NVM 모듈에 저장된 어플리케이션을 기지정된 세그먼트 단위로 구분하고, 각 세그먼트에 포함된 라이트 명령의 개수인 세그먼트 카운트를 획득하고 합산하여, 어플리케이션에 대한 라이트 카운트인 어플리케이션 카운트를 계산하고, 어플리케이션 카운트가 기지정된 제1 문턱값 이상인 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 기지정된 제2 문턱값 이상인 세그먼트를 선택하여 VM 모듈(200)에 저장된 데이터와 마이그레이션하고, 마이그레이션된 세그먼트의 데이터 어드레스를 리맵핑할 수 있다.The migration policy execution unit divides the applications stored in the NVM module 300 into predetermined segments, obtains and sums the segment counts, which are the number of write commands included in each segment, and calculates the application count, which is the write count for the application. , Selecting a segment having a segment count equal to or greater than a predetermined second threshold among a plurality of segments of applications having an application count equal to or greater than a predetermined first threshold, migrating the segment with data stored in the VM module, and remapping the data address of the migrated segment. The applications stored in the NVM module are divided into predetermined segments, and segment counts, which are the number of write commands included in each segment, are obtained and summed to calculate the application count, which is the write count for the application. A segment having a segment count equal to or greater than a predetermined second threshold may be selected from among a plurality of segments of an application having a threshold value of 1 or greater, migrated with data stored in the VM module 200, and a data address of the migrated segment may be remapped.

VM 모듈(200)은 VM 모듈에 저장되는 데이터에 대한 액세스를 제어하는 VM 컨트롤러(210)를 포함하고, NVM 모듈(300)은 NVM 모듈에 저장되는 데이터에 대한 액세스를 제어하는 NVM 컨트롤러(310)를 포함할 수 있다.The VM module 200 includes a VM controller 210 that controls access to data stored in the VM module, and the NVM module 300 includes an NVM controller 310 that controls access to data stored in the NVM module. can include

마이그레이션 정책 실행부는 NVM 모듈에 저장된 어플리케이션의 세그먼트를 선택적으로 VM 모듈에 저장된 데이터와 마이그레이션시키고, 마이그레이션된 데이터에 대한 액세스 명령이 인가되면, 리맵핑된 데이터 어드레스에 대한 액세스 명령으로 수정할 수 있다.The migration policy executor selectively migrates the segment of the application stored in the NVM module with the data stored in the VM module, and when an access command for the migrated data is applied, it can be modified with an access command for the remapped data address.

마이그레이션 정책 실행부(124)는, 리드 또는 라이트 명령을 포함하는 액세스 명령이 인가되면, 인가된 액세스 명령을 분석하여, 리드 또는 라이트 명령과 어플리케이션 정보와 데이터 어드레스를 포함하는 라이트 요청 정보로 구분하는 명령 분석부(320)를 포함할 수 있다.When an access command including a read or write command is applied, the migration policy execution unit 124 analyzes the applied access command and divides the read or write command into a read or write command, application information, and write request information including data address. An analysis unit 320 may be included.

마이그레이션 정책 실행부(124)는 라이트 요청 정보를 인가받아 인가된 어플리케이션을 다수의 세그먼트로 구분하고, 세그먼트 카운트와 어플리케이션 카운트를 획득하여 라이트 히스토리 테이블에 저장하며, 저장된 라이트 히스토리 테이블에 기초하여 NVM 모듈에 저장된 프로그램의 세그먼트를 선택적으로 VM 모듈의 대응하는 데이터와 마이그레이션시키고, 마이그레이션되어 변경된 데이터 어드레스를 획득하는 재할당부(132)를 포함할 수 있다.The migration policy executor 124 receives the write request information, divides the authorized applications into a plurality of segments, obtains a segment count and an application count, stores them in a light history table, and based on the stored light history table, the NVM module It may include a reassignment unit 132 that selectively migrates segments of the stored program with corresponding data of the VM module and obtains data addresses that have been migrated and changed.

마이그레이션 정책 실행부(124)는, 세그먼트의 데이터가 저장된 데이터 어드레스와 변경된 데이터 어드레스를 리맵핑하여 저장하고, 리드 또는 라이트 명령이 인가되면, 인가된 리드 또는 라이트 명령에서 지정되는 데이터 어드레스를 리맵핑된 데이터 어드레스로 수정하여 VM 컨트롤러와 NVM 컨트롤러로 출력하는 리맵핑부(133)를 포함할 수 있다.The migration policy executor 124 remaps and stores the data address where data of the segment is stored and the changed data address, and when a read or write command is applied, the data address specified in the read or write command is remapped. It may include a remapping unit 133 that modifies data addresses and outputs them to the VM controller and the NVM controller.

마이그레이션 정책 실행부(124)는, NVM 모듈과 VM 모듈 사이에서 마이그레이션되는 데이터를 인가받아 임시 저장하여 상대 모듈로 전달하는 스왑 버퍼(134)를 포함할 수 있다.The migration policy execution unit 124 may include a swap buffer 134 that receives data migrated between the NVM module and the VM module, temporarily stores it, and transfers it to the counterpart module.

재할당부는 라이트 히스토리 테이블을 분석하여, 어플리케이션 카운트가 제1 문턱값 이상인 어플리케이션을 스왑 후보 어플리케이션으로 설정하고, 설정된 스왑 후보 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 제2 문턱값 이상인 세그먼트를 마이그레이션이 수행되는 마이그레이션 대상 세그먼트로 선택할 수 있다.The reallocation unit analyzes the light history table, sets an application having an application count greater than or equal to a first threshold as a swap candidate application, and migrates a segment having a segment count greater than or equal to a second threshold among a plurality of segments of the set swap candidate application. It can be selected as the target segment for migration.

재할당부는 마이그레이션 대상 세그먼트에 대한 데이터 어드레스를 NVM 컨트롤러로 전달하여, NVM 컨트롤러의 제어에 따라 NVM 모듈에 저장된 마이그레이션 대상 세그먼트가 스왑 버퍼와 VM 컨트롤러를 통해 VM 모듈에 저장되도록 할 수 있다.The reallocation unit may transfer a data address of a migration target segment to the NVM controller so that the migration target segment stored in the NVM module is stored in the VM module through the swap buffer and the VM controller under the control of the NVM controller.

재할당부는 마이그레이션되는 세그먼트의 데이터 어드레스를 확인하여, 순차적으로 마이 그레이션되는 데이터의 데이터 어드레스 차이가 기지정된 기준 어드레스 단위 이하이면, 기지정된 개수의 데이터 스코프 중 동일한 데이터 스코프에 누적카운트하고, 기준 어드레스 단위를 초과하면 다른 데이터 스코프에 다시 누적 카운트하여 순차적으로 전달되는 데이터의 어드레스 변화를 기지정된 다수의 데이터 스코프에 누적 기록하며, 다수의 데이터 스코프에 누적 기록된 크기를 확인하고, 과반수 이상의 데이터 스코프에 누적 기록된 크기가 현재 설정된 마이그레이션 단위를 기준으로 미리 지정된 단위 유지 구간과 단위 감소 구간 및 단위 증가 구간 중 어느 구간에 해당하는지 확인하여 확인된 구간에 따라 마이그레이션되는 데이터의 마이그레이션 단위 크기를 조절할 수 있다.The reassignment unit checks the data addresses of the segments to be migrated, and if the data address difference between the sequentially migrated data is less than or equal to a predetermined reference address unit, the same data scope among the predetermined number of data scopes is accumulated and counted, and the reference address If the unit is exceeded, it is accumulated and counted again in other data scopes, and the address change of sequentially delivered data is accumulated and recorded in a number of predetermined data scopes, the accumulated and recorded size in multiple data scopes is checked, and It is possible to check whether the cumulatively recorded size corresponds to a pre-designated unit maintenance interval, unit reduction interval, or unit increase interval based on the currently set migration unit, and adjust the migration unit size of data to be migrated according to the identified interval.

마이그레이션 정책 실행부는 마이그레이션 실행 중 액세스 명령이 인가되면, 마이그레이션되는 세그먼트의 데이터 중 스왑 버퍼로 전송되는 데이터의 전송 완료 후, 마이그레이션을 일시 중지시키고, 액세스 명령에 대응하는 동작을 수행할 수 있다.When an access command is applied during migration, the migration policy executor may pause migration and perform an operation corresponding to the access command after completing transfer of data transferred to a swap buffer among data of a segment to be migrated.

마이그레이션 정책 실행부는 액세스 명령에 의해 지정되는 데이터가 상기 스왑 버퍼에 저장되어 있는지 판별하고, 스왑 버퍼에 저장된 것으로 판별되면, 스왑 버퍼에 저장된 데이터에 액세스를 수행하며, 스왑 버퍼에 저장되지 않은 것으로 판별되면, VM 컨트롤러 또는 NVM 컨트롤러를 통해 VM 모듈 또는 NVM 모듈에 저장된 데이터에 액세스를 수행할 수 있다.The migration policy execution unit determines whether the data specified by the access command is stored in the swap buffer, and if it is determined that it is stored in the swap buffer, accesses the data stored in the swap buffer, and if it is determined that it is not stored in the swap buffer , data stored in the VM module or NVM module can be accessed through the VM controller or NVM controller.

도 7 내지 도 12는 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 쓰기 특성을 고려한 마이그레이션 정책에 따른 마이그레이션 동작을 예시한 도면이다.7 to 12 are diagrams illustrating a migration operation according to a migration policy considering write characteristics of a migration policy switching device according to another embodiment of the present invention.

메모리 매니저(100)는 VM 모듈(200) 또는 NVM 모듈(300) 중 외부에서 인가되는 리드 명령에 대응하는 데이터가 저장된 모듈을 판별하고, 데이터가 모듈(200)에 저장된 것으로 판별되면, VM 컨트롤러(210)로 리드 명령을 전달하며, 데이터가 NVM 모듈(300)에 저장된 것으로 판별되면, NVM 컨트롤러(310)로 리드 명령을 전달한다. 그리고 VM 컨트롤러(210) 또는 VM 컨트롤러(210)로부터 대응하는 데이터를 인가받아 외부로 출력한다. The memory manager 100 determines which module, among the VM module 200 and the NVM module 300, stores data corresponding to a read command applied from the outside, and if it is determined that the data is stored in the module 200, the VM controller ( 210), and when it is determined that the data is stored in the NVM module 300, the read command is transferred to the NVM controller 310. Then, the corresponding data is received from the VM controller 210 or the VM controller 210 and output to the outside.

메모리 매니저(100)는 라이트 명령에 따라 VM 컨트롤러(210) 또는 VM 컨트롤러(210)로 저장될 데이터와 라이트 명령을 전달하여, VM 모듈(200) 또는 NVM 모듈(300)에 데이터가 저장되도록 한다. 라이트 명령과 함께 인가되는 데이터는 기본적으로 NVM 모듈(300)에 저장되지만, 라이트되는 데이터가 NVM 모듈(300)에서 VM 모듈(200)으로 이전에 마이그레이션되어 저장되어 있는 경우, VM 모듈(200)에 기저장된 데이터를 라이트되는 데이터로 오버라이트 (overwrite)하여 갱신할 수 있다. The memory manager 100 transfers data to be stored and a write command to the VM controller 210 or the VM controller 210 according to a write command, so that the data is stored in the VM module 200 or the NVM module 300 . Data applied with the write command is basically stored in the NVM module 300, but if the data to be written has been previously migrated and stored from the NVM module 300 to the VM module 200, the VM module 200 It can be updated by overwriting the previously stored data with data to be written.

메모리 매니저(100)는 NVM 모듈(300)에 저장된 데이터 중 VM 모듈(200)로 마이그레이션되어야 하는 데이터를 선별하고, 선별 결과를 VM 컨트롤러(210)와 NVM 컨트롤러(310)로 전달하여, NVM 모듈(300)과 VM 모듈 (200) 각각이 선별된 데이터와 대응하는 데이터를 상호 스왑하도록 한다. The memory manager 100 selects data to be migrated to the VM module 200 from among data stored in the NVM module 300, and transfers the selection result to the VM controller 210 and the NVM controller 310, and the NVM module ( 300) and the VM module 200 mutually swap the selected data and the corresponding data.

메모리 매니저(100)는 VM 모듈(200)과 NVM 모듈(300) 사이에서 데이터 마이그레이션이 수행될 수 있도록 VM 컨트롤러(210)와 NVM 컨트롤러(310)에서 전달되는 데이터를 임시로 저장하는 스왑 버퍼를 포함할 수 있다. The memory manager 100 includes a swap buffer that temporarily stores data transferred from the VM controller 210 and the NVM controller 310 so that data migration can be performed between the VM module 200 and the NVM module 300. can do.

VM 컨트롤러(210)는 메모리 매니저(100)의 관리에 따라 VM 모듈(200)을 제어한다. VM 컨트롤러(210)는 메모리 매니저(100)를 통해 인가되는 리드 명령에 응답하여, VM 모듈(200)에 저장된 데이터를 탐색하여 획득하고, 획득된 데이터를 메모리 매니저(100)로 전달한다. 그리고 라이트 명령에 응답하여, VM 모듈 (200)의 기지정된 메모리 어드레스에 인가된 데이터를 저장한다. 이때, VM 컨트롤러(210)는 VM 모듈(200)에서 획득되는 데이터 또는 메모리 매니저(100)에서 전달되어 VM 모듈(200)에 저장되어야 하는 데이터를 임시 저장하는 버퍼(220)를 포함할 수 있다. The VM controller 210 controls the VM module 200 according to the management of the memory manager 100 . The VM controller 210 searches for and acquires data stored in the VM module 200 in response to a read command applied through the memory manager 100 and transfers the obtained data to the memory manager 100 . In response to the write command, the applied data is stored in a predetermined memory address of the VM module 200 . In this case, the VM controller 210 may include a buffer 220 for temporarily storing data obtained from the VM module 200 or data transferred from the memory manager 100 and stored in the VM module 200 .

VM 컨트롤러(210)는 기지정된 주기로 VM 모듈(200)에 저장된 데이터를 리플레시하여, VM 모듈(200)에 저장된 데이터가 소실되지 않도록 하며, 메모리 매니저(100)의 관리 하에 하이브리드 메모리 장치로 인가되는 전원이 차단되기 이전에 VM 모듈(200)에 저장된 데이터를 인가받아 메모리 매니저(100)의 스왑 버퍼를 통해 NVM 컨트롤러(310)로 전달할 수 있다. The VM controller 210 refreshes the data stored in the VM module 200 at a predetermined cycle so that the data stored in the VM module 200 is not lost, and is applied to the hybrid memory device under the management of the memory manager 100. Before power is cut off, data stored in the VM module 200 may be authorized and transferred to the NVM controller 310 through the swap buffer of the memory manager 100 .

NVM 컨트롤러(310)는 메모리 매니저(100)의 관리에 따라 NVM 모듈 (300)을 제어한다. NVM 컨트롤러(310)는 VM 컨트롤러(210)와 유사하게 메모리 매니저(100)를 통해 인가되는 리드 명령에 응답하여 NVM 모듈(300)에 저장된 데이터를 탐색하여 획득하고, 획득된 데이터를 메모리 매니저(100)로 전달하며, 라이트 명령에 응답하여 NVM 모듈(300)의 기지정된 메모리 어드레스에 인가된 데이터를 저장한다. 그리고 NVM 컨트롤러(310) 또한 NVM 버퍼(320)를 포함하여, NVM 모듈(300)에서 획득되는 데이터 또는 메모리 매니저(100)에서 전달되어 NVM 모듈(300)에 저장되어야 하는 데이터를 임시 저장할 수 있다. The NVM controller 310 controls the NVM module 300 according to the management of the memory manager 100 . Similar to the VM controller 210, the NVM controller 310 searches for and obtains data stored in the NVM module 300 in response to a read command applied through the memory manager 100, and transmits the obtained data to the memory manager 100. ), and stores the applied data in a predetermined memory address of the NVM module 300 in response to a write command. The NVM controller 310 may also include the NVM buffer 320 to temporarily store data acquired from the NVM module 300 or data transferred from the memory manager 100 and stored in the NVM module 300.

NVM 컨트롤러(310)는 VM 컨트롤러(210)와 달리 NVM 모듈(300)에 저 장된 데이터에 대해 리플레시 동작을 수행할 필요가 없다. NVM 컨트롤러 (130)는 메모리 매니저(100)에 의해 선별되는 NVM 모듈(300)에 저장된 데이터를 인가받아, 스왑 버퍼를 통해 VM 컨트롤러(210)로 전달할 수 있다. Unlike the VM controller 210, the NVM controller 310 does not need to perform a refresh operation on data stored in the NVM module 300. The NVM controller 130 may receive data stored in the NVM module 300 selected by the memory manager 100 and transfer it to the VM controller 210 through a swap buffer.

VM 모듈(200)은 다수의 VM 셀을 포함하여 전원이 인가되는 동안 데이터를 저장한다. VM 모듈(200)은 메모리 매니저(100)의 VM 컨트롤러(210)의 제어에 따라 데이터를 인가받아 저장하거나 리플레시하고, 저장된 데이터를 VM 컨트롤러(210)로 전달한다. The VM module 200 includes a plurality of VM cells to store data while power is applied. The VM module 200 receives, stores or refreshes data under the control of the VM controller 210 of the memory manager 100, and transfers the stored data to the VM controller 210.

NVM 모듈(300)은 다수의 NVM 셀을 포함하여 전원 공급 여부에 무관하게 항시 데이터를 저장할 수 있다. NVM 모듈(300)은 메모리 매니저(100)의 NVM 컨트롤러(310)의 제어에 따라 데이터를 인가받아 저장하고, 저장된 데이터를 NVM 컨트롤러(310)로 전달한다. The NVM module 300 includes a plurality of NVM cells and can always store data regardless of whether or not power is supplied. The NVM module 300 receives and stores data under the control of the NVM controller 310 of the memory manager 100 and transfers the stored data to the NVM controller 310 .

메모리 매니저(100)는 프로그램(또는 어플리케이션)에 대한 데이터를 세그먼트(segment) 단위로 구분하여 관리한다. 세그먼트는 마이그레이션되기 위해 선별되는 데이터 단위를 나타낸다. NVM 모듈(300)에는 각각 다수의 세그먼트(Segment 0 ~ Segment 3)로 구성되는 다수의 프로그램(Program 0 ~ Program 3)이 저장될 수 있으며, 메모리 매니저(100)은 NVM 모듈(300)에 저장된 다수의 프로그램(Program 0 ~ Program 3) 각각에서 세그먼트를 선별하여 VM 모듈(200)로 마이그레이션시킬 수 있 다. The memory manager 100 classifies and manages program (or application) data in segments. A segment represents a unit of data that is selected to be migrated. A plurality of programs (Program 0 to Program 3) composed of a plurality of segments (Segment 0 to Segment 3) may be stored in the NVM module 300, and the memory manager 100 may store a plurality of programs stored in the NVM module 300. Segments may be selected from each of the programs (Program 0 to Program 3) and migrated to the VM module 200.

도 7에서는 NVM 모듈(300)에서 제0 및 제1 프로그램(Program 0, Program 1)에서 각각 하나의 세그먼트((segment 3), (segment 0))와 제2 프로그램 (Program 2)에서 2개의 세그먼트(segment 1, segment 2)가 선별되어 VM 모듈(200)로 마이그레이션되는 경우를 가정하여 도시하였다.In FIG. 7, in the NVM module 300, one segment ((segment 3), (segment 0)) in the 0th and 1st programs (Program 0, Program 1) and two segments in the 2nd program (Program 2), respectively. It is shown assuming that (segment 1, segment 2) is selected and migrated to the VM module 200.

마이그레이션 정책 스위칭 장치는 VM과 NVM의 쓰기 특성을 고려하여 NVM의 라이트 횟수를 줄이고 쓰기 속도를 향상시킨다.The migration policy switching device reduces the number of NVM writes and improves the write speed by considering the write characteristics of VM and NVM.

마이그레이션 정책 스위칭 장치는 프로그램(어플리케이션)을 세그먼트 단위로 구분하고, 구분된 세그먼트의 쓰기 명령 개수를 기반으로 마이그레이션 대상 세그먼트를 선별하여 마이그레이션을 수행하며, 마이그레이션 대상 세그먼트의 데이터 어드레스 변화에 기초하여 마이그레이션 단위 크기를 조절하여 쓰기 효율성을 향상시킨다.The migration policy switching device classifies programs (applications) into segments, selects migration target segments based on the number of write commands in the segmented segments, performs migration, and performs migration based on the migration target segment's data address change. to improve write efficiency.

NVM 모듈(300)에 저장된 프로그램(Program A, Program C)의 각 세그먼트에 포함된 라이트 명령의 개수를 카운트한다. 이때 메모리 매니저(100)는 외부로부터 라이트 되어야 하는 프로그램(Program A, Program C)가 인가되면, 인가되는 프로그램을 각 세그먼트 단위로 라이트 명령의 개수를 카운트하면서 NVM 모듈(300)에 저장하고, 프로그램이 저장되면, 카운트된 세그먼트 카운트를 합산하여 프로그램 카운트를 획 득할 수 있다. 여기서는 각 세그먼트별로 카운트된 라이트 명령의 개수를 세그먼트 카운트라 한다. 그리고 각 프로그램 데이터(Program A, Program C)에서 포함된 다수의 세그먼트에 대한 세그먼트 카운트의 누적합을 프로그램 카운트로 계산한다. The number of write commands included in each segment of the programs (Program A, Program C) stored in the NVM module 300 is counted. At this time, when a program (Program A, Program C) to be written from the outside is applied, the memory manager 100 stores the applied program in the NVM module 300 while counting the number of write commands in units of each segment, and the program Once stored, the program count can be obtained by adding the counted segment counts. Here, the number of write commands counted for each segment is referred to as a segment count. In addition, an accumulated sum of segment counts for a plurality of segments included in each program data (Program A, Program C) is calculated as a program count.

도 8을 참조하면, A 프로그램(Program A)에서는 4개의 세그먼트에 대한 세그먼트 카운트가 각각 (51, 20, 32, 24)로서 프로그램 카운트는 127로 계산된다. 그리고 C 프로그램(Program C)에서는 4개의 세그먼트에 대한 세그먼트 카운트가 각각 (49, 38, 77, 47)로서 프로그램 카운트는 211로 계산된다.Referring to FIG. 8 , in Program A, segment counts for four segments are (51, 20, 32, 24), and the program count is calculated as 127. Also, in the C program (Program C), the segment count for the four segments is (49, 38, 77, 47), and the program count is calculated as 211.

메모리 매니저(100)는 NVM 모듈(300)에 저장된 프로그램에서 데이터가 변경되면, 즉 세그먼트에 변화가 발생되면, 변화된 세그먼트에 따라 세그먼트 카운트를 업데이트하고, 이를 프로그램 카운트에 반영할 수 있다.When data is changed in a program stored in the NVM module 300, that is, when a change occurs in a segment, the memory manager 100 may update a segment count according to the changed segment and reflect it to the program count.

도 9는 NVM 모듈(300)의 초기 상태를 나타내며, 이에 실질적으로 프로그램(Program A ~ Program C)이 NVM 모듈(300)에 저장되지 않은 상태로서, 프로그램 카운트가 모두 0인 상태를 나타낸다. FIG. 9 shows an initial state of the NVM module 300, and thus shows a state in which programs (Program A to Program C) are not substantially stored in the NVM module 300, and all program counts are 0.

도 10은 프로그램(Program A ~ Program C)이 NVM 모듈(300)에 저장된 상태로서, 메모리 매니저(100)는 각 프로그램(Program A ~ Program C)별 다수의 세그먼트 각각에 대한 라이트 개수를 확인하여 세그먼트 카운트를 획득하고, 획득된 세그먼트 카운트를 기반으로 프로그램 카운트를 계산한다. 여기서 프로그램 (Program A ~ Program C)별 프로그램 카운트는 각각 127, 79, 211인 것으로 가정한다. 10 is a state in which programs (Program A to Program C) are stored in the NVM module 300, and the memory manager 100 checks the number of writes for each of a plurality of segments for each program (Program A to Program C) and segments A count is obtained, and a program count is calculated based on the obtained segment count. Here, it is assumed that program counts for each program (Program A to Program C) are 127, 79, and 211, respectively.

프로그램 카운트가 계산되면, 메모리 매니저(100)는 계산된 프로그램 카운트 중 기지정된 제1 문턱값(예컨대, 100) 이상인 프로그램 카운트를 갖는 프로그램을 탐색한다. 프로그램 카운트가 제1 문턱값 이상인 프로그램(Program A, Program C)이 탐색되면, 탐색된 프로그램(Program A, Program C)을 스왑 후보 프로그램으로 선별한다. When the program count is calculated, the memory manager 100 searches for a program having a program count equal to or greater than a predetermined first threshold value (eg, 100) among the calculated program counts. When programs (Program A, Program C) having a program count equal to or greater than the first threshold are searched for, the searched programs (Program A, Program C) are selected as swap candidate programs.

선별된 스왑 후보 프로그램(Program A, Program C)에 포함된 각 세그먼트에 대한 세그먼트 카운트가 제1 문턱값 이하의 값으로 기지정된 제2 문턱값(예컨대, 50) 이상인 세그먼트를 탐색하고, 세그먼트 카운트가 제2 문턱값 이상인 세그먼트가 탐색되면 탐색된 세그먼트를 마이그레이션 대상으로 선별한다. A segment count of each segment included in the selected swap candidate programs (Program A, Program C) is equal to or less than the first threshold and a value equal to or greater than a predetermined second threshold (eg, 50) is searched, and the segment count is When a segment having a value equal to or greater than the second threshold is searched for, the searched segment is selected as a migration target.

도 11에서는 스왑 후보 프로그램(Program A, Program C)에서 각 세그먼트의 세그먼트 카운트가 도 8과와 같은 것으로 가정하였으며, 이에 A 프로그램 (Program A)에서 세그먼트 카운트가 51인 제0 세그먼트가 마이그레이션 대상으로 선별되며, C 프로그램(Program C)에서는 세그먼트 카운트가 77인 제2 세그먼트가 마이그레이션 대상으로 선별된다. 일 예로서 프로그램(Program A, Program C)에서 각 1개의 세그먼트가 마이그레이션 대상으로 선별되는 경우를 도시 하였으나, 각 프로그램(Program A, Program C)에서 마이그레이션 대상으로 선별되는 세그먼트의 개수는 한정되지 않는다. 선별된 스왑 후보 프로그램(Program A, Program C)에서 세그먼트 카운트가 제2 문턱값 이상인 모든 세그먼트가 마이그레이션 대상 세그먼트로 선별될 수 있다. In FIG. 11, it is assumed that the segment count of each segment in swap candidate programs (Program A, Program C) is the same as in FIG. In the C program (Program C), the second segment with a segment count of 77 is selected as a migration target. As an example, a case in which one segment is selected as a migration target in each program (Program A, Program C) is shown, but the number of segments selected as a migration target in each program (Program A, Program C) is not limited. In the selected swap candidate programs (Program A, Program C), all segments having a segment count greater than or equal to the second threshold may be selected as migration target segments.

스왑 후보 프로그램(Program A, Program C)으로 선별되지 않은 프로그램(Program B)에서는 세그먼트 카운트가 제2 문턱값 이상인 모든 세그먼트가 존재하더라도, 메모리 매니저(100)가 선별되지 않은 프로그램(Program B)의 세그먼트 카운트를 고려하지 않으므로, 마이그레이션 대상 세그먼트로 선별되지 않는다. Even if all segments having a segment count equal to or greater than the second threshold exist in programs (Program B) that are not selected as swap candidate programs (Program A, Program C), the memory manager 100 detects segments of the program (Program B) that are not selected as swap candidate programs (Program A, Program C). Since the count is not considered, it is not selected as a target segment for migration.

메모리 매니저(100)는 마이그레이션 대상 세그먼트가 선별되면, 도 12에서 도시된 바와 같이, NVM 모듈(300)에서 선별된 세그먼트가 VM 모듈 (200)로 마이그레이션되도록 VM 컨트롤러(210)와 NVM 컨트롤러(310)를 제어하여, NVM 모듈(300)에서 선별된 마이그레이션 대상 세그먼트를 VM 모듈(200)로 마이그레이션시킨다. NVM 모듈(300)에서 선별된 마이그레이션 대상 세그먼트는 NVM 컨트롤러(310)의 버퍼(320)를 통해 메모리 매니저(100)의 스왑 버퍼로 전달되고, 스왑 버퍼로 전달된 마이그레이션 대상 세그먼트는 VM 컨트롤러(210)의 버퍼(220)를 통해 VM 모듈(200)로 인가되어 저장될 수 있다. When a segment to be migrated is selected, the memory manager 100 operates the VM controller 210 and the NVM controller 310 so that the segment selected in the NVM module 300 is migrated to the VM module 200, as shown in FIG. is controlled to migrate the segment to be migrated selected in the NVM module 300 to the VM module 200. The migration target segment selected by the NVM module 300 is transferred to the swap buffer of the memory manager 100 through the buffer 320 of the NVM controller 310, and the migration target segment transferred to the swap buffer is transferred to the VM controller 210. may be applied to the VM module 200 through the buffer 220 and stored.

메모리 매니저(100)는 선별된 마이그레이션 대상 세그먼트를 마이그레이션할 때, 마이그레이션되는 데이터의 단위 크기를 가변시킬 수 있다.The memory manager 100 may change the unit size of migrated data when migrating the selected migration target segment.

도 13은 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 마이그레이션 실행부를 예시한 도면이다.13 is a diagram illustrating a migration execution unit of a migration policy switching device according to another embodiment of the present invention.

명령 분석부(131)는 외부 장치에서 인가되는 리드 또는 라이트와 같은 명령을 분석하여, 리드 요청과 라이트 요청은 리매핑부(133)로 전달하고, 라이트 요청 정보는 재할당부(132)로 전달한다. 라이트 요청 정보에는 데이터 어드레스, 프로그램 정보 등이 포함될 수 있다. The command analysis unit 131 analyzes commands such as read or write applied from an external device, and transfers read and write requests to the remapping unit 133 and transfers write request information to the reallocation unit 132 . Write request information may include a data address, program information, and the like.

하이브리드 메모리 장치에 저장된 프로그램(어플리케이션)은 외부 프로세서 등에 의해 실행될 수 있으며, 실행되는 과정에서 라이트 명령에 의해 데이터 변경이 발생하며, 변경된 데이터는 다시 하이브리드 장치에 저장되어야 한다. 명령 분석부(131)는 라이트 명령에 의해 변경된 데이터가 인가되면, 재할당부(132)로 변경된 데이터의 어드레스와 프로그램 정보 및 세그먼트 정보 등이 포함된 라이트 요청 정보를 전송하여, 이전 저장된 데이터가 변경된 데이터로 업데이트 되도록 한다. 명령 분석부(131)가 재할당부(132)로 라이트 요청 정보를 전달하는 것은 NVM 모듈(300)에 저장된 프로그램에서 프로그램 카운트와 세그먼트 카운트에 의해 VM 모듈(200)로 마이그레이션된 세그먼트에 대한 정보가 리매핑부(133)으로 전달되도록 하여, 리매핑부(133)가 정상적으로 데이터를 라이트하여 업데이트할 수 있도록 한다. Programs (applications) stored in the hybrid memory device may be executed by an external processor or the like. During execution, data is changed by a write command, and the changed data must be stored in the hybrid device again. When the data changed by the write command is applied, the command analyzer 131 transmits write request information including the address of the changed data, program information, and segment information to the reallocation unit 132 so that the previously stored data is the changed data. to be updated to The command analysis unit 131 transfers the write request information to the reallocation unit 132 by remapping information about segments migrated to the VM module 200 by program counts and segment counts in programs stored in the NVM module 300. It is transmitted to the unit 133 so that the remapping unit 133 can normally write and update data.

재할당부(132)는 인가된 프로그램이 이전 VM 모듈(200) 또는 NVM 모듈(300)에 저장되지 않은 신규 프로그램이면, 인가되는 프로그램을 세그먼트로 구분하고, 각 세그먼트에 라이트 명령이 포함된 개수를 카운트하여 세그먼트 카운트를 획득하며, 획득된 세그먼트 카운트를 기반으로 프로그램 카운트를 계산하여 저장한다. 재할당부(132)는 계산된 프로그램 카운트와 세그먼트 카운트에 따라 VM 모듈(200) 또는 NVM 모듈(300) 중 프로그램의 다수의 세그먼트가 각각 저장될 위치를 설정한다. If the authorized program is a new program not stored in the previous VM module 200 or the NVM module 300, the reallocation unit 132 divides the authorized program into segments and counts the number of write commands included in each segment. to obtain a segment count, and calculate and store a program count based on the acquired segment count. The reallocation unit 132 sets locations where a plurality of segments of a program are to be stored in the VM module 200 or the NVM module 300 according to the calculated program count and segment count.

재할당부(132)는 인가되는 프로그램의 세그먼트들이 기본적으로 NVM 모듈(300)에 저장되도록 어드레스를 할당할 수 있다. 재할당부(132)는 저장된 프로그램 카운트와 세그먼트 카운트에 기반하여, 스왑 후보 프로그램을 선별 하고, 선별된 스왑 후보 프로그램에서 마이그레이션 대상 세그먼트를 선별하여, 선별된 마이그레이션 대상 세그먼트가 VM 모듈(200)에 저장되도록 어드레스를 할당할 수 있다. The reallocation unit 132 may allocate addresses so that segments of an applied program are basically stored in the NVM module 300 . The reallocation unit 132 selects a swap candidate program based on the stored program count and segment count, selects a migration target segment from the selected swap candidate program, and stores the selected migration target segment in the VM module 200. address can be assigned.

선별되지 않은 프로그램의 세그먼트들과 스왑 후보 프로그램에서 마이그레이션 대상 세그먼트를 제외한 나머지 세그먼트들은 NVM 모듈(300)에 저장되도록 어드레스를 할당할 수 있다. 재할당부(132)는 신규 프로그램에 대한 세그먼트들을 모두 NVM 모듈(300)에 저장되도록 어드레스를 할당하여 저장하고, 이후, NVM 모듈(300)에 저장된 프로그램의 세그먼트 중 마이그레이션 대상 세그먼트를 선별하여 VM 모듈(200)에 마이그레이션되도록 할 수도 있다. Addresses may be allocated so that the segments of the non-selected program and the segments other than the segment to be migrated in the swap candidate program are stored in the NVM module 300 . The reallocation unit 132 allocates and stores addresses for all segments of the new program to be stored in the NVM module 300, and then selects segments to be migrated from among the segments of the program stored in the NVM module 300 and selects segments to be migrated to the VM module ( 200) may be migrated.

재할당부(132)는 VM 컨트롤러(210) 또는 NVM 컨트롤러(310)가 인가된 프로그램의 세그먼트를 저장한 이후, VM 컨트롤러(210) 또는 NVM 컨트롤러(310)로부터 저장된 데이터 어드레스를 인가받아 획득할 수도 있다. After the VM controller 210 or the NVM controller 310 stores the segment of the program to which the application has been applied, the reallocation unit 132 may receive and acquire the stored data address from the VM controller 210 or the NVM controller 310. .

재할당부(132)는 NVM 모듈(300)에 이전 저장된 프로그램에 대한 프로그램 카운트와 세그먼트 카운트를 분석하여, NVM 모듈(300)에 저장된 프로그램의 세그먼트를 선별적으로 VM 모듈(300)로 마이그레이션시킬 수 있다. 재할당부(132)는 신규 프로그램이 라이트될 때, 프로그램 카운트와 세그먼트 카운트를 획득하여 미리 저장하고 있으며, 라이트 요청 정보로부터 프로그램의 세그먼트에 변화가 확인되는 경우, 프로그램 카운트와 세그먼트 카운트를 다시 계산하여 업데이트하여 저장한다. 각 프로그램의 세그먼트들에 대한 라이트 히스토리를 미리 저장한다. 저장된 라이트 히스토리에 따라 프로그램의 세그먼트들 중 마이그레이션 대상 세그먼트를 선별하여 VM 모듈(300)로 마이그레이션시킨다. 이때, 재할당부(132)는 NVM 모듈(300)에서 마이그레이션 대상 세그먼트의 데이터 어드레스와 VM 모듈(200)로 마이그레이션된 세그먼트의 데이터 어드레스를 리매핑부(133)로 전달하여 리매핑부(133)가 마이그레이션된 데이터 어드레스의 변화를 저장하도록 한다. The reallocation unit 132 analyzes program counts and segment counts of programs previously stored in the NVM module 300 to selectively migrate segments of programs stored in the NVM module 300 to the VM module 300. . When a new program is written, the reallocation unit 132 obtains and stores the program count and segment count in advance, and when a change in program segments is confirmed from the write request information, the program count and segment count are recalculated and updated. and save it The light history for each program segment is stored in advance. According to the stored write history, migration target segments are selected from among program segments and migrated to the VM module 300 . At this time, the reallocation unit 132 transfers the data address of the segment to be migrated from the NVM module 300 and the data address of the segment migrated to the VM module 200 to the remapping unit 133 so that the remapping unit 133 is migrated. Save the change of data address.

재할당부(132)는 마이그레이션 대상 세그먼트의 데이터 어드레스를 분석하여, 마이그레이션되는 데이터의 단위 크기를 조절할 수 있다. 재할당부(132)가 마이그레이션되는 데이터의 단위 크기를 조절하는 방식에 대한 상세한 설명은 후술하도록 한다. The reallocation unit 132 may analyze the data address of the migration target segment and adjust the unit size of migrated data. A detailed description of how the reallocation unit 132 adjusts the unit size of migrated data will be described later.

리매핑부(133)는 재할당부(132)로부터 마이그레이션에 의해 변경된 데이터 어드레스를 인가받아 저장하고, 명령 분석부(131)로부터 리드 명령 또는 라이트 명령을 인가되면, 저장된 데이터 어드레스를 기반으로 리드 명령과 라이트 명령을 수정하여, VM 컨트롤러(210) 또는 NVM 컨트롤러(310)로 전달한다. The remapping unit 133 receives and stores the data address changed by the migration from the reallocation unit 132, and when a read command or a write command is applied from the command analysis unit 131, the read command and the write command are based on the stored data address. The command is modified and transmitted to the VM controller 210 or the NVM controller 310 .

리매핑부(133)는 재할당부(132)에 의해 마이그레이션된 데이터에 대한 데이터 어드레스가 인가되면, 기존의 데이터 어드레스와 마이그레이션된 데이터 어드레스를 리맵핑 테이블에 저장한다. 이후, 명령 분석부(131)로부터 리드 또는 라이트 명령이 인가되면, 리맵핑 테이블에 해당 데이터에 대해 재할당된 메모리 어드레스가 존재하는지 판별하고, 재할당부(132)에 의해 재할당된 메모리 어드레스가 존재하면, 리드 또는 라이트 명령을 재할당된 메모리 어드레스에 대한 명령으로 수정하여 VM 컨트롤러(210) 또는 NVM 컨트롤러(310)로 전달함으로써, VM 컨트롤러 (120) 또는 NVM 컨트롤러(310)가 재할당된 메모리 어드레스에서 데이터를 리드하거나 라이트할 수 있도록 한다. When a data address for the data migrated by the reallocation unit 132 is applied, the remapping unit 133 stores the existing data address and the migrated data address in the remapping table. Then, when a read or write command is applied from the command analyzer 131, it is determined whether a memory address reallocated for the corresponding data exists in the remapping table, and the memory address reallocated by the reallocation unit 132 exists. , the read or write command is modified into a command for the reallocated memory address and transmitted to the VM controller 210 or the NVM controller 310, so that the VM controller 120 or the NVM controller 310 changes the reallocated memory address. Allows data to be read or written in.

스왑 버퍼(134)는 VM 모듈(200)에 저장된 데이터를 NVM 모듈(300)로 마이그레이션하거나, NVM 모듈(300)에 저장된 데이터를 VM 모듈(200)로 마이그레이션할 때, VM 컨트롤러(210) 및 NVM 컨트롤러(310)의 버퍼(220, 320)에서 전달되는 데이터를 임시 저장한 후, 상대 버퍼(220, 320)로 전달함으로써, 마이그레이션 도중 데이터 충돌이 발생하지 않도록 할 수 있다.When the swap buffer 134 migrates data stored in the VM module 200 to the NVM module 300 or migrates data stored in the NVM module 300 to the VM module 200, the VM controller 210 and the NVM Data transmitted from the buffers 220 and 320 of the controller 310 are temporarily stored and then transferred to the counterpart buffers 220 and 320 to prevent data collision during migration.

도 14는 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 재할당부를 예시한 도면이다.14 is a diagram illustrating a reallocation unit of a migration policy switching device according to another embodiment of the present invention.

재할당부(132)는 라이트 요청 정보 분석부(141), 라이트 히스토리 테이블(142), 마이그레이션 결정부(143) 및 마이그레이션 요청부(144)를 포함할 수 있다. The reallocation unit 132 may include a write request information analysis unit 141 , a write history table 142 , a migration determination unit 143 and a migration request unit 144 .

라이트 요청 정보 분석부(141)는 명령 분석부(131)에서 인가되는 라이트 요청 정보를 분석한다. 라이트 요청 정보 분석부(141)는 라이트 요청 정보로부터 프로그램 정보와 세그먼트 정보 및 데이터 어드레스 등을 확인하여, 라이트 히스토리 테이블(142)로 전달한다. The write request information analyzer 141 analyzes write request information applied from the command analyzer 131 . The write request information analyzer 141 checks program information, segment information, data addresses, etc. from the write request information and transmits them to the write history table 142 .

라이트 히스토리 테이블(142)은 라이트 요청 정보 분석부(141)에 서 확인되는 프로그램 정보와 세그먼트 정보로부터 프로그램을 세그먼트로 구분하고, 각 세그먼트에 라이트 명령이 포함된 개수를 카운트하여 세그먼트 카운트를 획 득하며, 획득된 세그먼트 카운트를 기반으로 프로그램 카운트를 계산한다. 그리고 계산된 프로그램 카운트와 세그먼트 카운트를 라이트 히스토리 테이블(142)에 저장한다. The write history table 142 classifies programs into segments from program information and segment information checked by the write request information analyzer 141, counts the number of write commands included in each segment, and obtains a segment count. , calculates a program count based on the acquired segment count. Then, the calculated program count and segment count are stored in the write history table 142 .

마이그레이션 결정부(143)는 라이트 히스토리 테이블(142)에 저장된 프로그램 카운트로부터 스왑 후보 프로그램을 설정하고, 설정된 스왑 후보 프로 그램에 포함된 세그먼트들의 세그먼트 카운트로부터 마이그레이션 대상 세그먼트를 선별한다. The migration determination unit 143 sets a swap candidate program from the program count stored in the write history table 142, and selects a segment to be migrated from the segment count of segments included in the set swap candidate program.

마이그레이션 요청부(144)는 마이그레이션 대상 세그먼트에 대한 데이터 어드레스를 VM 컨트롤러(210)와 NVM 컨트롤러(310)로 전달하여, 마이그레이션 대상 세그먼트가 VM 모듈(200) 또는 NVM 모듈(300)로 마이그레이션 되도록 한다. The migration request unit 144 transfers the data address of the migration target segment to the VM controller 210 and the NVM controller 310 so that the migration target segment is migrated to the VM module 200 or the NVM module 300 .

마이그레이션 요청부(144)는 VM 컨트롤러(210)와 NVM 컨트롤러 (130)로부터 마이그레이션 된 이후의 데이터 어드레스를 인가받아 라이트 히스토리 테이블(142)에 저장하고 리매핑부(133)로 전달할 수 있다. 이때, 마이그레이션 요청부(144)는 세그먼트에 포함된 데이터의 데이터 어드레스를 기반으로 마이그레이션되는 데이터의 단위 크기를 조절할 수 있다.The migration request unit 144 may receive data addresses after migration from the VM controller 210 and the NVM controller 130 , store them in the write history table 142 , and transfer them to the remapping unit 133 . At this time, the migration request unit 144 may adjust the unit size of migrated data based on the data address of the data included in the segment.

도 15는 본 발명의 다른 실시예에 따른 마이그레이션 정책 스위칭 장치의 마이그레이션 데이터 단위 크기를 결정하는 개념을 예시한 도면이다.15 is a diagram illustrating a concept of determining a migration data unit size of a migration policy switching device according to another embodiment of the present invention.

마이그레이션 요청부(144)는 다수의 데이터 스코프(Scope0 ~ Scope5)를 포함할 수 있다. 데이터 스코프(Scope0 ~ Scope5)의 개수는 다양하게 조절될 수 있다. 데이터 스코프는 데이터가 시퀀셜하게 인가되는지 판별하기 위한 일종의 가상 카운터로서, 다수의 데이터 스코프(Scope0 ~ Scope5) 각각에서 구분되는 각 영역은 마이그레이션 수행시에 설정될 수 있는 데이터 마이그레이션 단위 크기를 설정하기 위한 카운트를 나타낸다.The migration request unit 144 may include a plurality of data scopes (Scope0 to Scope5). The number of data scopes (Scope0 ~ Scope5) can be adjusted in various ways. The data scope is a kind of virtual counter to determine whether data is sequentially applied, and each area distinguished from each of multiple data scopes (Scope0 ~ Scope5) is a count to set the data migration unit size that can be set when performing migration. indicates

다수의 데이터 스코프(Scope0 ~ Scope5) 각각의 전체 크기는 마이그레이션 가능한 최대 데이터 마이그레이션 단위 크기(예를 들면 128Kbyte)를 나타내도록 설정될 수 있다. 일 예로 도 9에서 각 데이터 스코프(Scope0 ~ Scope5)의 각 영역은 최소 데이터 마이그레이션 단위 크기 4Kbye를 나타내도록 설정되어, 다수의 데이터 스코프(Scope0 ~ Scope5) 각각은 32개의 영역으로 구분될 수 있다. 마이그레이션 단위 크기는 일반적으로 2의 자승 순서로 변경되므로, 각 영역이 4Kbye로부터 2의 승수에 따라 증가하는 마이그레이션 단위 크기를 나타내도록 설정될 수도 있다. 데이터 스코프의 각 영역이 순차적으로, 4, 8, 16, 32, ... , 128Kbyte 순서를 나타내도록 설정될 수도 있다. The total size of each of the plurality of data scopes (Scope0 to Scope5) may be set to indicate the maximum data migration unit size (for example, 128Kbyte) that can be migrated. For example, in FIG. 9 , each area of each data scope (Scope0 to Scope5) is set to indicate a minimum data migration unit size of 4Kbye, so each of a plurality of data scopes (Scope0 to Scope5) can be divided into 32 areas. Since the migration unit size generally changes in the order of a power of 2, it may be set so that each area represents a migration unit size that increases by a power of 2 from 4Kbye. Each area of the data scope may be set to sequentially indicate the order of 4, 8, 16, 32, ..., 128 Kbytes.

마이그레이션 요청부(144)는 현재 설정된 마이그레이션 단위를 기준으로 더 작은 값을 갖는 제1 기준 마이그레이션 단위와 더 큰 값을 가는 제2 기준 마이그레이션 단위를 설정할 수 있다. 즉 현재 마이그레이션 단위를 중심으로 제1 기준 마이그레이션 단위와 제2 기준 마이그레이션 단위 사이의 구간을 단위 유지 구간으로 설정하고, 제1 기준 마이그레이션 단위 미만 구간을 단위 감소 구간으로 설정하며, 제1 기준 마이그레이션 단위 이상의 구간을 단위 증가 구간으로 설정한다. The migration request unit 144 may set a first reference migration unit having a smaller value and a second reference migration unit having a larger value based on the currently set migration unit. That is, the section between the first reference migration unit and the second reference migration unit centered on the current migration unit is set as the unit maintenance section, the section less than the first reference migration unit is set as the unit reduction section, and the section equal to or greater than the first reference migration unit is set. Set the interval to a unit increment interval.

이후 마이그레이션 요청부(144)는 순차적으로 접근하는 데이터 어드레스 사이의 어드레스 차이가 현재 설정된 기지정된 기준 어드레스 단위 이하이면, 다수의 데이터 스코프(Scope0 ~ Scope5) 중 하나의 데이터 스코프에서 각 영역을 순차적으로 채운다. 데이터 어드레스 차이가 계속해서 기준 어드레스 단위 이하이면 동일한 데이터 스코프에서 계속하여 영역을 채우는 반면, 데이터 어드레스 차이가 기준 어드레스 단위를 초과하게 되면, 다음 순서의 데이터 스코프에서 다시 각 영역을 순차적으로 채운다. Thereafter, the migration request unit 144 sequentially fills each area in one data scope among a plurality of data scopes (Scope0 to Scope5) if the address difference between sequentially accessed data addresses is less than or equal to the currently set predetermined reference address unit. . If the data address difference continues to be less than or equal to the reference address unit, areas are continuously filled in the same data scope, whereas if the data address difference exceeds the reference address unit, each area is sequentially filled again in the next data scope.

마이그레이션 요청부(144)는 상기한 과정을 반복 수행하며, 모든 데이터 스코프(Scope0 ~ Scope5)에 대해 각 영역이 채워지면, 다시 순환하여 데이터 스코프(Scope0 ~ Scope5)의 영역을 순차적으로 채울 수 있다. The migration request unit 144 repeats the above process, and when each area is filled for all data scopes (Scope0 to Scope5), it can cycle again to sequentially fill the data scope areas (Scope0 to Scope5).

마이그레이션 요청부(144)는 기지정된 구간 동안, 다수의 데이터 스코프(Scope0 ~ Scope5)에 채워진 영역의 크기를 계산하고, 다수의 데이터 스코프(Scope0 ~ Scope5) 중 절반 이상, 즉 과반수 이상의 데이터 스코프에 채워진 영역의 크기가 단위 유지 구간과 단위 감소 구간 및 단위 증가 구간 중에서 포함되는 구간을 판별한다. 만일 단위 유지 구간에 포함되는 것으로 판별되면, 현재 설정된 마이그레이션 단위를 유지하는 반면, 단위 감소 구간 또는 단위 증가 구간에 포함되는 것으로 판별되면, 설정된 마이그레이션 단위를 기지정된 단위로 증가시키 나 감소시킨다. Migration request unit 144 calculates the size of the area filled in a plurality of data scopes (Scope0 to Scope5) during a predetermined period, and more than half of the plurality of data scopes (Scope0 to Scope5), that is, more than half of the data scopes are filled in The size of the region determines the included interval among the unit maintenance interval, the unit reduction interval, and the unit increase interval. If it is determined to be included in the unit maintenance section, the currently set migration unit is maintained, while if it is determined to be included in the unit reduction section or the unit increase section, the set migration unit is increased or decreased by a predetermined unit.

마이그레이션 요청부(144)가 마이그레이션 단위를 가변하는 것은 마이그레이션할 세그먼트에서 연속하는 데이터의 크기에 대응하여 한번에 마이그레이션되는 데이터의 크기를 증가 또는 감소시켜, 마이그레이션 수행 횟수 자체를 줄일 뿐만 아니라, VM 모듈(200)과 NVM 모듈(300)에서 라이트 횟수를 저감시켜 라이트 속도를 향상시킬 뿐만 아니라 NVM 모듈(300)의 내구성을 향상시킬 수 있다.When the migration request unit 144 changes the migration unit, the size of data migrated at one time increases or decreases corresponding to the size of continuous data in the segment to be migrated, thereby reducing the number of migrations itself and the VM module (200 ) and the number of writes in the NVM module 300 to improve not only the write speed but also the durability of the NVM module 300 .

하이브리드 메모리 장치의 관리 방법은 우선 현재 저장된 프로그램의 데이터에 대해 마이그레이션을 수행해야 하는지 여부를 판별한다. 마이그레이션은 NVM 모듈(300)에 저장된 데이터와 VM 모듈 (200)에 저장된 데이터를 상호 스왑하도록 수행될 수 있다. NVM 모듈(300)에 저장된 데이터를 VM 모듈(200)과 마이그레이션하는 경우는 NVM 모듈(300)에 저장된 프로그램이 리드된 이후, 리드된 프로그램에 대해 실행될 수 있다. 더불어 마이그레이션은 라이트 명령으로 새로운 프로그램이 하이브리드 메모리 장치에 인가되어 저장되는 경우에도 수행될 수 있다. 그리고 마이그레이션이 수행되어야 하는 것으로 판별되면, 하이브리드 메모리 장치는 기지정된 방식으로 마이그레이션을 실행한다. In the hybrid memory device management method, first, it is determined whether migration is to be performed on data of a currently stored program. Migration may be performed to mutually swap data stored in the NVM module 300 and data stored in the VM module 200 . When data stored in the NVM module 300 is migrated with the VM module 200, after the program stored in the NVM module 300 is read, the read program can be executed. In addition, migration may be performed even when a new program is applied to and stored in the hybrid memory device by a write command. And, if it is determined that migration is to be performed, the hybrid memory device executes migration in a predetermined manner.

마이그레이션을 실행하는 단계에서는 먼저 다수의 프로그램 각각을 구성하는 다수의 세그먼트 각각에서 라이트 명령의 개수를 카운트하여 세그먼트 카운트를 획득하고, 획득된 세그먼트 카운트를 합산하여 각 프로그램에 대한 프로그램 카운트를 계산한다. In the migration step, first, the number of write commands in each of a plurality of segments constituting a plurality of programs is counted to obtain a segment count, and a program count for each program is calculated by summing the obtained segment counts.

계산된 프로그램 카운트가 기지정된 제1 문턱값 이상인 프로그램을 판별한다. 만일 프로그램 카운트가 제1 문턱값 이상인 프로그램이 확인되면, 확인된 프로그램을 스왑 후보 프로그램으로 설정한다. 이후 설정된 스왑 후보 프로그램의 다수의 세그먼트 중 세그먼트 카운트가 제2 문턱값 이상인 세그먼트를 판별한다. 세그먼트 카운트가 제2 문턱값 이상인 세그먼트가 판별되면, 판별된 세그먼트를 마이그레이션 대상 세그먼트로 선택한다. A program whose calculated program count is equal to or greater than a predetermined first threshold is determined. If a program having a program count equal to or greater than the first threshold value is identified, the identified program is set as a swap candidate program. Thereafter, among a plurality of segments of the set swap candidate program, segments having a segment count greater than or equal to a second threshold value are determined. When a segment having a segment count equal to or greater than the second threshold value is determined, the determined segment is selected as a migration target segment.

마이그레이션 대상 세그먼트에 대한 마이그레이션을 시작한다. 마이그레이션이 시작되면, 세그먼트에서 순차적으로 전달되는 데이터의 어드레스 차이를 확인하여, 확인되는 어드레스 차이가 기지정된 기준 어드레스 단위 이하이면, 동일한 데이터 스코프에 누적하고, 기준 어드레스 단위를 초과하면 다른 데이터 스코프에 누적하는 방식으로 순차적으로 전달되는 데이터의 어드레스 변화를 기지정된 개수의 데이터 스코프에 누적 기록한다. 그리고 기지정된 구간마다 다수의 데이터 스코프에 누적 기록된 크기를 확인하고, 다수의 데이터 스코프 중 과반수 이상의 데이터 스코프에 누적 기록된 크기가 현재 설정된 마이그레이션 단위를 기준으로 미리 지정된 단위 유지 구간과 단위 감소 구간 및 단위 증가 구간 중 어느 구간에 해당하는지 확인하여 마이그레이션 단위를 변경시킨다. Start migration for the migration target segment. When migration starts, address differences in data transmitted sequentially in segments are checked. If the checked address differences are less than or equal to a predetermined reference address unit, they are accumulated in the same data scope, and if they exceed the reference address unit, they are accumulated in another data scope. In this way, address changes of sequentially transmitted data are accumulated and recorded in a predetermined number of data scopes. In addition, the cumulatively recorded size of multiple data scopes is checked for each predetermined interval, and the cumulatively recorded size of more than half of the multiple data scopes is determined based on the currently set migration unit. Change the migration unit by checking which section of the unit increase section it corresponds to.

리드 또는 라이트 명령과 같이 데이터 액세스 명령이 인가되는지 판별한다. 만일 액세스 명령이 인가된 것으로 판별되면, 현재 VM 모듈(200)과 NVM 모듈(300) 사이에서 데이터 마이그레이션이 수행 중 인지 판별한다. 마이그레이션이 수행중인 것으로 판별되면, 현재 마이그레이션 중인 데이터가 스왑 버퍼(134)에 저장될 때까지 대기한 후, 마이그레이션을 일시 중지시킨다. Determines whether a data access command such as a read or write command is applied. If it is determined that the access command is authorized, it is determined whether data migration is currently being performed between the VM module 200 and the NVM module 300. If it is determined that the migration is being performed, it waits until the data currently being migrated is stored in the swap buffer 134, and then the migration is paused.

액세스 명령이 인가된 데이터가 스왑 버퍼(134)에 저장되어 있는지 판별한다. 데이터가 스왑 버퍼(134)에 저장된 것으로 판별되면, 스왑 버퍼(134)에 대해 액세스를 수행한다. 즉 데이터를 리드 또는 라이트 한다. 그리고 마이그레이션을 계속 수행한다. It is determined whether data to which an access command has been applied is stored in the swap buffer 134. When it is determined that the data is stored in the swap buffer 134, access is performed to the swap buffer 134. That is, data is read or written. And the migration continues.

스왑 버퍼(134)에 저장되지 않은 것으로 판별되면, VM 컨트 롤러(120) 또는 NVM 컨트롤러(310)를 통해 VM 모듈(200) 또는 NVM 모듈(300)에 저장된 데이터에 액세스를 수행한다. 또한 현재 마이그레이션이 수행 중이지 않은 경우에도, VM 컨트롤러(210) 또는 NVM 컨트롤러(310)를 통해 VM 모듈(200) 또는 NVM 모듈(300)에 저장된 데이터에 액세스를 수행한다.If it is determined that the data is not stored in the swap buffer 134, the data stored in the VM module 200 or the NVM module 300 is accessed through the VM controller 120 or the NVM controller 310. Also, even when migration is not currently being performed, data stored in the VM module 200 or the NVM module 300 is accessed through the VM controller 210 or the NVM controller 310 .

마이그레이션 정책 스위칭 장치는 하드웨어, 펌웨어, 소프트웨어 또는 이들의 조합에 의해 로직회로 내에서 구현될 수 있고, 범용 또는 특정 목적 컴퓨터를 이용하여 구현될 수도 있다. 장치는 고정배선형(Hardwired) 기기, 필드 프로그램 가능한 게이트 어레이(Field Programmable Gate Array, FPGA), 주문형 반도체(Application Specific Integrated Circuit, ASIC) 등을 이용하여 구현될 수 있다. 또한, 장치는 하나 이상의 프로세서 및 컨트롤러를 포함한 시스템온칩(System on Chip, SoC)으로 구현될 수 있다.The migration policy switching device may be implemented in a logic circuit by hardware, firmware, software, or a combination thereof, or may be implemented using a general-purpose or special-purpose computer. The device may be implemented using a hardwired device, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or the like. Also, the device may be implemented as a System on Chip (SoC) including one or more processors and controllers.

마이그레이션 정책 스위칭 장치는 하드웨어적 요소가 마련된 컴퓨팅 디바이스 또는 서버에 소프트웨어, 하드웨어, 또는 이들의 조합하는 형태로 탑재될 수 있다. 컴퓨팅 디바이스 또는 서버는 각종 기기 또는 유무선 통신망과 통신을 수행하기 위한 통신 모뎀 등의 통신장치, 프로그램을 실행하기 위한 데이터를 저장하는 메모리, 프로그램을 실행하여 연산 및 명령하기 위한 마이크로프로세서 등을 전부 또는 일부 포함한 다양한 장치를 의미할 수 있다.The migration policy switching device may be installed in a computing device or server equipped with hardware elements in the form of software, hardware, or a combination thereof. A computing device or server includes all or part of a communication device such as a communication modem for communicating with various devices or wired/wireless communication networks, a memory for storing data for executing a program, and a microprocessor for executing calculations and commands by executing a program. It can mean a variety of devices, including

도 1 및 도 2에서는 각각의 과정을 순차적으로 실행하는 것으로 기재하고 있으나 이는 예시적으로 설명한 것에 불과하고, 이 분야의 기술자라면 본 발명의 실시예의 본질적인 특성에서 벗어나지 않는 범위에서 도 1 및 도 2에 기재된 순서를 변경하여 실행하거나 또는 하나 이상의 과정을 병렬적으로 실행하거나 다른 과정을 추가하는 것으로 다양하게 수정 및 변형하여 적용 가능할 것이다.In Figures 1 and 2, it is described that each process is sequentially executed, but this is merely an example, and a person skilled in the art will refer to Figures 1 and 2 without departing from the essential characteristics of the embodiment of the present invention. Various modifications and variations may be applied by changing the order described, executing one or more processes in parallel, or adding another process.

본 실시예들에 따른 동작은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능한 매체에 기록될 수 있다. 컴퓨터 판독 가능한 매체는 실행을 위해 프로세서에 명령어를 제공하는 데 참여한 임의의 매체를 나타낸다. 컴퓨터 판독 가능한 매체는 프로그램 명령, 데이터 파일, 데이터 구조 또는 이들의 조합을 포함할 수 있다. 예를 들면, 자기 매체, 광기록 매체, 메모리 등이 있을 수 있다. 컴퓨터 프로그램은 네트워크로 연결된 컴퓨터 시스템 상에 분산되어 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수도 있다. 본 실시예를 구현하기 위한 기능적인(Functional) 프로그램, 코드, 및 코드 세그먼트들은 본 실시예가 속하는 기술분야의 프로그래머들에 의해 용이하게 추론될 수 있을 것이다.Operations according to the present embodiments may be implemented in the form of program instructions that can be executed through various computer means and recorded in a computer readable medium. Computer readable medium refers to any medium that participates in providing instructions to a processor for execution. A computer readable medium may include program instructions, data files, data structures, or combinations thereof. For example, there may be a magnetic medium, an optical recording medium, a memory, and the like. The computer program may be distributed over networked computer systems so that computer readable codes are stored and executed in a distributed manner. Functional programs, codes, and code segments for implementing this embodiment may be easily inferred by programmers in the art to which this embodiment belongs.

본 실시예들은 본 실시예의 기술 사상을 설명하기 위한 것이고, 이러한 실시예에 의하여 본 실시예의 기술 사상의 범위가 한정되는 것은 아니다. 본 실시예의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 실시예의 권리범위에 포함되는 것으로 해석되어야 할 것이다.These embodiments are for explaining the technical idea of this embodiment, and the scope of the technical idea of this embodiment is not limited by these embodiments. The scope of protection of this embodiment should be interpreted according to the claims below, and all technical ideas within the scope equivalent thereto should be construed as being included in the scope of rights of this embodiment.

Claims (16)

이종의 메모리를 포함하는 메모리 모듈; 및
저장된 어플리케이션 특징을 기준으로 상기 메모리 모듈에 적합한 마이그레이션 정책을 선택하는 메모리 매니저를 포함하는 마이그레이션 정책 스위칭 장치.
a memory module including heterogeneous memories; and
A migration policy switching device including a memory manager that selects a migration policy suitable for the memory module based on stored application characteristics.
제1항에 있어서,
상기 메모리 매니저는,
상기 마이그레이션 정책에 따라 마이그레이션을 수행하는 마이그레이션 엔진; 및
상기 마이그레이션의 대상이 되는 데이터의 원래 주소와 새로운 주소를 저장하는 리매핑 테이블을 포함하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 1,
The memory manager,
a migration engine that performs migration according to the migration policy; and
and a remapping table storing an original address and a new address of the data to be migrated.
제2항에 있어서,
상기 마이그레이션 엔진은,
상기 어플리케이션 특징을 저장하는 컨트롤 레지스터;
상기 어플리케이션 특징을 기반으로 복수의 마이그레이션 정책 중에서 하나의 마이그레이션 정책을 선택하는 마이그레이션 정책 선택부;
상기 복수의 마이그레이션 정책을 저장하는 마이그레이션 정책 저장부; 및
상기 선택된 하나의 마이그레이션 정책을 진행하는 마이그레이션 정책 실행부를 포함하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 2,
The migration engine,
a control register for storing the application characteristics;
a migration policy selector selecting one migration policy from among a plurality of migration policies based on the characteristics of the application;
a migration policy storage unit that stores the plurality of migration policies; and
and a migration policy execution unit that proceeds with the selected one migration policy.
제3항에 있어서,
상기 어플리케이션 특징은 민감도(sensitivity), 접근 빈도(access frequency), 쓰기 정도(write-intensity), 지역성(locality), 또는 이들의 조합을 포함하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 3,
The application characteristics include sensitivity, access frequency, write-intensity, locality, or a combination thereof.
제4항에 있어서,
상기 어플리케이션 특징은 어플리케이션 실행 초기에 운영체제에 의해 상기 컨트롤 레지스터에 저장되는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 4,
The migration policy switching device, characterized in that the application characteristics are stored in the control register by the operating system at the beginning of application execution.
제3항에 있어서,
상기 마이그레이션 정책 실행부가 상기 선택된 하나의 마이그레이션 정책을 진행하면, 상기 리매핑 테이블은 업데이트되는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 3,
The migration policy switching device of claim 1 , wherein the remapping table is updated when the migration policy execution unit proceeds with the selected one migration policy.
제3항에 있어서,
상기 메모리 모듈은 다수의 휘발성 메모리 셀을 포함하는 VM(Volatile Memory) 모듈 및 다수의 비휘발성 메모리 셀을 포함하는 NVM(Non-Volatile Memory) 모듈을 포함하며,
상기 마이그레이션 정책 실행부는 상기 NVM 모듈에 저장된 어플리케이션을 기지정된 세그먼트 단위로 구분하고, 각 세그먼트에 포함된 라이트 명령의 개수인 세그먼트 카운트를 획득하고 합산하여, 어플리케이션에 대한 라이트 카운트인 어플리케이션 카운트를 계산하고, 상기 어플리케이션 카운트가 기지정된 제1 문턱값 이상인 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 기지정된 제2 문턱값 이상인 세그먼트를 선택하여 상기 VM 모듈에 저장된 데이터와 마이그레이션하고, 마이그레이션된 세그먼트의 데이터 어드레스를 리맵핑하는 상기 NVM 모듈에 저장된 어플리케이션을 기지정된 세그먼트 단위로 구분하고, 각 세그먼트에 포함된 라이트 명령의 개수인 세그먼트 카운트를 획득하고 합산하여, 어플리케이션에 대한 라이트 카운트인 어플리케이션 카운트를 계산하고, 상기 어플리케이션 카운트가 기지정된 제1 문턱값 이상인 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 기지정된 제2 문턱값 이상인 세그먼트를 선택하여 상기 VM 모듈에 저장된 데이터와 마이그레이션하고, 마이그레이션된 세그먼트의 데이터 어드레스를 리맵핑하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 3,
The memory module includes a VM (Volatile Memory) module including a plurality of volatile memory cells and a Non-Volatile Memory (NVM) module including a plurality of non-volatile memory cells,
The migration policy execution unit classifies applications stored in the NVM module into predetermined segments, obtains and sums segment counts, which are the number of write commands included in each segment, and calculates an application count, which is a write count for the application; Selecting a segment having a segment count equal to or greater than a predetermined second threshold value among a plurality of segments of applications having the application count equal to or greater than a predetermined first threshold value, migrating the segment with data stored in the VM module, and remapping the data address of the migrated segment. The application stored in the NVM module is divided into predetermined segments, and segment counts, which are the number of write commands included in each segment, are obtained and summed to calculate an application count, which is a write count for the application, and the application count is Selecting a segment whose segment count is equal to or greater than a predetermined second threshold among a plurality of segments of applications having a predetermined first threshold or higher is migrated with data stored in the VM module, and data addresses of the migrated segments are remapped. A migration policy switching device that
제7항에 있어서,
상기 VM 모듈은 상기 VM 모듈에 저장되는 데이터에 대한 액세스를 제어하는 VM 컨트롤러를 포함하고,
상기 NVM 모듈은 상기 NVM 모듈에 저장되는 데이터에 대한 액세스를 제어하는 NVM 컨트롤러를 포함하고,
상기 마이그레이션 정책 실행부는 상기 NVM 모듈에 저장된 어플리케이션의 세그먼트를 선택적으로 상기 VM 모듈에 저장된 데이터와 마이그레이션시키고, 마이그레이션된 데이터에 대한 액세스 명령이 인가되면, 리맵핑된 데이터 어드레스에 대한 액세스 명령으로 수정하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 7,
The VM module includes a VM controller controlling access to data stored in the VM module;
The NVM module includes an NVM controller that controls access to data stored in the NVM module;
The migration policy execution unit selectively migrates the application segment stored in the NVM module with the data stored in the VM module, and when an access command for the migrated data is applied, modifying the remapped data address with an access command. A characterized migration policy switching device.
제8항에 있어서,
상기 마이그레이션 정책 실행부는,
리드 또는 라이트 명령을 포함하는 액세스 명령이 인가되면, 인가된 액세스 명령을 분석하여, 리드 또는 라이트 명령과 어플리케이션 정보와 데이터 어드레스를 포함하는 라이트 요청 정보로 구분하는 명령 분석부;
상기 라이트 요청 정보를 인가받아 인가된 어플리케이션을 다수의 세그먼트로 구분하고, 세그먼트 카운트와 어플리케이션 카운트를 획득하여 라이트 히스토리 테이블에 저장하며, 저장된 라이트 히스토리 테이블에 기초하여 상기 NVM 모듈에 저장된 프로그램의 세그먼트를 선택적으로 상기 VM 모듈의 대응하는 데이터와 마이그레이션시키고, 마이그레이션되어 변경된 데이터 어드레스를 획득하는 재할당부;
세그먼트의 데이터가 저장된 데이터 어드레스와 변경된 데이터 어드레스를 리맵핑하여 저장하고, 상기 리드 또는 라이트 명령이 인가되면, 인가된 리드 또는 라이트 명령에서 지정되는 데이터 어드레스를 리맵핑된 데이터 어드레스로 수정하여 상기 VM 컨트롤러와 상기 NVM 컨트롤러로 출력하는 리맵핑부; 및 상기 NVM 모듈과 상기 VM 모듈 사이에서 마이그레이션되는 데이터를 인가받아 임시 저장하여 상대 모듈로 전달하는 스왑 버퍼를 포함하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 8,
The migration policy execution unit,
When an access command including a read or write command is applied, a command analyzer analyzes the applied access command and divides the read or write command into write request information including application information and data address;
receiving the write request information, classifying the authorized application into a plurality of segments, obtaining a segment count and an application count and storing them in a light history table, and selectively selecting segments of programs stored in the NVM module based on the stored light history table a reassignment unit for migrating corresponding data of the VM module and obtaining a data address that has been migrated and changed;
The data address at which segment data is stored and the changed data address are remapped and stored, and when the read or write command is applied, the data address specified in the read or write command is modified to the remapped data address and the VM controller and a remapping unit outputting an output to the NVM controller; and a swap buffer for receiving data migrated between the NVM module and the VM module, temporarily storing the data, and transferring the data to the counterpart module.
제9항에 있어서,
상기 재할당부는 상기 라이트 히스토리 테이블을 분석하여, 어플리케이션 카운트가 상기 제1 문턱값 이상인 어플리케이션을 스왑 후보 어플리케이션으로 설정하고, 설정된 스왑 후보 어플리케이션의 다수의 세그먼트 중 세그먼트 카운트가 상기 제2 문턱값 이상인 세그먼트를 마이그레이션이 수행되는 마이그레이션 대상 세그먼트로 선택하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 9,
The reallocation unit analyzes the light history table, sets an application having an application count greater than or equal to the first threshold as a swap candidate application, and selects a segment having a segment count greater than or equal to the second threshold among a plurality of segments of the set swap candidate applications. A migration policy switching device characterized in that it selects as a migration target segment for which migration is to be performed.
제10항에 있어서,
상기 재할당부는 상기 마이그레이션 대상 세그먼트에 대한 데이터 어드레스를 상기 NVM 컨트롤러로 전달하여, 상기 NVM 컨트롤러의 제어에 따라 상기 NVM 모듈에 저장된 상기 마이그레이션 대상 세그먼트가 상기 스왑 버퍼와 상기 VM 컨트롤러를 통해 상기 VM 모듈에 저장되도록 하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 10,
The reallocation unit transfers the data address of the migration target segment to the NVM controller, and the migration target segment stored in the NVM module is transferred to the VM module through the swap buffer and the VM controller under the control of the NVM controller. Migration policy switching device, characterized in that to cause to be stored.
제11항에 있어서,
상기 재할당부는 마이그레이션되는 세그먼트의 데이터 어드레스를 확인하여, 순차적으로 마이 그레이션되는 데이터의 데이터 어드레스 차이가 기지정된 기준 어드레스 단위 이하이면, 기지정된 개수의 데이터 스코프 중 동일한 데이터 스코프에 누적카운트하고, 기준 어드레스 단위를 초과하면 다른 데이터 스코프에 다시 누적 카운트하여 순차적으로 전달되는 데이터의 어드레스 변화를 기지정된 다수의 데이터 스코프에 누적 기록하며, 다수의 데이터 스코프에 누적 기록된 크기를 확인하고, 과반수 이상의 데이터 스코프에 누적 기록된 크기가 현재 설정된 마이그레이션 단위를 기준으로 미리 지정된 단위 유지 구간과 단위 감소 구간 및 단위 증가 구간 중 어느 구간에 해당하는지 확인하여 확인된 구간에 따라 마이그레이션되는 데이터의 마이그레이션 단위 크기를 조절하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 11,
The reallocation unit checks the data addresses of the segments to be migrated, and if the data address difference between the sequentially migrated data is less than or equal to a predetermined reference address unit, the same data scope among the predetermined number of data scopes is accumulated and counted, and the reference If the address unit is exceeded, it is accumulated and counted again in other data scopes, and the address changes of sequentially delivered data are accumulated and recorded in a number of predetermined data scopes, the accumulated and recorded sizes in multiple data scopes are checked, and more than half of the data scopes It checks whether the cumulatively recorded size in the currently set migration unit corresponds to a preset unit maintenance interval, unit reduction interval, or unit increase interval, and adjusts the migration unit size of the data to be migrated according to the checked interval. A characterized migration policy switching device.
제9항에 있어서,
상기 마이그레이션 정책 실행부는 마이그레이션 실행 중 액세스 명령이 인가되면, 마이그레이션되는 세그먼트의 데이터 중 스왑 버퍼로 전송되는 데이터의 전송 완료 후, 마이그레이션을 일시 중지시키고, 액세스 명령에 대응하는 동작을 수행하는 것을 특징으로 하는 마이그레이션 정책 스위칭 장치.
According to claim 9,
The migration policy execution unit, when an access command is applied during migration, pauses migration after completion of transfer of data transferred to a swap buffer among data of a segment to be migrated, and performs an operation corresponding to the access command. Migration Policy Switching Device.
제13항에 있어서,
상기 마이그레이션 정책 실행부는 상기 액세스 명령에 의해 지정되는 데이터가 상기 스왑 버퍼에 저장되어 있는지 판별하고, 상기 스왑 버퍼에 저장된 것으로 판별되면, 상기 스왑 버퍼에 저장된 데이터에 액세스를 수행하며, 상기 스왑 버퍼에 저장되지 않은 것으로 판별되면, 상기 VM 컨트롤러 또는 상기 NVM 컨트롤러를 통해 상기 VM 모듈 또는 상기 NVM 모듈에 저장된 데이터에 액세스를 수행하는 마이그레이션 정책 스위칭 장치.
According to claim 13,
The migration policy execution unit determines whether the data designated by the access command is stored in the swap buffer, and if it is determined that the data stored in the swap buffer is stored, accesses the data stored in the swap buffer and stores the data in the swap buffer. If it is determined that it is not, the migration policy switching device accesses data stored in the VM module or the NVM module through the VM controller or the NVM controller.
마이그레이션 정책 스위칭 방법에 있어서,
어플리케이션 작성 과정 또는 컴파일 과정에서 어플리케이션 특징을 획득하는 단계;
어플리케이션 실행 초기에 운영체제에 의해 메모리 매니저의 컨트롤 레지스터에 상기 어플리케이션 특징을 입력하는 단계; 및
상기 컨트롤 레지스터에 저장된 어플리케이션 특징을 기준으로 마이그레이션 정책을 선택하는 단계를 포함하는 마이그레이션 정책 스위칭 방법.
In the migration policy switching method,
Acquiring application characteristics in a process of writing or compiling an application;
inputting the application characteristics into a control register of a memory manager by an operating system at the beginning of application execution; and
and selecting a migration policy based on application characteristics stored in the control register.
제15항에 있어서,
상기 마이그레이션 정책을 선택하는 단계는,
메모리 접근 횟수 또는 수행 시간을 획득하는 단계;
상기 메모리 접근 횟수 또는 수행 시간을 기준치와 비교한 결과에 따라 마이그레이션 수행을 판단하는 단계;
상기 어플리케이션 특징을 기준으로 상기 마이그레이션 후보를 결정하는 단계;
상기 마이그레이션 후보에 따른 마이그레이션을 수행하는 단계; 및
상기 마이그레이션의 대상이 되는 데이터의 주소가 저장된 상기 리매핑 테이블을 업데이트하는 단계를 포함하는 마이그레이션 정책 스위칭 방법.
According to claim 15,
In the step of selecting the migration policy,
obtaining the number of memory accesses or execution time;
determining migration execution according to a result of comparing the number of times of access to the memory or execution time with a reference value;
determining the migration candidate based on the characteristics of the application;
performing migration according to the migration candidate; and
and updating the remapping table in which addresses of the data to be migrated are stored.
KR1020210092466A 2021-07-14 2021-07-14 Method and apparatus for switching migration policy KR102514268B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210092466A KR102514268B1 (en) 2021-07-14 2021-07-14 Method and apparatus for switching migration policy

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210092466A KR102514268B1 (en) 2021-07-14 2021-07-14 Method and apparatus for switching migration policy

Publications (2)

Publication Number Publication Date
KR20230011787A true KR20230011787A (en) 2023-01-25
KR102514268B1 KR102514268B1 (en) 2023-03-24

Family

ID=85109840

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210092466A KR102514268B1 (en) 2021-07-14 2021-07-14 Method and apparatus for switching migration policy

Country Status (1)

Country Link
KR (1) KR102514268B1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110081499A (en) * 2010-01-08 2011-07-14 삼성전자주식회사 System and method for dynamic task migration on a multiprocessor system
KR20110106058A (en) * 2010-03-22 2011-09-28 한국과학기술원 A system, method and comuputer readable media for managing main memory
KR20150043102A (en) 2013-10-14 2015-04-22 한국전자통신연구원 Apparatus and method for managing data in hybrid memory
KR20170036123A (en) * 2013-03-15 2017-03-31 넷리스트 인코포레이티드 Memory system with configurable error thresholds and failure analysis capability
KR20170062615A (en) * 2015-11-27 2017-06-08 삼성전자주식회사 Access method of storage device comprising heterogeneous nonvolatile memory
KR20180085752A (en) * 2015-12-17 2018-07-27 어드밴스드 마이크로 디바이시즈, 인코포레이티드 Hybrid Cache
KR101894132B1 (en) 2013-03-15 2018-08-31 마이크론 테크놀로지, 인크. Apparatuses and methods for adaptive control of memory
KR20210046377A (en) * 2019-10-18 2021-04-28 에스케이하이닉스 주식회사 Memory system for migration operation and operating method thereof

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110081499A (en) * 2010-01-08 2011-07-14 삼성전자주식회사 System and method for dynamic task migration on a multiprocessor system
KR20110106058A (en) * 2010-03-22 2011-09-28 한국과학기술원 A system, method and comuputer readable media for managing main memory
KR20170036123A (en) * 2013-03-15 2017-03-31 넷리스트 인코포레이티드 Memory system with configurable error thresholds and failure analysis capability
KR101894132B1 (en) 2013-03-15 2018-08-31 마이크론 테크놀로지, 인크. Apparatuses and methods for adaptive control of memory
KR20150043102A (en) 2013-10-14 2015-04-22 한국전자통신연구원 Apparatus and method for managing data in hybrid memory
KR20170062615A (en) * 2015-11-27 2017-06-08 삼성전자주식회사 Access method of storage device comprising heterogeneous nonvolatile memory
KR20180085752A (en) * 2015-12-17 2018-07-27 어드밴스드 마이크로 디바이시즈, 인코포레이티드 Hybrid Cache
KR20210046377A (en) * 2019-10-18 2021-04-28 에스케이하이닉스 주식회사 Memory system for migration operation and operating method thereof

Also Published As

Publication number Publication date
KR102514268B1 (en) 2023-03-24

Similar Documents

Publication Publication Date Title
US10209902B1 (en) Method and apparatus for selecting a memory block for writing data, based on a predicted frequency of updating the data
KR102457071B1 (en) Predictive data orchestration in multi-tier memory systems
US10761780B2 (en) Memory system
US9336133B2 (en) Method and system for managing program cycles including maintenance programming operations in a multi-layer memory
US9734911B2 (en) Method and system for asynchronous die operations in a non-volatile memory
US8873284B2 (en) Method and system for program scheduling in a multi-layer memory
US9734050B2 (en) Method and system for managing background operations in a multi-layer memory
US9348746B2 (en) Method and system for managing block reclaim operations in a multi-layer memory
US9465731B2 (en) Multi-layer non-volatile memory system having multiple partitions in a layer
US9223693B2 (en) Memory system having an unequal number of memory die on different control channels
CN111699477A (en) Accelerated data access via data stream isolation in a memory system
CN111684435B (en) Memory access communication through a messaging interface implemented in a memory system
US20130227218A1 (en) Data Migration between Memory Locations
US10929286B2 (en) Arbitrated management of a shared non-volatile memory resource
US11763147B2 (en) Data management device for supporting high speed artificial neural network operation by using data caching based on data locality of artificial neural network
CN106873912A (en) The dynamic partition storage method and device, system of TLC chip solid state hard discs
US10838628B2 (en) Storage system and control method of maintaining reliability of a mounted flash storage
US7065676B1 (en) Multi-threaded memory management test system with feedback to adjust input parameters in response to performance
KR102192325B1 (en) Data management device supporting high speed artificial neural network operation with caching data based on data locality of artificial neural networks
US10872015B2 (en) Data storage system with strategic contention avoidance
KR102514268B1 (en) Method and apparatus for switching migration policy
KR102482191B1 (en) Hybrid memory device and management method thereof
US10552086B2 (en) Global pool of garbage collection units (GCUs) in a shared non-volatile memory device
US20240220153A1 (en) Memory used for artificial neural network processing and system including the same
KR20220008376A (en) Controller for monitoring order of data operation of artificial neural network having certain pattern and system including the same

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant