KR102750797B1 - Apparatus and method for performing garbage collection to predicting required time - Google Patents
Apparatus and method for performing garbage collection to predicting required time Download PDFInfo
- Publication number
- KR102750797B1 KR102750797B1 KR1020180167583A KR20180167583A KR102750797B1 KR 102750797 B1 KR102750797 B1 KR 102750797B1 KR 1020180167583 A KR1020180167583 A KR 1020180167583A KR 20180167583 A KR20180167583 A KR 20180167583A KR 102750797 B1 KR102750797 B1 KR 102750797B1
- Authority
- KR
- South Korea
- Prior art keywords
- block
- blocks
- memory
- time
- super
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
본 기술은 가비지 컬렉션을 지원하는 메모리 시스템 및 메모리 시스템의 동작방법에 관한 것으로서, 다수의 메모리 셀(cell)들을 각각 포함하는 다수의 페이지(page)들과, 페이지들을 각각 포함하는 다수의 블록(block)들과, 블록들을 각각 포함하는 다수의 플래인(plane)들과, 플래인들을 각각 포함하는 다수의 다이(die)들을 포함하고, 블록들로 입/출력되는 데이터를 페이지 단위로 캐싱(catching)하기 위한 페이지버퍼들을 포함하는 비휘발성 메모리 장치; 및 블록들 중 병렬리드가 가능한 N개의 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼블록들로서 관리하고, 가비지 컬렉션(garbage collection)을 위해 블록들에서 유효(valid) 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들을 생성하며, 소요예측시간들을 참조하여 블록들 중 가비지 컬렉션을 위한 희생(victim)블록을 선택하는 컨트롤러를 포함한다.The present technology relates to a memory system supporting garbage collection and an operating method of the memory system, comprising: a nonvolatile memory device including a plurality of pages each including a plurality of memory cells, a plurality of blocks each including the pages, a plurality of planes each including the blocks, and a plurality of dies each including the planes, and including page buffers for catching data input/output to/from the blocks in units of pages; and a controller which groups N blocks capable of parallel reading among the blocks according to set conditions and manages them as a plurality of super blocks, and generates estimated times calculated by predicting the time required to extract valid data from the blocks for garbage collection in units of super blocks, and selects a victim block for garbage collection among the blocks with reference to the estimated times required.
Description
본 발명은 메모리 시스템에 관한 것으로서, 구체적으로 가비지 컬렉션을 지원하는 메모리 시스템 및 메모리 시스템의 동작방법에 관한 것이다.The present invention relates to a memory system, and more particularly, to a memory system supporting garbage collection and an operating method of the memory system.
최근 컴퓨터 환경에 대한 패러다임(paradigm)이 언제, 어디서나 컴퓨터 시스템을 사용할 수 있도록 하는 유비쿼터스 컴퓨팅(ubiquitous computing)으로 전환되고 있다. 이로 인해 휴대폰, 디지털 카메라, 노트북 컴퓨터 등과 같은 휴대용 전자 장치의 사용이 급증하고 있다. 이와 같은 휴대용 전자 장치는 일반적으로 메모리 장치를 이용하는 메모리 시스템, 다시 말해 데이터 저장 장치를 사용한다. 데이터 저장 장치는 휴대용 전자 장치의 주 기억 장치 또는 보조 기억 장치로 사용된다.Recently, the paradigm of the computer environment is shifting to ubiquitous computing, which allows the use of computer systems anytime and anywhere. This has led to a rapid increase in the use of portable electronic devices such as mobile phones, digital cameras, and laptop computers. Such portable electronic devices generally use memory systems that utilize memory devices, or in other words, data storage devices. Data storage devices are used as main or auxiliary memory devices of portable electronic devices.
비휘발성 메모리 장치를 이용한 데이터 저장 장치는 하드 디스크와 달리 기계적인 구동부가 없어서 안정성 및 내구성이 뛰어나며, 또한 정보의 액세스 속도가 매우 빠르고 전력 소모가 적다는 장점이 있다. 이러한 장점을 갖는 메모리 시스템의 일 예로 데이터 저장 장치는, USB(Universal Serial Bus) 메모리 장치, 다양한 인터페이스를 갖는 메모리 카드, 솔리드 스테이트 드라이브(SSD: Solid State Drive) 등을 포함한다.Data storage devices using nonvolatile memory devices have the advantages of excellent stability and durability because they do not have mechanical drive parts, unlike hard disks, and also have very fast information access speeds and low power consumption. Examples of memory systems with these advantages include data storage devices such as USB (Universal Serial Bus) memory devices, memory cards with various interfaces, and solid state drives (SSDs).
본 발명의 실시예는 가비지 컬렉션을 위해 블록에서 유효 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 뒤, 예측연산된 소요시간들을 기준으로 가비지 컬렉션을 위한 희생블록을 선택할 수 있는 메모리 시스템 및 메모리 시스템의 동작방법을 제공한다.An embodiment of the present invention provides a memory system and an operating method of the memory system capable of predicting the time required to extract valid data from a block for garbage collection by superblock unit and then selecting a victim block for garbage collection based on the predicted time required.
본 발명의 실시예에 따른 메모리 시스템은, 다수의 메모리 셀(cell)들을 각각 포함하는 다수의 페이지(page)들과, 상기 페이지들을 각각 포함하는 다수의 블록(block)들과, 상기 블록들을 각각 포함하는 다수의 플래인(plane)들과, 상기 플래인들을 각각 포함하는 다수의 다이(die)들을 포함하고, 상기 블록들에서 출력되는 데이터를 페이지 단위로 캐싱(catching)하기 위한 페이지버퍼들을 포함하는 비휘발성 메모리 장치; 및 상기 블록들 중 병렬리드가 가능한 N개의 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼블록들로서 관리하고, 가비지 컬렉션(garbage collection)을 위해 상기 블록들에서 유효(valid) 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들을 생성하며, 상기 소요예측시간들을 참조하여 상기 블록들 중 상기 가비지 컬렉션을 위한 희생(victim)블록을 선택하는 컨트롤러를 포함하며, N은 2이상의 자연수일 수 있다.A memory system according to an embodiment of the present invention comprises: a nonvolatile memory device including a plurality of pages, each including a plurality of memory cells; a plurality of blocks, each including the pages; a plurality of planes, each including the blocks; and a plurality of dies, each including the planes; and page buffers for catching data output from the blocks in units of pages; and a controller for grouping N blocks capable of parallel reading among the blocks according to set conditions and managing them as a plurality of super blocks, and generating estimated times calculated by predicting the time required to extract valid data from the blocks for garbage collection in units of super blocks, and selecting a victim block for the garbage collection among the blocks with reference to the estimated times required, wherein N can be a natural number greater than or equal to 2.
또한, 상기 컨트롤러는, 상기 슈퍼블록들 중 제1 슈퍼블록에 그룹화된 N개의 블록 각각에서 동일한 위치의 페이지에 대해서만 병렬리드가 가능한 경우, N개의 블록 각각의 유효 페이지 개수를 모두 합한 제1 개수에서 제1 슈퍼블록에 그룹화된 N개의 블록에서 위치가 동일한 유효 페이지의 개수를 뺀 개수에 리드예측시간을 곱한 제1 시간과, 상기 제1 개수에 전송예측시간을 곱한 제2 시간을 계산한 뒤, 상기 제1 시간과 상기 제2 시간을 더하여 상기 제1 슈퍼블록에 대응하는 소요예측시간을 생성하며, 상기 제1 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하고, 상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고, 상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간일 수 있다.In addition, the controller calculates a first time obtained by multiplying a read prediction time by a first number obtained by subtracting the number of valid pages in the same position from a first number obtained by adding the numbers of valid pages in each of the N blocks grouped in the first superblock, and a second time obtained by multiplying a transmission prediction time by the first number, and then adding the first time and the second time to generate a required prediction time corresponding to the first superblock, and applies the required prediction time generation method applied to the first superblock to each of the superblocks to generate the required predicted times, and the read prediction time may be a time predicted to be taken to cache data of the blocks in the page buffers, and the transmission prediction time may be a time predicted to be taken to transmit data cached in the page buffers to the controller.
또한, 상기 컨트롤러는, 상기 슈퍼블록들 중 제2 슈퍼블록에 그룹화된 N개의 블록 각각에서 서로 다른 위치에 페이지에 대해서 병렬리드가 가능한 경우, N개의 블록 각각의 유효 페이지 개수 중 가장 큰 개수에 리드예측시간을 곱한 제3 시간과, N개의 블록 각각의 유효 페이지 개수를 모두 합한 개수에 전송예측시간을 곱한 제4 시간을 계산한 뒤, 상기 제3 시간과 상기 제4 시간을 더하여 상기 제2 슈퍼블록에 대응하는 소요예측시간을 생성하며, 상기 제2 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하고, 상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고, 상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간일 수 있다.In addition, the controller calculates a third time obtained by multiplying the read prediction time by the largest number of valid pages of each of the N blocks grouped in the second superblock among the superblocks, and a fourth time obtained by multiplying the transmission prediction time by the sum of the valid pages of each of the N blocks, if parallel reading is possible for pages at different locations in each of the N blocks grouped in the second superblock, and then adds the third time and the fourth time to generate a required prediction time corresponding to the second superblock, and applies the required prediction time generation method applied to the second superblock to each of the superblocks to generate the required predicted times, and the read prediction time may be a time predicted to be taken to cache data of the blocks in the page buffers, and the transmission prediction time may be a time predicted to be taken to transmit data cached in the page buffers to the controller.
또한, 상기 컨트롤러는, 상기 블록들 중 유효 페이지의 개수가 가변되는 블록이 발생할 때마다, 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산할 수 있다.In addition, the controller can re-predict the value of the required prediction time corresponding to the superblock in which the blocks with the variable number of valid pages are grouped whenever a block with a variable number of valid pages occurs among the blocks.
또한, 상기 컨트롤러는, 설정된 시점마다 상기 블록들 중 유효 페이지의 개수가 가변된 블록이 존재하는지 확인하고, 확인결과 존재하는 경우 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산할 수 있다.In addition, the controller can check whether there is a block among the blocks with a variable number of valid pages at each set time, and if the check result shows that there is a block, the value of the required predicted time corresponding to the superblock in which the block with a variable number of valid pages is grouped can be re-predicted.
또한, 상기 컨트롤러는, 상기 소요예측시간들 중 상대적으로 가장 작은 값의 소요예측시간에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택할 수 있다.Additionally, the controller may select, as the victim block, a block including at least one valid page among N blocks grouped in a superblock corresponding to a relatively smallest predicted time among the predicted times required.
또한, 상기 컨트롤러는, 상기 슈퍼블록들 각각에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합친 개수가 설정된 개수 이하인 슈퍼블록이, 1개인 경우, 선택된 1개의 슈퍼블록에 그룹화된 N개의 블록을 상기 희생블록으로 선택하고, 적어도 두 개 이상인 경우, 적어도 두 개 이상의 슈퍼블록에 대응하는 적어도 두 개 이상의 소요예측시간의 값 중 상대적으로 가장 작은 값에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택할 수 있다.In addition, the controller may select, as the victim block, N blocks grouped in the selected one superblock, if there is one superblock in which the sum of the numbers of valid pages of each of N blocks grouped in each of the superblocks is less than or equal to a set number, and, if there are at least two or more, select, as the victim block, a block including at least one valid page among N blocks grouped in a superblock corresponding to a relatively smallest value among the values of required predicted times corresponding to at least two or more superblocks.
또한, 상기 컨트롤러는, 상기 슈퍼블록들 중 제3 슈퍼블록에 그룹화된 N개의 블록이 상기 희생블록으로 선택되어 상기 가비지 컬렉션을 통해 모든 유효 데이터가 타겟블록(target block)으로 이동된 경우, 상기 제3 슈퍼블록에 대응하는 소요예측시간을 예정값으로 설정할 수 있다.In addition, the controller may set the expected time corresponding to the third superblock to a target value when N blocks grouped in a third superblock among the superblocks are selected as the sacrifice blocks and all valid data is moved to the target block through the garbage collection.
또한, 상기 컨트롤러는, 상기 블록들 중 프리(free)블록의 개수가, 제1 개수 이하인 구간에서 상기 소요예측시간들을 생성 및 관리하고, 상기 제1 개수보다 큰 제2 개수 이상인 구간에서 상기 소요예측시간들을 관리하지 않을 수 있다.In addition, the controller may generate and manage the required predicted times in a section where the number of free blocks among the blocks is equal to or less than a first number, and may not manage the required predicted times in a section where the number is equal to or greater than a second number that is greater than the first number.
또한, 상기 다이들 중 제1 다이는 제1 채널(channel)에 연결되고, 상기 다이들 중 제2 다이는 제2 채널에 연결되며, 상기 제1 다이에 포함된 플래인들은 상기 제1 채널을 공유하는 다수의 제1 경로(way)에 연결되고, 상기 제2 다이에 포함된 플래인들은 상기 제2 채널을 공유하는 다수의 제2 경로에 연결되며, 상기 컨트롤러는, 상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록을 그룹화하는 것, 및 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 상기 설정된 조건에 포함시키거나, 또는 상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록을 그룹화하는 것, 및 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 상기 설정된 조건에 포함시키거나, 또는 상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 상기 설정된 조건에 포함시킬 수 있다.In addition, a first die among the dies is connected to a first channel, a second die among the dies is connected to a second channel, planes included in the first die are connected to a plurality of first ways sharing the first channel, planes included in the second die are connected to a plurality of second ways sharing the second channel, and the controller includes in the set condition grouping a first block included in the first plane of the first die with a second block included in the second plane of the first die, and a third block included in the third plane of the second die with a fourth block included in the fourth plane of the second die, or includes in the set condition grouping a first block included in the first plane of the first die with a third block included in the third plane of the second die, and a second block included in the second plane of the first die with a fourth block included in the fourth plane of the second die, Alternatively, the set condition may include grouping a first block included in the first plane of the first die, a second block included in the second plane of the first die, a third block included in the third plane of the second die, and a fourth block included in the fourth plane of the second die.
본 발명의 또 다른 실시예에 따른 메모리 시스템의 동작방법은, 다수의 메모리 셀(cell)들을 각각 포함하는 다수의 페이지(page)들과, 상기 페이지들을 각각 포함하는 다수의 블록(block)들과, 상기 블록들을 각각 포함하는 다수의 플래인(plane)들과, 상기 플래인들을 각각 포함하는 다수의 다이(die)들을 포함하고, 상기 블록들에서 출력되는 데이터를 페이지 단위로 캐싱(catching)하기 위한 페이지버퍼들을 포함하는 비휘발성 메모리 장치를 포함하는 메모리 시스템의 동작방법에 있어서, 상기 블록들 중 병렬리드가 가능한 N개의 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼블록들로서 관리하는 단계; 가비지 컬렉션(garbage collection)을 위해 상기 블록들에서 유효(valid) 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들을 생성하는 생성단계; 및 상기 소요예측시간들을 참조하여 상기 블록들 중 상기 가비지 컬렉션을 위한 희생(victim)블록을 선택하는 선택단계를 포함하며, N은 2이상의 자연수일 수 있다.According to another embodiment of the present invention, a method of operating a memory system includes a nonvolatile memory device including a plurality of pages, each including a plurality of memory cells, a plurality of blocks, each including the pages, a plurality of planes, each including the blocks, and a plurality of dies, each including the planes, and page buffers for catching data output from the blocks in units of pages, the method comprising: a step of grouping N blocks capable of parallel reading among the blocks according to set conditions and managing them as a plurality of super blocks; a step of generating estimated times calculated by predicting the required times for extracting valid data from the blocks for garbage collection in units of super blocks; and a step of selecting a victim block for the garbage collection among the blocks with reference to the estimated times, wherein N can be a natural number greater than or equal to 2.
또한, 상기 슈퍼블록들 중 제1 슈퍼블록에 그룹화된 N개의 블록 각각에서 동일한 위치의 페이지에 대해서만 병렬리드가 가능한 경우, 상기 생성단계는, 상기 제1 슈퍼블록에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합한 제1 개수에서 상기 제1 슈퍼블록에 그룹화된 N개의 블록에서 위치가 동일한 유효 페이지의 개수를 뺀 개수에 리드예측시간을 곱한 제1 시간을 계산하는 단계; 상기 제1 개수에 전송예측시간을 곱한 제2 시간을 계산하는 단계; 상기 제1 시간과 상기 제2 시간을 더하여 상기 제1 슈퍼블록에 대응하는 소요예측시간을 생성하는 단계; 및 상기 제1 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하는 단계를 포함하며, 상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고, 상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간일 수 있다.In addition, if parallel reading is possible only for pages in the same position in each of the N blocks grouped in the first superblock among the superblocks, the generation step includes: calculating a first time by multiplying a read prediction time by a first number obtained by subtracting the number of valid pages in the same position in the N blocks grouped in the first superblock from a total number of valid pages in each of the N blocks grouped in the first superblock; calculating a second time by multiplying the first number by a transmission prediction time; generating a required prediction time corresponding to the first superblock by adding the first time and the second time; and applying a required prediction time generation method applied to the first superblock to each of the superblocks to generate the required prediction times, wherein the read prediction time may be a time predicted to be taken to cache data of the blocks in the page buffers, and the transmission prediction time may be a time predicted to be taken to transmit data cached in the page buffers to the controller.
또한, 상기 슈퍼블록들 중 제2 슈퍼블록에 그룹화된 N개의 블록 각각에서 서로 다른 위치에 페이지에 대해서 병렬리드가 가능한 경우, 상기 생성단계는, 상기 제2 슈퍼블록에 그룹화된 N개의 블록 각각의 유효 페이지 개수 중 가장 큰 개수에 리드예측시간을 곱한 제3 시간을 계산하는 단계; 상기 제2 슈퍼블록에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합한 개수에 전송예측시간을 곱한 제4 시간을 계산하는 단계; 상기 제3 시간과 상기 제4 시간을 더하여 상기 제2 슈퍼블록에 대응하는 소요예측시간을 생성하는 단계; 및 상기 제2 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하는 단계를 포함하며, 상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고, 상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간일 수 있다.In addition, if parallel reading is possible for pages at different locations in each of the N blocks grouped in the second superblock among the superblocks, the generation step includes: calculating a third time by multiplying the read prediction time by the largest number among the valid page numbers of each of the N blocks grouped in the second superblock; calculating a fourth time by multiplying the transmission prediction time by the sum of the valid page numbers of each of the N blocks grouped in the second superblock; generating a required prediction time corresponding to the second superblock by adding the third time and the fourth time; and generating the required predicted times by applying the required predicted time generation method applied to the second superblock to each of the superblocks, wherein the read predicted time may be a time predicted to be taken to cache data of the blocks in the page buffers, and the transmission predicted time may be a time predicted to be taken to transmit data cached in the page buffers to the controller.
또한, 상기 블록들 중 유효 페이지의 개수가 가변되는 블록이 발생할 때마다, 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산하는 단계를 더 포함할 수 있다.In addition, whenever a block with a variable number of valid pages occurs among the above blocks, the step of re-predicting the value of the required prediction time corresponding to the superblock in which the block with a variable number of valid pages is grouped may be further included.
또한, 설정된 시점마다 상기 블록들 중 유효 페이지의 개수가 가변된 블록이 존재하는지 확인하고, 확인결과 존재하는 경우 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산하는 단계를 더 포함할 수 있다.In addition, the method may further include a step of checking whether there is a block among the blocks with a variable number of valid pages at each set time point, and, if the checking result shows that there is a block, re-predicting the value of the required predicted time corresponding to the superblock in which the block with a variable number of valid pages is grouped.
또한, 상기 선택단계는, 상기 소요예측시간들 중 상대적으로 가장 작은 값의 소요예측시간에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택할 수 있다.In addition, the selection step may select, as the victim block, a block including at least one valid page among N blocks grouped in a superblock corresponding to a relatively smallest predicted time among the predicted times required.
또한, 상기 선택단계는, 상기 슈퍼블록들 각각에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합친 개수가 설정된 개수 이하인 슈퍼블록이 1개인 경우, 선택된 1개의 슈퍼블록에 그룹화된 N개의 블록을 상기 희생블록으로 선택하는 단계; 및 상기 슈퍼블록들 각각에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합친 개수가 설정된 개수 이하인 슈퍼블록이 적어도 두 개 이상인 경우, 적어도 두 개 이상의 슈퍼블록에 대응하는 적어도 두 개 이상의 소요예측시간의 값 중 상대적으로 가장 작은 값에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택하는 단계를 포함할 수 있다.In addition, the selection step may include: a step of selecting N blocks grouped in the selected one superblock as the victim block, if there is one superblock in which the sum of the valid pages of each of N blocks grouped in each of the superblocks is less than or equal to a set number; and a step of selecting a block including at least one valid page among N blocks grouped in the superblock corresponding to a relatively smallest value among the values of required predicted times corresponding to the at least two or more superblocks, if there are at least two or more superblocks in which the sum of the valid pages of each of N blocks grouped in each of the superblocks is less than or equal to a set number, as the victim block.
또한, 상기 슈퍼블록들 중 제3 슈퍼블록에 그룹화된 N개의 블록이 상기 희생블록으로 선택되어 상기 가비지 컬렉션을 통해 모든 유효 데이터가 타겟블록(target block)으로 이동된 경우, 상기 제3 슈퍼블록에 대응하는 소요예측시간을 예정값으로 설정하는 단계를 더 포함할 수 있다.In addition, if N blocks grouped in a third superblock among the above superblocks are selected as the sacrifice blocks and all valid data is moved to the target block through the garbage collection, a step of setting the expected time corresponding to the third superblock to a target value may be further included.
또한, 상기 생성단계는, 상기 블록들 중 프리(free)블록의 개수가 제1 개수 이하인 구간에서 상기 소요예측시간들을 생성 및 관리하는 단계; 및 상기 블록들 중 프리블록의 개수가 상기 제1 개수보다 큰 제2 개수 이상인 구간에서 상기 소요예측시간들을 관리하지 않는 단계를 포함할 수 있다.In addition, the generation step may include a step of generating and managing the required predicted times in a section where the number of free blocks among the blocks is a first number or less; and a step of not managing the required predicted times in a section where the number of free blocks among the blocks is a second number or greater than the first number.
또한, 상기 다이들 중 제1 다이는 제1 채널(channel)에 연결되고, 상기 다이들 중 제2 다이는 제2 채널에 연결되며, 상기 제1 다이에 포함된 플래인들은 상기 제1 채널을 공유하는 다수의 제1 경로(way)에 연결되고, 상기 제2 다이에 포함된 플래인들은 상기 제2 채널을 공유하는 다수의 제2 경로에 연결되며, 상기 설정된 조건은, 상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록을 그룹화하는 것, 및 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 포함하거나, 또는 상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록을 그룹화하는 것, 및 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 포함하거나, 또는 상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 포함할 수 있다.In addition, a first die among the dies is connected to a first channel, a second die among the dies is connected to a second channel, planes included in the first die are connected to a plurality of first ways sharing the first channel, planes included in the second die are connected to a plurality of second ways sharing the second channel, and the set condition includes grouping a first block included in the first plane of the first die with a second block included in the second plane of the first die, and grouping a third block included in the third plane of the second die with a fourth block included in the fourth plane of the second die, or grouping a first block included in the first plane of the first die with a third block included in the third plane of the second die, and grouping a second block included in the second plane of the first die with a fourth block included in the fourth plane of the second die, or the first It may include grouping a first block included in a first plane of the die, a second block included in a second plane of the first die, a third block included in a third plane of the second die, and a fourth block included in a fourth plane of the second die.
본 기술은 가비지 컬렉션을 위해 블록들에서 유효 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 뒤, 예측연산된 소요시간을 기준으로 가비지 컬렉션을 위한 희생블록을 선택할 수 있다.This technology can predict the time required to extract valid data from blocks for garbage collection by superblock unit, and then select a victim block for garbage collection based on the predicted time.
이를 통해, 가비지 컬렉션을 수행하는데 걸리는 시간을 최소화하는 효과가 있다.This has the effect of minimizing the time it takes to perform garbage collection.
또한, 가비지 컬렉션의 수행으로 인해 메모리 시스템의 성능이 감소하는 것을 최소화하는 효과가 있다.Additionally, it has the effect of minimizing the decrease in the performance of the memory system due to the performance of garbage collection.
도 1은 본 발명의 실시 예에 따른 메모리 시스템을 포함하는 데이터 처리 시스템의 일 예를 개략적으로 도시한 도면.
도 2은 본 발명의 다른 실시예에 따른 메모리 시스템 내 컨트롤러를 설명하기 위해 도시한 도면.
도 3은 본 발명의 실시예에 따른 메모리 시스템에서 사용되는 가비지 컬렉션의 예를 설명하기 위한 도면.
도 4는 본 발명의 실시예에 따른 메모리 시스템에서 사용되는 슈퍼 메모리 블록의 개념을 설명하기 위해 도시한 도면.
도 5a 및 도 5b는 본 발명의 제1 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 설명하는 도면.
도 6은 도 5a 및 도 5b를 통해 설명된 본 발명의 제1 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 수행할 때, 희생블록을 선택하는 동작을 설명하기 위해 도시한 도면.
도 7a 및 도 7b는 본 발명의 제2 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 설명하는 도면.
도 8은 도 7a 및 도 7b를 통해 설명된 본 발명의 제2 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 수행할 때, 희생블록을 선택하는 동작을 설명하기 위해 도시한 도면.FIG. 1 is a schematic diagram illustrating an example of a data processing system including a memory system according to an embodiment of the present invention.
FIG. 2 is a drawing illustrating a controller within a memory system according to another embodiment of the present invention.
FIG. 3 is a diagram for explaining an example of garbage collection used in a memory system according to an embodiment of the present invention.
FIG. 4 is a diagram illustrating the concept of a super memory block used in a memory system according to an embodiment of the present invention.
FIGS. 5A and 5B are diagrams illustrating garbage collection for a super memory block in a memory system according to the first embodiment of the present invention.
FIG. 6 is a diagram illustrating an operation of selecting a victim block when performing garbage collection on a super memory block in a memory system according to the first embodiment of the present invention described through FIGS. 5a and 5b.
FIGS. 7A and 7B are diagrams illustrating garbage collection for a super memory block in a memory system according to a second embodiment of the present invention.
FIG. 8 is a diagram illustrating an operation of selecting a victim block when performing garbage collection on a super memory block in a memory system according to the second embodiment of the present invention described through FIGS. 7a and 7b.
이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 설명하기로 한다. 그러나, 본 발명은 이하에서 개시되는 실시예에 한정되는 것이 아니라 서로 다른 다양한 형태로 구성될 수 있으며, 단지 본 실시예는 본 발명의 개시가 완전하도록하며 통상의 지식을 가진자에게 본 발명의 범주를 완전하게 알려주기 위해 제공되는 것이다.Hereinafter, preferred embodiments of the present invention will be described with reference to the attached drawings. However, the present invention is not limited to the embodiments disclosed below, but may be configured in various different forms, and the present embodiments are provided only to ensure that the disclosure of the present invention is complete and to fully inform a person having ordinary skill in the art of the scope of the present invention.
도 1은 본 발명의 실시 예에 따른 메모리 시스템을 포함하는 데이터 처리 시스템의 일 예를 개략적으로 도시한 도면이다.FIG. 1 is a schematic diagram illustrating an example of a data processing system including a memory system according to an embodiment of the present invention.
도 1을 참조하면, 데이터 처리 시스템(100)은, 호스트(Host)(102) 및 메모리 시스템(110)을 포함한다.Referring to FIG. 1, a data processing system (100) includes a host (102) and a memory system (110).
그리고, 호스트(102)는, 전자 장치, 예컨대 휴대폰, MP3 플레이어, 랩탑 컴퓨터 등과 같은 휴대용 전자 장치들, 또는 데스크탑 컴퓨터, 게임기, TV, 프로젝터 등과 같은 전자 장치들을 포함, 즉 유무선 전자 장치들을 포함한다.And, the host (102) includes electronic devices, such as portable electronic devices such as mobile phones, MP3 players, laptop computers, or electronic devices such as desktop computers, game consoles, TVs, projectors, etc., i.e., wired and wireless electronic devices.
또한, 호스트(102)는, 적어도 하나의 운영 시스템(OS: operating system)를 포함하며, 운영 시스템은, 호스트(102)의 기능 및 동작을 전반적으로 관리 및 제어하고, 데이터 처리 시스템(100) 또는 메모리 시스템(110)을 사용하는 사용자와 호스트(102) 간에 상호 동작을 제공한다. 여기서, 운영 시스템은, 사용자의 사용 목적 및 용도에 상응한 기능 및 동작을 지원하며, 예컨대, 호스트(102)의 이동성(mobility)에 따라 일반 운영 시스템과 모바일 운용 시스템으로 구분할 수 있다. 또한, 운영 시스템에서의 일반 운영 시스템 시스템은, 사용자의 사용 환경에 따라 개인용 운영 시스템과 기업용 운영 시스템으로 구분할 수 있으며, 일 예로, 개인용 운영 시스템은, 일반 사용자를 위한 서비스 제공 기능을 지원하도록 특성화된 시스템으로, 윈도우(windows) 및 크롬(chrome) 등을 포함하고, 기업용 운영 시스템은, 고성능을 확보 및 지원하도록 특성화된 시스템으로, 윈도 서버(windows server), 리눅스(linux) 및 유닉스(unix) 등을 포함할 수 있다. 아울러, 운영 시스템에서의 모바일 운영 시스템은, 사용자들에게 이동성 서비스 제공 기능 및 시스템의 절전 기능을 지원하도록 특성화된 시스템으로, 안드로이드(android), iOS, 윈도 모바일(windows mobile) 등을 포함할 수 있다. 이때, 호스트(102)는, 복수의 운영 시스템들을 포함할 수 있으며, 또한 사용자 요청(user request)에 상응한 메모리 시스템(110)과의 동작 수행을 위해 운영 시스템을 실행한다, 여기서, 호스트(102)는, 사용자 요청에 해당하는 복수의 커맨드들을 메모리 시스템(110)으로 전송하며, 그에 따라 메모리 시스템(110)에서는 커맨드들에 해당하는 동작들, 즉 사용자 요청에 상응하는 동작들을 수행한다.In addition, the host (102) includes at least one operating system (OS), and the operating system generally manages and controls the functions and operations of the host (102) and provides interaction between a user using the data processing system (100) or the memory system (110) and the host (102). Here, the operating system supports functions and operations corresponding to the user's usage purpose and use, and may be divided into a general operating system and a mobile operating system, for example, depending on the mobility of the host (102). In addition, the general operating system system in the operating system may be divided into a personal operating system and an enterprise operating system, depending on the user's usage environment. For example, the personal operating system is a system specialized to support a service provision function for general users, and may include Windows and Chrome, and the enterprise operating system is a system specialized to secure and support high performance, and may include Windows server, Linux, Unix, and the like. In addition, the mobile operating system in the operating system is a system specialized to support the function of providing mobility services to users and the power saving function of the system, and may include Android, iOS, Windows Mobile, etc. At this time, the host (102) may include a plurality of operating systems, and also executes the operating system to perform an operation with the memory system (110) corresponding to a user request. Here, the host (102) transmits a plurality of commands corresponding to the user request to the memory system (110), and accordingly, the memory system (110) performs operations corresponding to the commands, that is, operations corresponding to the user request.
또한, 메모리 시스템(110)은, 호스트(102)의 요청에 응답하여 동작하며, 특히 호스트(102)에 의해서 액세스되는 데이터를 저장한다. 다시 말해, 메모리 시스템(110)은, 호스트(102)의 주 기억 장치 또는 보조 기억 장치로 사용될 수 있다. 여기서, 메모리 시스템(110)은 호스트(102)와 연결되는 호스트 인터페이스 프로토콜에 따라, 다양한 종류의 저장 장치들 중 어느 하나로 구현될 수 있다. 예를 들면, 메모리 시스템(110)은, 솔리드 스테이트 드라이브(SSD: Solid State Drive), MMC, eMMC(embedded MMC), RS-MMC(Reduced Size MMC), micro-MMC 형태의 멀티 미디어 카드(MMC: Multi Media Card), SD, mini-SD, micro-SD 형태의 시큐어 디지털(SD: Secure Digital) 카드, USB(Universal Storage Bus) 저장 장치, UFS(Universal Flash Storage) 장치, CF(Compact Flash) 카드, 스마트 미디어(Smart Media) 카드, 메모리 스틱(Memory Stick) 등과 같은 다양한 종류의 저장 장치들 중 어느 하나로 구현될 수 있다.In addition, the memory system (110) operates in response to a request from the host (102), and in particular, stores data accessed by the host (102). In other words, the memory system (110) can be used as a main memory device or an auxiliary memory device of the host (102). Here, the memory system (110) can be implemented as any one of various types of storage devices according to a host interface protocol connected to the host (102). For example, the memory system (110) may be implemented as one of various types of storage devices, such as a solid state drive (SSD), a multi media card (MMC) in the form of an MMC, an embedded MMC (eMMC), a reduced size MMC (RS-MMC), a micro-MMC, a secure digital (SD) card in the form of an SD, mini-SD, or micro-SD, a universal storage bus (USB) storage device, a universal flash storage (UFS) device, a compact flash (CF) card, a smart media card, a memory stick, and the like.
아울러, 메모리 시스템(110)을 구현하는 저장 장치들은, DRAM(Dynamic Random Access Memory), SRAM(Static RAM) 등과 같은 휘발성 메모리 장치와, ROM(Read Only Memory), MROM(Mask ROM), PROM(Programmable ROM), EPROM(Erasable ROM), EEPROM(Electrically Erasable ROM), FRAM(Ferromagnetic ROM), PRAM(Phase change RAM), MRAM(Magnetic RAM), RRAM(Resistive RAM), 플래시 메모리 등과 같은 비휘발성 메모리 장치로 구현될 수 있다.In addition, storage devices implementing the memory system (110) may be implemented as volatile memory devices such as DRAM (Dynamic Random Access Memory), SRAM (Static RAM), etc., and nonvolatile memory devices such as ROM (Read Only Memory), MROM (Mask ROM), PROM (Programmable ROM), EPROM (Erasable ROM), EEPROM (Electrically Erasable ROM), FRAM (Ferromagnetic ROM), PRAM (Phase change RAM), MRAM (Magnetic RAM), RRAM (Resistive RAM), flash memory, etc.
그리고, 메모리 시스템(110)은, 호스트(102)에 의해서 액세스되는 데이터를 저장하는 메모리 장치(150), 및 메모리 장치(150)로의 데이터 저장을 제어하는 컨트롤러(130)를 포함한다.And, the memory system (110) includes a memory device (150) that stores data accessed by the host (102), and a controller (130) that controls data storage to the memory device (150).
여기서, 컨트롤러(130) 및 메모리 장치(150)는 하나의 반도체 장치로 집적될 수 있다. 일 예로, 컨트롤러(130) 및 메모리 장치(150)는 하나의 반도체 장치로 집적되어 SSD를 구성할 수 있다. 메모리 시스템(110)이 SSD로 이용되는 경우, 메모리 시스템(110)에 연결되는 호스트(102)의 동작 속도는 보다 개선될 수 있다. 아울러, 컨트롤러(130) 및 메모리 장치(150)는, 하나의 반도체 장치로 집적되어 메모리 카드를 구성할 수도 있으며, 일 예로 PC 카드(PCMCIA: Personal Computer Memory Card International Association), 컴팩트 플래시 카드(CF), 스마트 미디어 카드(SM, SMC), 메모리 스틱, 멀티미디어 카드(MMC, RS-MMC, MMCmicro), SD 카드(SD, miniSD, microSD, SDHC), 유니버설 플래시 기억 장치(UFS) 등과 같은 메모리 카드를 구성할 수 있다.Here, the controller (130) and the memory device (150) may be integrated into one semiconductor device. For example, the controller (130) and the memory device (150) may be integrated into one semiconductor device to configure an SSD. When the memory system (110) is used as an SSD, the operating speed of the host (102) connected to the memory system (110) may be further improved. In addition, the controller (130) and the memory device (150) may be integrated into one semiconductor device to configure a memory card, and for example, the controller (130) and the memory device (150) may be integrated into one semiconductor device to configure a memory card, such as a PC card (PCMCIA: Personal Computer Memory Card International Association), a compact flash card (CF), a smart media card (SM, SMC), a memory stick, a multimedia card (MMC, RS-MMC, MMCmicro), an SD card (SD, miniSD, microSD, SDHC), a universal flash memory device (UFS), etc.
또한, 다른 일 예로, 메모리 시스템(110)은, 컴퓨터, UMPC(Ultra Mobile PC), 워크스테이션, 넷북(net-book), PDA(Personal Digital Assistants), 포터블(portable) 컴퓨터, 웹 타블렛(web tablet), 태블릿 컴퓨터(tablet computer), 무선 전화기(wireless phone), 모바일 폰(mobile phone), 스마트폰(smart phone), e-북(e-book), PMP(portable multimedia player), 휴대용 게임기, 네비게이션(navigation) 장치, 블랙박스(black box), 디지털 카메라(digital camera), DMB(Digital Multimedia Broadcasting) 재생기, 3차원 텔레비전(3-dimensional television), 스마트 텔레비전(smart television), 디지털 음성 녹음기(digital audio recorder), 디지털 음성 재생기(digital audio player), 디지털 영상 녹화기(digital picture recorder), 디지털 영상 재생기(digital picture player), 디지털 동영상 녹화기(digital video recorder), 디지털 동영상 재생기(digital video player), 데이터 센터를 구성하는 스토리지, 정보를 무선 환경에서 송수신할 수 있는 장치, 홈 네트워크를 구성하는 다양한 전자 장치들 중 하나, 컴퓨터 네트워크를 구성하는 다양한 전자 장치들 중 하나, 텔레매틱스 네트워크를 구성하는 다양한 전자 장치들 중 하나, RFID(radio frequency identification) 장치, 또는 컴퓨팅 시스템을 구성하는 다양한 구성 요소들 중 하나 등을 구성할 수 있다.In addition, as another example, the memory system (110) may be used in a computer, an Ultra Mobile PC (UMPC), a workstation, a net-book, a PDA (Personal Digital Assistants), a portable computer, a web tablet, a tablet computer, a wireless phone, a mobile phone, a smart phone, an e-book, a portable multimedia player (PMP), a portable game console, a navigation device, a black box, a digital camera, a DMB (Digital Multimedia Broadcasting) player, a 3-dimensional television, a smart television, a digital audio recorder, a digital audio player, a digital picture recorder, a digital picture player, a digital video recorder, a digital video player, a storage constituting a data center, and information in a wireless environment. It may comprise a device capable of transmitting and receiving, one of various electronic devices forming a home network, one of various electronic devices forming a computer network, one of various electronic devices forming a telematics network, an RFID (radio frequency identification) device, or one of various components forming a computing system.
한편, 메모리 시스템(110)에서의 메모리 장치(150)는, 전원이 공급되지 않아도 저장된 데이터를 유지할 수 있으며, 특히 라이트(write) 동작을 통해 호스트(102)로부터 제공된 데이터를 저장하고, 리드(read) 동작을 통해 저장된 데이터를 호스트(102)로 제공한다. 여기서, 메모리 장치(150)는, 복수의 메모리 블록(memory block)들(152,154,156)을 포함할 수 있다. 또한, 메모리 블록들(152,154,156) 각각은, 복수의 페이지(page)들(P<0>, P<1>, P<2>, P<3>, P<4>,...>)을 포함할 수 있다. 또한, 페이지들(P<0>, P<1>, P<2>, P<3>, P<4>,...>) 각각은, 복수의 메모리 셀(cell)들(미도시)을 포함할 수 있다. 그리고, 메모리 블록들(152,154,156) 각각은, 입/출력되는 데이터를 페이지 단위로 캐싱하기 위한 페이지버퍼들(미도시)를 포함한다. 그리고, 메모리 장치(150)는, 복수의 메모리 블록들(152,154,156)이 각각 포함된 복수의 플래인(plane)들(미도시)을 포함할 수 있다. 또한, 메모리 장치(150)는, 복수의 플래인들이 각각 포함된 복수의 메모리 다이(memory die)들(미도시)을 포함할 수 있다. 아울러, 메모리 장치(150)는, 비휘발성 메모리 장치, 일 예로 플래시 메모리가 될 수 있으며, 이때 플래시 메모리는 3차원(dimension) 입체 스택(stack) 구조가 될 수 있다.Meanwhile, the memory device (150) in the memory system (110) can maintain stored data even when power is not supplied, and in particular, stores data provided from the host (102) through a write operation, and provides the stored data to the host (102) through a read operation. Here, the memory device (150) may include a plurality of memory blocks (152, 154, 156). In addition, each of the memory blocks (152, 154, 156) may include a plurality of pages (P<0>, P<1>, P<2>, P<3>, P<4>,...>). In addition, each of the pages (P<0>, P<1>, P<2>, P<3>, P<4>,...>) may include a plurality of memory cells (not shown). And, each of the memory blocks (152, 154, 156) includes page buffers (not shown) for caching input/output data in units of pages. And, the memory device (150) may include a plurality of planes (not shown) each including a plurality of memory blocks (152, 154, 156). In addition, the memory device (150) may include a plurality of memory dies (not shown) each including a plurality of planes. In addition, the memory device (150) may be a nonvolatile memory device, for example, a flash memory, and in this case, the flash memory may have a three-dimensional (3D) stack structure.
그리고, 메모리 시스템(110)에서의 컨트롤러(130)는, 호스트(102)로부터의 요청에 응답하여 메모리 장치(150)를 제어한다. 예컨대, 컨트롤러(130)는, 메모리 장치(150)로부터 리드된 데이터를 호스트(102)로 제공하고, 호스트(102)로부터 제공된 데이터를 메모리 장치(150)에 저장하며, 이를 위해 컨트롤러(130)는, 메모리 장치(150)의 리드, 라이트, 프로그램(program), 이레이즈(erase) 등의 동작을 제어한다.And, the controller (130) in the memory system (110) controls the memory device (150) in response to a request from the host (102). For example, the controller (130) provides data read from the memory device (150) to the host (102) and stores data provided from the host (102) in the memory device (150). To this end, the controller (130) controls operations such as read, write, program, and erase of the memory device (150).
보다 구체적으로 설명하면, 컨트롤러(130)는, 호스트 인터페이스(HOST INTERFACE, 132), 프로세서(PROCESS, 134), 메모리 인터페이스(MEMORY INTERFACE, 142), 및 메모리(MEMORY, 144)를 포함한다.More specifically, the controller (130) includes a host interface (HOST INTERFACE, 132), a processor (PROCESS, 134), a memory interface (MEMORY INTERFACE, 142), and a memory (MEMORY, 144).
또한, 호스트 인터페이스(132)는, 호스트(102)의 커맨드(command) 및 데이터를 처리하며, USB(Universal Serial Bus), MMC(Multi-Media Card), PCI-E(Peripheral Component Interconnect-Express), SAS(Serial-attached SCSI), SATA(Serial Advanced Technology Attachment), PATA(Parallel Advanced Technology Attachment), SCSI(Small Computer System Interface), ESDI(Enhanced Small Disk Interface), IDE(Integrated Drive Electronics), MIPI(Mobile Industry Processor Interface) 등과 같은 다양한 인터페이스 프로토콜들 중 적어도 하나를 통해 호스트(102)와 통신하도록 구성될 수 있다. 여기서, 호스트 인터페이스(132)는, 호스트(102)와 데이터를 주고 받는 영역으로 호스트 인터페이스 계층(HIL: Host Interface Layer, 이하 'HIL'이라 칭하기로 함)이라 불리는 펌웨어(firmware)를 통해 구동될 수 있다.In addition, the host interface (132) processes commands and data of the host (102), and may be configured to communicate with the host (102) through at least one of various interface protocols, such as Universal Serial Bus (USB), Multi-Media Card (MMC), Peripheral Component Interconnect-Express (PCI-E), Serial-attached SCSI (SAS), Serial Advanced Technology Attachment (SATA), Parallel Advanced Technology Attachment (PATA), Small Computer System Interface (SCSI), Enhanced Small Disk Interface (ESDI), Integrated Drive Electronics (IDE), and Mobile Industry Processor Interface (MIPI). Here, the host interface (132) may be driven through firmware called a Host Interface Layer (HIL, hereinafter referred to as 'HIL') as an area that sends and receives data with the host (102).
또한, 메모리 인터페이스(142)는, 컨트롤러(130)가 호스트(102)로부터의 요청에 응답하여 메모리 장치(150)를 제어하기 위해, 컨트롤러(130)와 메모리 장치(150) 간의 인터페이싱을 수행하는 메모리/스토리지(storage) 인터페이스가 된다. 여기서, 메모리 인터페이스(142)는, 메모리 장치(150)가 플래시 메모리, 특히 일 예로 메모리 장치(150)가 NAND 플래시 메모리일 경우에 NAND 플래시 컨트롤러(NFC: NAND Flash Controller)로서, 프로세서(134)의 제어에 따라, 메모리 장치(150)의 제어 신호를 생성하고 데이터를 처리한다. 그리고, 메모리 인터페이스(142)는, 컨트롤러(130)와 메모리 장치(150) 간의 커맨드 및 데이터를 처리하는 인터페이스, 일 예로 NAND 플래시 인터페이스의 동작, 특히 컨트롤러(130)와 메모리 장치(150) 간 데이터 입출력을 지원하며, 메모리 장치(150)와 데이터를 주고 받는 영역으로 플래시 인터페이스 계층(FIL: Flash Interface Layer, 이하 'FIL'이라 칭하기로 함)이라 불리는 펌웨어(firmware)를 통해 구동될 수 있다.In addition, the memory interface (142) is a memory/storage interface that performs interfacing between the controller (130) and the memory device (150) so that the controller (130) can control the memory device (150) in response to a request from the host (102). Here, the memory interface (142) is a NAND flash controller (NFC) when the memory device (150) is a flash memory, particularly, for example, a NAND flash memory, and generates a control signal of the memory device (150) and processes data under the control of the processor (134). And, the memory interface (142) is an interface that processes commands and data between the controller (130) and the memory device (150), for example, the operation of a NAND flash interface, particularly, supports data input/output between the controller (130) and the memory device (150), and can be driven through firmware called the Flash Interface Layer (FIL, hereinafter referred to as 'FIL') as an area that exchanges data with the memory device (150).
아울러, 메모리(144)는, 메모리 시스템(110) 및 컨트롤러(130)의 동작 메모리로서, 메모리 시스템(110) 및 컨트롤러(130)의 구동을 위한 데이터를 저장한다. 보다 구체적으로 설명하면, 메모리(144)는, 컨트롤러(130)가 호스트(102)로부터의 요청에 응답하여 메모리 장치(150)를 제어하기 위해 필요한 데이터를 저장한다. 예컨대, 컨트롤러(130)가, 메모리 장치(150)로부터 리드된 데이터를 호스트(102)로 제공하는 동작, 및 호스트(102)로부터 제공된 데이터를 메모리 장치(150)에 저장하는 동작을 위해 메모리 장치(150)의 리드, 라이트, 프로그램, 이레이즈(erase) 등의 동작을 제어할 때, 필요한 데이터를 저장한다.In addition, the memory (144) stores data for driving the memory system (110) and the controller (130) as an operating memory of the memory system (110) and the controller (130). More specifically, the memory (144) stores data necessary for the controller (130) to control the memory device (150) in response to a request from the host (102). For example, the controller (130) stores data necessary when controlling operations such as read, write, program, and erase of the memory device (150) for an operation of providing data read from the memory device (150) to the host (102) and an operation of storing data provided from the host (102) in the memory device (150).
여기서, 메모리(144)는, 휘발성 메모리로 구현될 수 있으며, 예컨대 정적 랜덤 액세스 메모리(SRAM: Static Random Access Memory), 또는 동적 랜덤 액세스 메모리(DRAM: Dynamic Random Access Memory) 등으로 구현될 수 있다. 아울러, 메모리(144)는, 도 1에서 도시한 바와 같이, 컨트롤러(130)의 내부에 포함될 수 있다. 또한, 메모리(144)는, 도 1에서 도시된 것과 다르게 컨트롤러(130)의 외부에 존재할 수 있으며, 이와 같은 경우 별도의 메모리 인터페이스(미도시)를 통해 컨트롤러(130)로부터 데이터가 입출력되는 외부 휘발성 메모리로 구현될 수도 있다.Here, the memory (144) may be implemented as a volatile memory, and may be implemented as, for example, a static random access memory (SRAM) or a dynamic random access memory (DRAM). In addition, the memory (144) may be included in the controller (130), as illustrated in FIG. 1. In addition, the memory (144) may exist outside the controller (130), differently from that illustrated in FIG. 1, and in this case, it may be implemented as an external volatile memory in which data is input/output from the controller (130) through a separate memory interface (not illustrated).
또한, 메모리(144)는, 전술한 바와 같이, 호스트(102)와 메모리 장치(150) 간 데이터 라이트 및 리드 등의 동작을 수행하기 위해 필요한 데이터, 및 데이터 라이트 및 리드 등의 동작 수행 시의 데이터를 저장하며, 이러한 데이터 저장을 위해, 프로그램 메모리, 데이터 메모리, 라이트 버퍼(buffer)/캐시(cache), 리드 버퍼/캐시, 데이터 버퍼/캐시, 맵(map) 버퍼/캐시 등을 포함할 수 있다.In addition, the memory (144), as described above, stores data required to perform operations such as data write and read between the host (102) and the memory device (150), and data when performing operations such as data write and read, and may include a program memory, a data memory, a write buffer/cache, a read buffer/cache, a data buffer/cache, a map buffer/cache, etc. for storing such data.
그리고, 프로세서(134)는, 메모리 시스템(110)의 전체적인 동작을 제어하며, 특히 호스트(102)로부터의 라이트 요청 또는 리드 요청에 응답하여, 메모리 장치(150)에 대한 프로그램 동작 또는 리드 동작을 제어한다. 여기서, 프로세서(134)는, 메모리 시스템(110)의 제반 동작을 제어하기 위해 플래시 변환 계층(FTL: Flash Translation Layer, 이하 'FTL'이라 칭하기로 함)이라 불리는 펌웨어(firmware)를 구동한다. 또한, 프로세서(134)는, 마이크로프로세서 또는 중앙 처리 장치(CPU) 등으로 구현될 수 있다.And, the processor (134) controls the overall operation of the memory system (110), and in particular, controls a program operation or a read operation for the memory device (150) in response to a write request or a read request from the host (102). Here, the processor (134) drives firmware called a flash translation layer (FTL, hereinafter referred to as 'FTL') to control the overall operation of the memory system (110). In addition, the processor (134) may be implemented as a microprocessor or a central processing unit (CPU), etc.
일 예로, 컨트롤러(130)는, 마이크로프로세서 또는 중앙 처리 장치(CPU) 등으로 구현된 프로세서(134)를 통해, 호스트(102)로부터 요청된 동작을 메모리 장치(150)에서 수행, 다시 말해 호스트(102)로부터 수신된 커맨드에 해당하는 커맨드 동작을, 메모리 장치(150)와 수행한다. 여기서, 컨트롤러(130)는, 호스트(102)로부터 수신된 커맨드에 해당하는 커맨드 동작으로 포그라운드(foreground) 동작을 수행, 예컨대 라이트 커맨드에 해당하는 프로그램 동작, 리드 커맨드에 해당하는 리드 동작, 이레이즈 커맨드(erase command)에 해당하는 이레이즈 동작, 셋 커맨드(set command)로 셋 파라미터 커맨드(set parameter command) 또는 셋 픽쳐 커맨드(set feature command)에 해당하는 파라미터 셋 동작 등을 수행할 수 있다.For example, the controller (130) performs an operation requested from the host (102) in the memory device (150) through a processor (134) implemented as a microprocessor or a central processing unit (CPU), or in other words, performs a command operation corresponding to a command received from the host (102) with the memory device (150). Here, the controller (130) may perform a foreground operation as a command operation corresponding to the command received from the host (102), for example, a program operation corresponding to a write command, a read operation corresponding to a read command, an erase operation corresponding to an erase command, a parameter set operation corresponding to a set parameter command or a set feature command as a set command, etc.
그리고, 컨트롤러(130)는, 마이크로프로세서 또는 중앙 처리 장치(CPU) 등으로 구현된 프로세서(134)를 통해, 메모리 장치(150)에 대한 백그라운드(background) 동작을 수행할 수도 있다. 여기서, 메모리 장치(150)에 대한 백그라운드 동작은, 메모리 장치(150)의 메모리 블록들(152,154,156)에서 임의의 메모리 블록에 저장된 데이터를 다른 임의의 메모리 블록으로 카피(copy)하여 처리하는 동작, 일 예로 가비지 컬렉션(GC: Garbage Collection) 동작을 포함할 수 있다. 이와 같이, 프로세서(134)는, 메모리 장치(150)에 대한 백그라운드 동작으로써 가비지 컬렉션 동작을 제어할 수 있기 때문에, 도면에서와 같이 프로세서(134) 내부에 가비지 컬렉션 제어부(196)가 포함될 수 있다. 그리고, 메모리 장치(150)에 대한 백그라운드 동작은, 메모리 장치(150)의 메모리 블록들(152, 154, 156) 간 또는 메모리 블록들(152, 154, 156)에 저장된 데이터 간을 스왑(swap)하여 처리하는 동작, 일 예로 웨어 레벨링(WL: Wear Leveling) 동작을 포함할 수 있다. 그리고, 메모리 장치(150)에 대한 백그라운드 동작은, 컨트롤러(130)에 저장된 맵 데이터를 메모리 장치(150)의 메모리 블록들(152, 154, 156)로 저장하는 동작, 일 예로 맵 플러시(map flush) 동작을 포함할 수 있다. 또한, 메모리 장치(150)에 대한 백그라운드 동작은, 메모리 장치(150)에 대한 배드 관리(bad management)하는 동작, 일 예로 메모리 장치(150)에 포함된 복수의 메모리 블록들(152, 154, 156)에서 배드 블록을 확인하여 처리하는 배드 블록 관리(bad block management) 동작을 포함할 수 있다.In addition, the controller (130) may perform a background operation for the memory device (150) through a processor (134) implemented as a microprocessor or a central processing unit (CPU). Here, the background operation for the memory device (150) may include an operation of copying and processing data stored in any memory block among the memory blocks (152, 154, 156) of the memory device (150) to another arbitrary memory block, for example, a garbage collection (GC) operation. In this way, since the processor (134) can control the garbage collection operation as a background operation for the memory device (150), a garbage collection control unit (196) may be included within the processor (134) as shown in the drawing. And, the background operation for the memory device (150) may include an operation for processing by swapping between memory blocks (152, 154, 156) of the memory device (150) or between data stored in the memory blocks (152, 154, 156), for example, a wear leveling (WL) operation. And, the background operation for the memory device (150) may include an operation for storing map data stored in the controller (130) into memory blocks (152, 154, 156) of the memory device (150), for example, a map flush operation. Additionally, the background operation for the memory device (150) may include a bad management operation for the memory device (150), for example, a bad block management operation for checking and processing bad blocks in a plurality of memory blocks (152, 154, 156) included in the memory device (150).
그리고, 컨트롤러(130)의 프로세서(134)에는, 메모리 장치(150)의 배드 관리를 수행하기 위한 구성요소(도시하지 않음)가 포함될 수 있다. 이때, 메모리 장치(150)의 배드 관리를 수행하기 위한 구성요소는, 메모리 장치(150)에 포함된 복수의 메모리 블록들(152, 154, 156)에서 배드 블록을 확인한 후, 확인된 배드 블록을 배드 처리하는 배드 블록 관리를 수행한다. 여기서, 배드 관리는, 메모리 장치(150)가 플래시 메모리, 예컨대 낸드 플래시 메모리일 경우, 낸드의 특성으로 인해 데이터 라이트, 예컨대 데이터 프로그램(program) 시에 프로그램 실패(program fail)가 발생할 수 있으며, 프로그램 실패가 발생한 메모리 블록을 배드(bad) 처리한 후, 프로그램 실패된 데이터를 새로운 메모리 블록에 라이트, 즉 프로그램하는 것을 의미한다.And, the processor (134) of the controller (130) may include a component (not shown) for performing bad management of the memory device (150). At this time, the component for performing bad management of the memory device (150) performs bad block management that checks for bad blocks in a plurality of memory blocks (152, 154, 156) included in the memory device (150) and then processes the checked bad blocks as bad. Here, bad management means that when the memory device (150) is a flash memory, for example, a NAND flash memory, a program fail may occur during data writing, for example, a data program, due to the characteristics of NAND, and after processing the memory block in which the program failure occurred as bad, the data in which the program failure occurred is written, i.e., programmed, to a new memory block.
도 2은 본 발명의 다른 실시예에 따른 메모리 시스템 내 컨트롤러를 설명하기 위해 도시한 도면이다.FIG. 2 is a diagram illustrating a controller within a memory system according to another embodiment of the present invention.
도 2을 참조하면, 호스트(102) 및 메모리 장치(150)와 연동하는 컨트롤러(130)는 호스트 인터페이스(132), 플래시 변환 계층(FTL)(40), 메모리 인터페이스(142) 및 메모리 소자(144)를 포함할 수 있다. Referring to FIG. 2, a controller (130) that interacts with a host (102) and a memory device (150) may include a host interface (132), a flash translation layer (FTL) (40), a memory interface (142), and a memory element (144).
호스트 인터페이스(132)는 호스트(102)로부터 전달되는 명령, 데이터 등을 주고받기 위한 것이다. 예를 들어, 호스트 인터페이스(132)은 호스트(102)로부터 전달되는 명령, 데이터 등을 순차적으로 저장한 뒤, 저장된 순서에 따라 출력할 수 있는 명령큐(56), 명령큐(56)로부터 전달되는 명령, 데이터 등을 분류하거나 처리 순서를 조정할 수 있는 버퍼관리자(52), 및 버퍼관리자(52)로부터 전달된 명령, 데이터 등의 처리를 위한 이벤트를 순차적으로 전달하기 위한 이벤트큐(54)를 포함할 수 있다.The host interface (132) is for transmitting and receiving commands, data, etc. transmitted from the host (102). For example, the host interface (132) may include a command queue (56) that can sequentially store commands, data, etc. transmitted from the host (102) and output them according to the storage order, a buffer manager (52) that can classify commands, data, etc. transmitted from the command queue (56) or adjust the processing order, and an event queue (54) that can sequentially transmit events for processing commands, data, etc. transmitted from the buffer manager (52).
호스트(102)로부터 명령, 데이터는 동일한 특성의 복수개가 연속적으로 전달될 수도 있고, 서로 다른 특성의 명령, 데이터가 뒤 섞여 전달될 수도 있다. 예를 들어, 데이터를 읽기 위한 명령어가 복수 개 전달되거나, 읽기 및 프로그램 명령이 교번적으로 전달될 수도 있다. 호스트 인터페이스(132)은 호스트(102)로부터 전달된 명령, 데이터 등을 명령큐(56)에 먼저 순차적으로 저장한다. 이후, 호스트(102)로부터 전달된 명령, 데이터 등의 특성에 따라 컨트롤러(130)가 어떠한 동작을 수행할 지를 예측할 수 있으며, 이를 근거로 명령, 데이터 등의 처리 순서나 우선 순위를 결정할 수도 있다. 또한, 호스트(102)로부터 전달된 명령, 데이터 등의 특성에 따라, 호스트 인터페이스(132) 내 버퍼관리자(52)는 명령, 데이터 등을 메모리 소자(144)에 저장할 지, 플래시 변환 계층(FTL)(40)으로 전달할 지도 결정할 수도 있다. 이벤트큐(54)는 호스트(102)로부터 전달된 명령, 데이터 등에 따라 메모리 시스템 혹은 컨트롤러(130)가 내부적으로 수행, 처리해야 하는 이벤트를 버퍼관리자(52)로부터 수신한 후, 수신된 순서대로 플래시 변환 계층(FTL)(40)에 전달할 수 있다.From the host (102), multiple commands and data with the same characteristics may be transmitted sequentially, or commands and data with different characteristics may be transmitted mixed together. For example, multiple commands for reading data may be transmitted, or read and program commands may be transmitted alternately. The host interface (132) first sequentially stores commands, data, etc. transmitted from the host (102) in the command queue (56). Thereafter, depending on the characteristics of the commands, data, etc. transmitted from the host (102), it is possible to predict what operation the controller (130) will perform, and based on this, the processing order or priority of the commands, data, etc. may be determined. In addition, depending on the characteristics of the commands, data, etc. transmitted from the host (102), the buffer manager (52) in the host interface (132) may determine whether to store the commands, data, etc. in the memory device (144) or transmit them to the flash translation layer (FTL) (40). The event queue (54) can receive events that the memory system or controller (130) must internally perform or process based on commands, data, etc. transmitted from the host (102) from the buffer manager (52), and then transmit them to the flash translation layer (FTL) (40) in the order in which they were received.
실시예에 따라, 플래시 변환 계층(FTL)(40)은 이벤트규(54)로부터 수신된 이벤트를 관리하기 위한 호스트 요구 관리자(Host Request Manager(HRM), 46), 맵 데이터를 관리하는 맵데이터 관리자(Map Manger(MM), 44), 가비지 컬렉션 또는 웨어 레벨링을 수행하기 위한 상태 관리자(42), 메모리 장치 내 블록에 명령을 수행하기 위한 블록 관리자(48)를 포함할 수 있다.According to an embodiment, the flash translation layer (FTL) (40) may include a host request manager (HRM) 46 for managing events received from an event manager (54), a map data manager (MM) 44 for managing map data, a state manager (42) for performing garbage collection or wear leveling, and a block manager (48) for performing commands to blocks within a memory device.
예를 들면, 호스트 요구 관리자(HRM, 46)는 맵데이터 관리자(MM, 44) 및 블록 관리자(48)를 사용하여 호스트 인터페이스(132)으로부터 수신된 읽기 및 프로그램 명령, 이벤트에 따른 요청을 처리할 수 있다. 호스트 요구 관리자(HRM, 46)는 전달된 요청의 논리적 주소에 해당하는 물리적 주소를 파악하기 위해 맵데이터 관리자(MM, 44)에 조회 요청을 보내고 물리적 주소에 대해 메모리 인터페이스(142)에 플래시 읽기 요청을 전송하여 읽기 요청을 처리할 수 있다. 한편, 호스트 요구 관리자(HRM, 46)는 먼저 블록 관리자(48)에 프로그램 요청을 전송함으로써 미기록된(데이터가 없는) 메모리 장치의 특정 페이지에 데이터를 프로그램한 다음, 맵데이터 관리자(MM, 44)에 프로그램 요청에 대한 맵 갱신(update) 요청을 전송함으로써 논리적-물리적 주소의 매핑 정보에 프로그램한 데이터에 대한 내용을 업데이트할 수 있다.For example, the host request manager (HRM, 46) can process read and program commands, and requests based on events received from the host interface (132) using the map data manager (MM, 44) and the block manager (48). The host request manager (HRM, 46) can process a read request by sending an inquiry request to the map data manager (MM, 44) to find out a physical address corresponding to a logical address of the transmitted request and sending a flash read request to the memory interface (142) for the physical address. Meanwhile, the host request manager (HRM, 46) can first program data into a specific page of an unrecorded (data-free) memory device by sending a program request to the block manager (48), and then update the contents of the programmed data in the mapping information of the logical-physical address by sending a map update request for the program request to the map data manager (MM, 44).
여기서, 블록 관리자(48)는 호스트 요구 관리자(HRM, 46), 맵데이터 관리자(MM, 44), 및 상태 관리자(42)가 요청한 프로그램 요청을 메모리 장치(150)를 위한 프로그램 요청으로 변환하여 메모리 장치(150) 내 블록을 관리할 수 있다. 메모리 시스템(110, 도 1 참조)의 프로그램 혹은 쓰기 성능을 극대화하기 위해 블록 관리자(48)는 프로그램 요청을 수집하고 다중 평면 및 원샷 프로그램 작동에 대한 플래시 프로그램 요청을 메모리 인터페이스(142)으로 보낼 수 있다. 또한, 다중 채널 및 다중 방향 플래시 컨트롤러의 병렬 처리를 최대화하기 위해 여러 가지 뛰어난 플래시 프로그램 요청을 메모리 인터페이스(142)으로 전송할 수도 있다. Here, the block manager (48) can manage blocks within the memory device (150) by converting program requests requested by the host request manager (HRM, 46), the map data manager (MM, 44), and the state manager (42) into program requests for the memory device (150). In order to maximize the program or write performance of the memory system (110, see FIG. 1), the block manager (48) can collect the program requests and send flash program requests for multi-plane and one-shot program operations to the memory interface (142). In addition, multiple outstanding flash program requests can be sent to the memory interface (142) in order to maximize the parallel processing of the multi-channel and multi-directional flash controller.
한편, 블록 관리자(48)는 유효 페이지 수에 따라 플래시 블록을 관리하고 여유 블록이 필요한 경우 유효한 페이지가 없는 블록을 선택 및 지우고, 가비지 컬렉션(garbage collection)이 필요한 경우 가장 적게 유효한 페이지를 포함하고 있는 블록을 선택할 수 있다. 블록 관리자(48)가 충분한 빈 블록을 가질 수 있도록, 상태 관리자(42)는 가비지 컬렉션을 수행하여 유효 데이터를 모아 빈 블록으로 이동시키고, 이동된 유효 데이터를 포함하고 있었던 블록들을 삭제할 수 있다. 블록 관리자(48)가 상태 관리자(42)에 대해 삭제될 블록에 대한 정보를 제공하면, 상태 관리자(42)는 먼저 삭제될 블록의 모든 플래시 페이지를 확인하여 각 페이지가 유효한지 여부를 확인할 수 있다. 예를 들어, 각 페이지의 유효성을 판단하기 위해, 상태 관리자(42)는 각 페이지의 스페어(Out Of Band, OOB) 영역에 기록된 논리 주소를 식별한 뒤, 페이지의 실제 주소와 맵 관리자(44)의 조회 요청에서 얻은 논리 주소에 매핑된 실제 주소를 비교할 수 있다. 상태 관리자(42)는 각 유효한 페이지에 대해 블록 관리자(48)에 프로그램 요청을 전송하고, 프로그램 작업이 완료되면 맵 관리자(44)의 갱신을 통해 매핑 테이블이 업데이트될 수 있다.Meanwhile, the block manager (48) manages flash blocks according to the number of valid pages, and if a spare block is needed, it can select and erase a block without a valid page, and if garbage collection is needed, it can select a block containing the fewest valid pages. In order for the block manager (48) to have sufficient empty blocks, the state manager (42) can perform garbage collection to collect valid data and move it to empty blocks, and delete blocks containing the moved valid data. When the block manager (48) provides information about a block to be deleted to the state manager (42), the state manager (42) can first check all flash pages of the block to be deleted to check whether each page is valid. For example, in order to determine the validity of each page, the state manager (42) can identify a logical address recorded in a spare (Out Of Band, OOB) area of each page, and then compare the actual address of the page with the actual address mapped to the logical address obtained from the query request of the map manager (44). The state manager (42) sends a program request to the block manager (48) for each valid page, and when the program work is completed, the mapping table can be updated through an update of the map manager (44).
맵 관리자(44)는 논리적-물리적 매핑 테이블을 관리하고, 호스트 요구 관리자(HRM, 46) 및 상태 관리자(42)에 의해 생성된 조회, 업데이트 등의 요청을 처리할 수 있다. 맵 관리자(44)는 전체 매핑 테이블을 플래시 메모리에 저장하고, 메몰시 소자(144) 용량에 따라 매핑 항목을 캐시할 수도 있다. 조회 및 업데이트 요청을 처리하는 동안 맵 캐시 미스가 발생하면, 맵 관리자(44)는 메모리 인터페이스(142)에 읽기 요청을 전송하여 메모리 장치(150)에 저장된 매핑 테이블을 로드(load)할 수 있다. 맵 관리자(44)의 더티 캐시 블록 수가 특정 임계 값을 초과하면 블록 관리자(48)에 프로그램 요청을 보내서 깨끗한 캐시 블록을 만들고 더티 맵 테이블이 메모리 장치(150)에 저장될 수 있다.The map manager (44) manages the logical-physical mapping table and can process requests such as inquiry and update generated by the host request manager (HRM, 46) and the state manager (42). The map manager (44) can store the entire mapping table in flash memory and can also cache mapping items according to the capacity of the memory device (144). If a map cache miss occurs while processing the inquiry and update requests, the map manager (44) can transmit a read request to the memory interface (142) to load the mapping table stored in the memory device (150). If the number of dirty cache blocks of the map manager (44) exceeds a certain threshold value, a program request can be sent to the block manager (48) to create a clean cache block and store the dirty map table in the memory device (150).
한편, 가비지 컬렉션이 수행되는 경우, 상태 관리자(42)가 유효한 페이지를 복사하는 동안 호스트 요구 관리자(HRM, 46)는 페이지의 동일한 논리 주소에 대한 데이터의 최신 버전을 프로그래밍하고 업데이트 요청을 동시에 발행할 수 있다. 유효한 페이지의 복사가 정상적으로 완료되지 않은 상태에서 상태 관리자(42)가 맵 업데이트를 요청하면 맵 관리자(44)는 매핑 테이블 업데이트를 수행하지 않을 수도 있다. 맵 관리자(44)는 최신 맵 테이블이 여전히 이전 실제 주소를 가리키는 경우에만 맵 업데이트를 수행하여 정확성을 보장할 수 있다.Meanwhile, when garbage collection is performed, while the state manager (42) is copying a valid page, the host request manager (HRM, 46) can program the latest version of data for the same logical address of the page and issue an update request at the same time. If the state manager (42) requests a map update while the copying of the valid page is not completed normally, the map manager (44) may not perform a mapping table update. The map manager (44) can ensure accuracy by performing a map update only when the latest map table still points to the previous physical address.
실시예에 따라, 도 2에서 설명하는 블록 관리자(48), 맵 관리자(44) 혹은 상태 관리자(42) 중 적어도 하나는 하기의 도 3에서 설명하는 가비지 컬렉션 제어부(196)를 포함할 수 있다.According to an embodiment, at least one of the block manager (48), map manager (44) or state manager (42) described in FIG. 2 may include a garbage collection control unit (196) described in FIG. 3 below.
메모리 장치(150)는, 복수의 메모리 블록들을, 하나의 메모리 셀에 저장 또는 표현할 수 있는 비트의 수에 따라, 단일 레벨 셀(SLC: Single Level Cell) 메모리 블록 및 멀티 레벨 셀(MLC: Multi Level Cell) 메모리 블록 등으로 포함할 수 있다. 여기서, SLC 메모리 블록은, 하나의 메모리 셀에 1 비트 데이터를 저장하는 메모리 셀들에 의해 구현된 복수의 페이지들을 포함하며, 데이터 연산 성능이 빠르며 내구성이 높다. 그리고, MLC 메모리 블록은, 하나의 메모리 셀에 멀티 비트 데이터(예를 들면, 2 비트 또는 그 이상의 비트)를 저장하는 메모리 셀들에 의해 구현된 복수의 페이지들을 포함하며, SLC 메모리 블록보다 큰 데이터 저장 공간을 가짐, 다시 말해 고집적화할 수 있다. 특히, 메모리 장치(150)는, MLC 메모리 블록으로, 하나의 메모리 셀에 2 비트 데이터를 저장할 수 있는 메모리 셀들에 의해 구현된 복수의 페이지들을 포함하는 MLC 메모리 블록뿐만 아니라, 하나의 메모리 셀에 3 비트 데이터를 저장할 수 있는 메모리 셀들에 의해 구현된 복수의 페이지들을 포함하는 트리플 레벨 셀(TLC: Triple Level Cell) 메모리 블록, 하나의 메모리 셀에 4 비트 데이터를 저장할 수 있는 메모리 셀들에 의해 구현된 복수의 페이지들을 포함하는 쿼드러플 레벨 셀(QLC: Quadruple Level Cell) 메모리 블록, 또는 하나의 메모리 셀에 5 비트 또는 그 이상의 비트 데이터를 저장할 수 있는 메모리 셀들에 의해 구현된 복수의 페이지들을 포함하는 다중 레벨 셀(multiple level cell) 메모리 블록 등을 포함할 수 있다.The memory device (150) may include a plurality of memory blocks, such as a single-level cell (SLC) memory block and a multi-level cell (MLC) memory block, depending on the number of bits that can be stored or expressed in a single memory cell. Here, the SLC memory block includes a plurality of pages implemented by memory cells that store 1-bit data in a single memory cell, and has fast data operation performance and high durability. In addition, the MLC memory block includes a plurality of pages implemented by memory cells that store multi-bit data (e.g., 2 bits or more bits) in a single memory cell, and has a larger data storage space than the SLC memory block, in other words, can be highly integrated. In particular, the memory device (150) may include, as an MLC memory block, a triple level cell (TLC) memory block including a plurality of pages implemented by memory cells capable of storing 2-bit data in one memory cell, a quadruple level cell (QLC) memory block including a plurality of pages implemented by memory cells capable of storing 4-bit data in one memory cell, or a multiple level cell memory block including a plurality of pages implemented by memory cells capable of storing 5-bit or more bit data in one memory cell.
여기서, 본 발명의 실시 예에서는, 설명의 편의를 위해, 메모리 장치(150)가, 플래시 메모리, 예컨대 NAND 플래시 메모리 등과 같은 비휘발성 메모리 등으로 구현되는 것을 일 예로 설명하지만, 상변환 메모리(PCRAM: Phase Change Random Access Memory), 저항 메모리(RRAM(ReRAM): Resistive Random Access Memory), 강유전체 메모리(FRAM: Ferroelectrics Random Access Memory), 및 스핀 주입 자기 메모리(STT-RAM(STT-MRAM): Spin Transfer Torque Magnetic Random Access Memory) 등과 같은 메모리들 중 어느 하나의 메모리로 구현될 수도 있다.Here, in the embodiment of the present invention, for convenience of explanation, the memory device (150) is implemented as a non-volatile memory such as a flash memory, for example, a NAND flash memory, as an example, but may be implemented as any one of memories such as a phase change random access memory (PCRAM), a resistive random access memory (RRAM (ReRAM): Resistive Random Access Memory), a ferroelectric random access memory (FRAM: Ferroelectrics Random Access Memory), and a spin transfer torque magnetic random access memory (STT-RAM (STT-MRAM): Spin Transfer Torque Magnetic Random Access Memory).
도 3은 본 발명의 실시예에 따른 메모리 시스템에서 사용되는 가비지 컬렉션의 예를 설명하기 위한 도면이다.FIG. 3 is a diagram for explaining an example of garbage collection used in a memory system according to an embodiment of the present invention.
도 3을 참조하면, 가비지 컬렉션(GC)은 호스트에서 전달되는 명령 없이 메모리 시스템 스스로 수행할 수 있다. 메모리 시스템 내 컨트롤러(130)는 메모리 장치(150) 내 복수의 데이터 블록(40_1)으로부터 유저 데이터를 읽어, 컨트롤러(130) 내에 배치된 메모리(144)에 저장한 뒤, 메모리 장치(150) 내 프리블록(40_2)에 유저 데이터를 프로그램할 수 있다. 여기서, 복수의 데이터 블록(40_1)에는 더 이상 데이터를 프로그램할 수 없는 블록이 포함될 수 있다. 실시예에 따라, 메모리(144)는 컨트롤러(130)의 외부에 배치되어 컨트롤러(130)와 연동될 수도 있다.Referring to FIG. 3, garbage collection (GC) can be performed by the memory system itself without a command transmitted from the host. The controller (130) in the memory system can read user data from a plurality of data blocks (40_1) in the memory device (150), store the user data in the memory (144) arranged in the controller (130), and then program the user data in the free block (40_2) in the memory device (150). Here, the plurality of data blocks (40_1) may include blocks in which data can no longer be programmed. According to an embodiment, the memory (144) may be arranged outside the controller (130) and may be linked with the controller (130).
구체적으로, 컨트롤러(130)에 포함된 가비지 컬렉션 제어부(196)는 메모리 장치(150) 내 복수의 데이터 블록(40_1) 중 적어도 하나를 대상 블록으로 선정할 수 있다. 또한, 가비지 컬렉션 제어부(196)는 대상 블록으로 선정된 블록 내 유효한 데이터를 탐색, 추출하고, 유효한 데이터를 프리 블록(40_2)에 이동시킨다. 이때, 메모리 장치(150) 내 복수의 데이터 블록(40_1) 중 선택된 적어도 하나의 대상 블록에서 더 이상 유효하지 않다고 판단되는 데이터는 버려질 수 있다(즉, 프리 블록(40_2)으로 이동되지 않을 수 있다). 메모리 장치(150) 내 특정 블록(40_1)에 저장되어 있던 유효한 데이터를 프리 블록(40_2)으로 이동시키면, 컨트롤러(130)는 특정 블록(40_1)은 더 이상 유효한 데이터를 가지고 있다고 여기지 않는다. 이후, 특정 블록(40_1)에 새로운 데이터를 프로그램할 필요가 발생하면, 해당 블록(40_1)에 저장되어 있던 데이터를 모두 지울 수 있다(erase).Specifically, the garbage collection control unit (196) included in the controller (130) can select at least one of the plurality of data blocks (40_1) in the memory device (150) as a target block. In addition, the garbage collection control unit (196) searches for and extracts valid data in the block selected as the target block, and moves the valid data to the free block (40_2). At this time, data determined to be no longer valid in at least one target block selected from the plurality of data blocks (40_1) in the memory device (150) may be discarded (i.e., may not be moved to the free block (40_2)). If valid data stored in a specific block (40_1) in the memory device (150) is moved to the free block (40_2), the controller (130) does not consider the specific block (40_1) to have valid data any longer. Afterwards, if there is a need to program new data in a specific block (40_1), all data stored in that block (40_1) can be erased (erase).
실시예에 따라, 컨트롤러(130)는 가비지 컬렉션 중 선별된 유효한 데이터를 프리 블록(40_2)에 프로그램하기 전까지 임시 저장하기 위해 내부 메모리(144)를 사용할 수 있다.Depending on the embodiment, the controller (130) may use internal memory (144) to temporarily store valid data selected during garbage collection until it is programmed into a free block (40_2).
가비지 컬렉션을 위해서, 컨트롤러(130)는 복수의 데이터 블록(40_1)에서 유효한 데이터와 유효하지 않은 데이터를 구분해야 한다. 각각의 데이터 블록(40_1)에 대응하는 유효 페이지 카운트(VPC)에 대한 정보는 각 데이터 블록(40_1)에 유효한 데이터 혹은 유효한 페이지의 양을 가리킬 뿐 어느 데이터 혹은 어느 페이지가 유효한 지를 알려주지 못한다. 따라서, 컨트롤러(130)는 유효 페이지 수 뿐만 아니라 맵데이터를 포함한 동작 정보를 이용하여 어느 데이터 혹은 어느 페이지가 유효한 지를 판단할 필요가 있다. 이 경우, 가비지 컬렉션을 위해 프리 블록(40_2)에 저장할 데이터를 용이하게 구분할 수 있어 가비지 컬렉션을 위해 소요되는 자원(예, 시간, 전력)을 줄일 수 있다.For garbage collection, the controller (130) must distinguish between valid data and invalid data in multiple data blocks (40_1). Information about the valid page count (VPC) corresponding to each data block (40_1) only indicates the amount of valid data or valid pages in each data block (40_1) and does not indicate which data or which page is valid. Therefore, the controller (130) needs to determine which data or which page is valid using operation information including map data as well as the number of valid pages. In this case, data to be stored in the free block (40_2) for garbage collection can be easily distinguished, thereby reducing resources (e.g., time and power) required for garbage collection.
메모리 장치(150) 내 복수의 블록(40_1, 40_2)은 대용량의 데이터(large volume data)를 저장할 수 있다. 실시예에 따라, 컨트롤러(130)는 대용량의 데이터를 저장하는 복수의 블록(40_1, 40_2)을 보다 효율적으로 제어하고 관리하기 위해, 각각의 블록을 복수의 단위 블록으로 구분할 수 있다. 하나의 블록을 복수의 단위 블록으로 구분하면, 컨트롤러(130)는 각 단위 블록마다 맵 데이터(예, L2P table, P2L table)를 생성할 수 있다.A plurality of blocks (40_1, 40_2) in a memory device (150) can store large volume data. According to an embodiment, the controller (130) can divide each block into a plurality of unit blocks to more efficiently control and manage the plurality of blocks (40_1, 40_2) storing large volume data. When one block is divided into a plurality of unit blocks, the controller (130) can generate map data (e.g., L2P table, P2L table) for each unit block.
실시예에 따라, 하나의 블록을 몇 개의 단위 블록으로 구분할 지가 달라질 수 있다. 예를 들면, 메모리 장치(150)의 구조, 맵 데이터의 크기, 맵 데이터의 위치 등에 의해 하나의 블록을 몇 개의 단위 블록으로 구분하는 것이 결정될 수 있다. 메모리 장치(150) 내 각각의 블록은 복수의 페이지 단위로 데이터를 프로그램할 수 있다. 이때, 각 블록의 단위셀의 구조에 따라 각 페이지에 저장될 수 있는 데이터의 크기가 달라질 수 있다. 맵 데이터가 비트맵 형식으로 작성되는 경우, 맵 데이터의 크기 단위의 1배 혹은 수배에 대응하는 영역을 단위 블록의 크기로 결정할 수 있다.Depending on the embodiment, the number of unit blocks into which one block is divided may vary. For example, the number of unit blocks into which one block is divided may be determined based on the structure of the memory device (150), the size of the map data, the location of the map data, etc. Each block in the memory device (150) may program data in units of multiple pages. At this time, the size of data that can be stored in each page may vary depending on the structure of the unit cell of each block. When the map data is written in a bitmap format, an area corresponding to one or several times the size of the map data may be determined as the size of the unit block.
데이터 블록(40_1)에는 첫 페이지부터 마지막 페이지까지 순차적으로 데이터가 프로그램될 수 있다. 해당 블록의 마지막 페이지에 데이터가 프로그램되면, 해당 블록은 새로운 데이터를 프로그램할 수 있는 오픈(open) 상태에서 새로운 데이터를 더 이상 프로그램할 수 없는 클로즈(close) 상태가 된다. 실시예에 따라, 데이터 블록(40_1) 중 특정 블록이 클로즈(close) 상태가 되면, 가비지 컬렉션 제어부(196)는 해당 블록 내 단위 블록에 저장된 데이터에 대응하는 맵데이터의 수와 유효 페이지 수를 비교하여 해당 블록에 저장된 데이터의 유효성을 판단할 수 있다.In the data block (40_1), data can be programmed sequentially from the first page to the last page. When data is programmed on the last page of the block, the block changes from an open state in which new data can be programmed to a closed state in which new data can no longer be programmed. According to an embodiment, when a specific block among the data blocks (40_1) is in a closed state, the garbage collection control unit (196) can compare the number of map data corresponding to the data stored in the unit block within the block with the number of valid pages to determine the validity of the data stored in the block.
구체적으로, 메모리 장치 내 데이터 블록(40_1)이 삭제 동작(erase operation) 없이 데이터를 더 이상 데이터를 기록할 수 없는 상태(클로즈 상태)가 되면, 컨트롤러(130)는 유효 페이지 수와 복수의 단위 블록의 맵데이터 총합을 비교할 수 있다. 만약 특정 블록에서 유효 페이지 수와 맵데이터의 총합이 일치하지 않는 경우, 해당 블록에는 불필요한 맵데이터가 포함되어 있다고 추정할 수 있다. 컨트롤러(130)는 해당 블록에 저장된 데이터에 대응하는 맵데이터가 유효한 지를 검사할 수 있다. 만약 더 이상 유효하지 않은 맵데이터가 존재한다면, 컨트롤러(130)는 유효하지 않은 맵데이터를 삭제하거나 무효화시켜 맵데이터를 갱신할 수 있다.Specifically, when a data block (40_1) in a memory device becomes a state (closed state) in which data can no longer be recorded without an erase operation, the controller (130) can compare the number of valid pages with the sum total of map data of a plurality of unit blocks. If the number of valid pages and the sum total of map data in a specific block do not match, it can be assumed that unnecessary map data is included in the block. The controller (130) can check whether map data corresponding to data stored in the block is valid. If map data that is no longer valid exists, the controller (130) can update the map data by deleting or invalidating the invalid map data.
실시예에 따라, 가비지 컬렉션 제어부(196)는 특정 블록 내 복수의 단위 블록의 맵데이터 총합을 해당 블록의 페이지 수로 나눈 비율을 바탕으로, 해당 블록을 가비지 컬렉션의 대상 블록으로 지정할 지를 결정할 수 있다. 여기서 블록의 페이지 수는 메모리 장치(150)의 설계와 제조 과정에서 결정된 고정된 값으로, 하나의 블록에 저장 가능한 최대 유효 데이터의 양을 나타낼 수 있다. 특정 블록을 복수의 단위 블록으로 구분하고 각 단위 블록마다 맵데이터를 생성하는 경우, 해당 블록 내 복수의 단위 블록의 맵데이터의 총합은 해당 블록에 현재 유효한 데이터의 양을 나타낼 수 있다. 따라서, 하나의 블록 내 복수의 단위 블록의 맵데이터 총합을 해당 블록의 페이지 수로 나눈 비율을 바탕으로, 가비지 컬렉션 제어부(196)는 각 블록에 유효 데이터의 양을 인지할 수 있다. 전술한 비율이 낮을수록, 가비지 컬렉션 제어부(196)는 해당 블록을 가비지 컬렉션의 대상 블록으로 우선 지정할 수 있다. 또한, 전술한 비율이 기 설정된 범위에 속하는 가를 통해, 가비지 컬렉션 제어부(196)는 가비지 컬렉션의 대상 블록으로의 선정 여부를 결정할 수 있다.According to an embodiment, the garbage collection control unit (196) may determine whether to designate a block as a target block for garbage collection based on a ratio of the sum of map data of multiple unit blocks within a specific block divided by the number of pages of the block. Here, the number of pages of the block is a fixed value determined during the design and manufacturing process of the memory device (150), and may represent the maximum amount of valid data that can be stored in one block. When a specific block is divided into multiple unit blocks and map data is generated for each unit block, the sum of the map data of multiple unit blocks within the block may represent the amount of currently valid data in the block. Accordingly, the garbage collection control unit (196) may recognize the amount of valid data in each block based on a ratio of the sum of map data of multiple unit blocks within a specific block divided by the number of pages of the block. The lower the ratio described above, the more the garbage collection control unit (196) may preferentially designate the block as a target block for garbage collection. In addition, the garbage collection control unit (196) can determine whether to select a block as a target block for garbage collection based on whether the aforementioned ratio falls within a preset range.
전술한 실시예는 가비지 컬렉션을 위해서, 컨트롤러(130)는 복수의 데이터 블록(40_1)에서 유효한 데이터를 탐색해야 한다. 이때, 컨트롤러(30)는 메모리 장치(150) 내 모든 데이터 블록(40_1)에 대해 유효 데이터를 탐색하는 것이 아니라, 데이터 블록(40_1)의 기 설정된 범위에 한정하여 유효 데이터를 탐색할 수 있다. 이 경우, 가비지 컬렉션을 위해 프리 블록(40_2)에 저장할 데이터를 탐색하는 데 소요되는 자원(예, 시간, 전력)을 줄일 수 있다.In the above-described embodiment, for garbage collection, the controller (130) must search for valid data in a plurality of data blocks (40_1). At this time, the controller (30) may search for valid data not for all data blocks (40_1) in the memory device (150), but may search for valid data limited to a preset range of the data blocks (40_1). In this case, resources (e.g., time, power) required to search for data to be stored in a free block (40_2) for garbage collection can be reduced.
유효 페이지의 탐색은 가비지 컬렉션(GC: Garbage Collection) 동작에 관한 것으로, 가비지 컬렉션을 수행할 블록을 탐색하는 장치와 방법을 통하여 가비지 컬렉션의 시간을 관리하기 위한 것이다. 가비지 컬렉션은 동적 할당된 메모리 영역 가운데 더 이상 사용할 수 없게 되거나 사용할 필요가 없어진 영역을 탐색하여 해당 영역 내 데이터를 삭제하여 새로운 데이터를 프로그램 할 수 있도록 준비하는 동작을 포함한다. 비휘발성 메모리 장치 내 특정 영역에 포함된 데이터를 삭제하는 데 소요되는 시간은 비휘발성 메모리 장치의 셀 구조 혹은 셀 특성 등에 따라 달라질 수 있다. 반면, 비휘발성 메모리 장치 내 삭제(erase)할 영역을 탐색하는데 소요되는 시간은 다양한 실시예에 따른 비휘발성 메모리 장치를 제어하는 방법과 장치에 따라 달라질 수 있다.The search for a valid page is related to a garbage collection (GC) operation, and is intended to manage the time of garbage collection through a device and method for searching for a block on which garbage collection is to be performed. Garbage collection includes an operation of searching for an area among dynamically allocated memory areas that can no longer be used or that no longer needs to be used, deleting data in the area, and preparing to program new data. The time required to delete data included in a specific area in a nonvolatile memory device may vary depending on the cell structure or cell characteristics of the nonvolatile memory device. On the other hand, the time required to search for an area to be erased in a nonvolatile memory device may vary depending on a method and device for controlling the nonvolatile memory device according to various embodiments.
도 4는 본 발명의 실시예에 따른 메모리 시스템에서 사용되는 슈퍼 메모리 블록의 개념을 설명하기 위해 도시한 도면이다.FIG. 4 is a diagram illustrating the concept of a super memory block used in a memory system according to an embodiment of the present invention.
도 4를 참조하면, 도 1을 참조하여 본 발명의 실시예에 따른 메모리 시스템(110)의 구성요소 중 메모리 장치(150)에 포함된 구성요소가 구체적으로 도시된 것을 알 수 있다.Referring to FIG. 4, it can be seen that components included in the memory device (150) among the components of the memory system (110) according to the embodiment of the present invention with reference to FIG. 1 are specifically illustrated.
메모리 장치(150)는, 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)을 포함한다.The memory device (150) includes a plurality of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N).
또한, 메모리 장치(150)는, 제0 채널(CH0)을 통해 데이터를 입/출력할 수 있는 첫 번째 메모리 다이(DIE0)과 제1 채널(CH1)을 통해 데이터를 입/출력할 수 있는 두 번째 메모리 다이(DIE1)을 포함한다. 이때, 제0 채널(CH0)과 제1 채널(CH1)은, 인터리빙(interleaving) 방식으로 데이터를 입/출력할 수 있다.In addition, the memory device (150) includes a first memory die (DIE0) capable of inputting/outputting data through a 0th channel (CH0) and a second memory die (DIE1) capable of inputting/outputting data through a first channel (CH1). At this time, the 0th channel (CH0) and the first channel (CH1) can input/output data in an interleaving manner.
또한, 첫 번째 메모리 다이(DIE0)는, 제0 채널(CH0)을 공유하여 인터리빙 방식으로 데이터를 입/출력할 수 있는 다수의 경로(WAY0, WAY1)들에 각각 대응하는 다수의 플래인(PLANE00, PLANE01)들을 포함한다.Additionally, the first memory die (DIE0) includes a plurality of planes (PLANE00, PLANE01) each corresponding to a plurality of paths (WAY0, WAY1) that can input/output data in an interleaved manner by sharing the zeroth channel (CH0).
또한, 두 번째 메모리 다이(DIE1)는, 제1 채널(CH1)을 공유하여 인터리빙 방식으로 데이터를 입/출력할 수 있는 다수의 경로(WAY2, WAY3)들에 각각 대응하는 다수의 플래인(PLANE10, PLANE11)들을 포함한다.Additionally, the second memory die (DIE1) includes a plurality of planes (PLANE10, PLANE11) each corresponding to a plurality of paths (WAY2, WAY3) that can input/output data in an interleaved manner by sharing the first channel (CH1).
또한, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)은, 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) 중 예정된 개수의 메모리 블록(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N)을 포함한다.Additionally, the first plane (PLANE00) of the first memory die (DIE0) includes a predetermined number of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N).
또한, 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)은, 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) 중 예정된 개수의 메모리 블록(BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N)을 포함한다.Additionally, the second plane (PLANE01) of the first memory die (DIE0) includes a predetermined number of memory blocks (BLOCK010, BLOCK011, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N).
또한, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)은, 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)중 예정된 개수의 메모리 블록(BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N)을 포함한다.Additionally, the first plane (PLANE10) of the second memory die (DIE1) includes a predetermined number of memory blocks (BLOCK100, BLOCK101, BLOCK102, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N).
또한, 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)은, 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) 중 예정된 개수의 메모리 블록(BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)을 포함한다.Additionally, the second plane (PLANE11) of the second memory die (DIE1) includes a predetermined number of memory blocks (BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) among a plurality of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N).
이와 같이. 메모리 장치(150)에 포함된 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)은, 같은 경로 또는 같은 채널을 사용하는 것과 같은 '물리적인 위치'에 따라 구분될 수 있다.In this way, a plurality of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) included in the memory device (150) can be distinguished according to their 'physical locations', such as using the same path or the same channel.
참고로, 도 4에서는 메모리 장치(150)에 2개의 메모리 다이(DIE0, DIE1)가 포함되고, 각각의 메모리 다이(DIE0, DIE1)마다 2개의 플래인(PLANE00, PLANE01 / PLANE10, PLANE11)이 포함되며, 각각의 플래인(PLANE00, PLANE01 / PLANE10, PLANE11)마다 예정된 개수의 메모리 블록(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N / BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N / BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N / BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)이 포함되는 것으로 예시되어 있는데, 이는 어디까지나 하나의 실시예일 뿐이다. 실제로는, 설계자의 선택에 따라 메모리 장치(150)에 2개보다 더 많거나 더 적은 개수의 메모리 다이가 포함될 수 있고, 각각의 메모리 다이에도 2개보다 더 많거나 더 적은 개수의 플래인이 포함될 수 있다. 물론, 각각의 플래인에 포함되는 메모리 블록의 개수인 '예정된 개수'도 설계자의 선택에 따라 얼마든지 조정가능하다.For reference, in FIG. 4, it is exemplified that a memory device (150) includes two memory dies (DIE0, DIE1), each memory die (DIE0, DIE1) includes two planes (PLANE00, PLANE01 / PLANE10, PLANE11), and each plane (PLANE00, PLANE01 / PLANE10, PLANE11) includes a predetermined number of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N / BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N / BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N / BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N). However, this is only one embodiment. In reality, the memory device (150) may include more or fewer memory dies than two, depending on the designer's choice, and each memory die may include more or fewer planes than two. Of course, the 'intended number', which is the number of memory blocks included in each plane, may also be adjusted as much as the designer chooses.
한편, 메모리 장치(150)에 포함된 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)을 다수의 메모리 다이(DIE0, DIE1) 또는 다수의 플래인(PLANE00, PLANE01 / PLANE10, PLANE11)과 같은 '물리적인 위치'로 구분하는 방식과는 별개로 컨트롤러(130)는, 다수의 메모리 블록들 중 동시에 선택되어 동작하는 것을 기준으로 구분하는 방식을 사용할 수 있다. 즉, 컨트롤러(130)는, '물리적인 위치'의 구분방식을 통해 서로 다른 다이 또는 서로 다른 플래인으로 구분되었던 다수의 메모리 블록들을 동시에 선택 가능한 블록들끼리 그룹화하여 슈퍼 메모리 블록(super memory block)들로 구분하여 관리할 수 있다. 이때, '동시에 선택'이라는 것은 '병렬적인 선택'을 의미할 수 있다.Meanwhile, separately from the method of dividing a plurality of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) included in the memory device (150) into 'physical locations' such as a plurality of memory dies (DIE0, DIE1) or a plurality of planes (PLANE00, PLANE01 / PLANE10, PLANE11), the controller (130) may use a method of dividing based on which of the plurality of memory blocks are selected and operated at the same time. That is, the controller (130) can manage multiple memory blocks, which were previously divided into different dies or different planes through the method of distinguishing 'physical locations', by grouping them into blocks that can be selected simultaneously and distinguishing them into super memory blocks. In this case, 'simultaneous selection' can mean 'parallel selection'.
이렇게, 컨트롤러(130)에서 다수의 메모리 블록들(BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N)을 슈퍼 메모리 블록들로 구분하여 관리하는 방식은, 설계자의 선택에 따라 여러 가지 방식이 존재할 수 있는데, 여기에서는 세 가지 방식을 예시하도록 하겠다.In this way, there are various ways to manage a plurality of memory blocks (BLOCK000, BLOCK001, BLOCK002, ..., BLCOK00N, BLOCK010, BLOCK011, BLOCK012, ..., BLCOK01N, BLOCK100, BLOCK101, BLOCK102, ..., BLCOK10N, BLOCK110, BLOCK111, BLOCK112, ..., BLCOK11N) by dividing them into super memory blocks in the controller (130), and three methods will be exemplified here.
첫 번째 방식은, 컨트롤러(130)에서 메모리 장치(150)에 포함된 다수의 메모리 다이들(DIE0, DIE1) 중 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)에서 임의의 하나의 메모리 블록(BLOCK000)과, 두 번째 플래인(PLANE01)에서 임의의 하나의 메모리 블록(BLOCK010)을 그룹화하여 하나의 슈퍼 메모리 블록(A1)으로 관리하는 방식이다. 첫 번째 방식을 메모리 장치(150)에 포함된 다수의 메모리 다이들(DIE0, DIE1) 중 두 번째 메모리 다이(DIE1)에 적용하면, 컨트롤러(130)는, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)에서 임의의 하나의 메모리 블록(BLOCK100)과, 두 번째 플래인(PLANE11)에서 임의의 하나의 메모리 블록(BLOCK110)을 그룹화하여 하나의 슈퍼 메모리 블록(A2)으로 관리할 수 있다.The first method is a method in which the controller (130) groups any one memory block (BLOCK000) in the first plane (PLANE00) of the first memory die (DIE0) among the plurality of memory dies (DIE0, DIE1) included in the memory device (150) and manages them as one super memory block (A1). When the first method is applied to the second memory die (DIE1) among the plurality of memory dies (DIE0, DIE1) included in the memory device (150), the controller (130) can group any one memory block (BLOCK100) in the first plane (PLANE10) of the second memory die (DIE1) and manage them as one super memory block (A2).
두 번째 방식은, 컨트롤러(130)에서 메모리 장치(150)에 포함된 다수의 메모리 다이들(DIE0, DIE1) 중 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)에 포함된 임의의 하나의 메모리 블록(BLOCK002)과, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)에 포함된 임의의 하나의 메모리 블록(BLOCK102)를 그룹화하여 하나의 슈퍼 메모리 블록(B1)으로 관리하는 방식이다. 두 번째 방식을 다시 적용하면, 컨트롤러(130)는, 메모리 장치(150)에 포함된 다수의 메모리 다이들(DIE0, DIE1) 중 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)에 포함된 임의의 하나의 메모리 블록(BLOCK012)과, 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)에 포함된 임의의 하나의 메모리 블록(BLOCK112)를 그룹화하여 하나의 슈퍼 메모리 블록(B2)으로 관리할 수 있다.The second method is a method in which a controller (130) groups any one memory block (BLOCK002) included in a first plane (PLANE00) of a first memory die (DIE0) among a plurality of memory dies (DIE0, DIE1) included in a memory device (150) and any one memory block (BLOCK102) included in a first plane (PLANE10) of a second memory die (DIE1) and manages them as a single super memory block (B1). Applying the second method again, the controller (130) can group any one memory block (BLOCK012) included in the second plane (PLANE01) of the first memory die (DIE0) among the multiple memory dies (DIE0, DIE1) included in the memory device (150) and any one memory block (BLOCK112) included in the second plane (PLANE11) of the second memory die (DIE1) and manage them as one super memory block (B2).
세 번째 방식은, 컨트롤러(130)에서 메모리 장치(150)에 포함된 다수의 메모리 다이들(DIE0, DIE1) 중 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)에 포함된 임의의 하나의 메모리 블록(BLOCK001)과, 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)에 포함된 임의의 하나의 메모리 블록(BLOCK011)과, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)에 포함된 임의의 하나의 메모리 블록(BLOCK101), 및 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)에 포함된 임의의 하나의 메모리 블록(BLOCK111)을 그룹화하여 하나의 슈퍼 메모리 블록(C)으로 관리하는 방식이다.The third method is a method in which a controller (130) groups any one memory block (BLOCK001) included in a first plane (PLANE00) of a first memory die (DIE0) among a plurality of memory dies (DIE0, DIE1) included in a memory device (150), any one memory block (BLOCK011) included in a second plane (PLANE01) of the first memory die (DIE0), any one memory block (BLOCK101) included in a first plane (PLANE10) of the second memory die (DIE1), and any one memory block (BLOCK111) included in a second plane (PLANE11) of the second memory die (DIE1) and manages them as a single super memory block (C).
참고로, 슈퍼 메모리 블록에 포함되는 동시에 선택 가능한 메모리 블록들은, 인터리빙 방식, 예컨대, 채널 인터리빙(channel interleaving) 방식 또는 메모리 다이 인터리빙(memory die interleaving) 방식 또는 메모리 칩 인터리빙(memory chip interleaving) 방식 또는 경로 인터리빙(way interleaving) 방식 등을 통해 실질적으로 동시에 선택될 수 있다.For reference, simultaneously selectable memory blocks included in a super memory block can be substantially simultaneously selected through an interleaving method, such as a channel interleaving method, a memory die interleaving method, a memory chip interleaving method, or a way interleaving method.
<제1 실시예><Example 1>
도 5a 및 도 5b는 본 발명의 제1 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 설명하는 도면이다.FIGS. 5A and 5B are diagrams illustrating garbage collection for a super memory block in a memory system according to the first embodiment of the present invention.
먼저, 도 5a 및 도 5b에 도시된 본 발명의 제1 실시예에서는 앞선 도 4에서 설명한 컨트롤러(130)에서 슈퍼 메모리 블록들을 구분하는 방식 중 세 번째 방식을 사용하는 것을 알 수 있다.First, it can be seen that in the first embodiment of the present invention illustrated in FIGS. 5a and 5b, the third method among the methods of distinguishing super memory blocks in the controller (130) described in FIG. 4 above is used.
즉, 도 5a 및 도 5b에서는 컨트롤러(130)가 메모리 장치(150)에 포함된 4개의 플래인들(PLANE<00, 01, 10, 11>) 각각에서 임의의 하나의 메모리 블록을 선택하여 하나의 슈퍼 메모리 블록(SUPER BLOCK<0> or SUPER BLOCK<1>)으로 관리한다. 따라서, 하나의 슈퍼 메모리 블록(SUPER BLOCK<0> or SUPER BLOCK<1>)에는 4개의 메모리 블록이 포함된다.That is, in FIGS. 5A and 5B, the controller (130) selects one random memory block from each of the four planes (PLANE<00, 01, 10, 11>) included in the memory device (150) and manages it as one super memory block (SUPER BLOCK<0> or SUPER BLOCK<1>). Accordingly, one super memory block (SUPER BLOCK<0> or SUPER BLOCK<1>) includes four memory blocks.
예컨대, 도 4 및 도 5a를 참조하면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)과, 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)의 첫 번째 메모리 블록(BLOCK010)과, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)의 첫 번째 메모리 블록(BLOCK100), 및 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)의 첫 번째 메모리 블록(BLOCK110)을 그룹화한 것이다.For example, referring to FIGS. 4 and 5a, a first super memory block (SUPER BLOCK<0>) groups a first memory block (BLOCK000) of a first plane (PLANE00) of a first memory die (DIE0), a first memory block (BLOCK010) of a second plane (PLANE01) of the first memory die (DIE0), a first memory block (BLOCK100) of a first plane (PLANE10) of a second memory die (DIE1), and a first memory block (BLOCK110) of a second plane (PLANE11) of the second memory die (DIE1).
그리고, 도 4 및 도 5b를 참조하면, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)과, 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)의 두 번째 메모리 블록(BLOCK011)과, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)의 두 번째 메모리 블록(BLOCK101), 및 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)의 두 번째 메모리 블록(BLOCK111)을 그룹화한 것이다.And, referring to FIG. 4 and FIG. 5b, the second super memory block (SUPER BLOCK<1>) groups the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0), the second memory block (BLOCK011) of the second plane (PLANE01) of the first memory die (DIE0), the second memory block (BLOCK101) of the first plane (PLANE10) of the second memory die (DIE1), and the second memory block (BLOCK111) of the second plane (PLANE11) of the second memory die (DIE1).
그리고, 도 5a 및 도 5b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각은 내부에 포함된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>)을 병렬로 선택하여 각각 페이지 단위의 데이터를 입/출력할 수 있다.And, each of the super memory blocks (SUPER BLOCK<0, 1>) exemplified through FIGS. 5a and 5b can select four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) contained therein in parallel and input/output data in page units, respectively.
여기서, 도 5a 및 도 5b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각은 내부에 포함된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>)을 병렬로 선택할 때, 서로 동일한 위치의 페이지들에 대해서만 병렬리드가 가능하다고 가정할 수 있다.Here, it can be assumed that when each of the super memory blocks (SUPER BLOCK<0, 1>) illustrated through FIGS. 5a and 5b selects four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) contained therein in parallel, parallel reading is possible only for pages at the same location.
예컨대, 도 5a를 통해 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>)을 병렬로 선택한다는 것은, 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 각각에서 위치가 동일한 페이지를 선택하는 것을 의미한다. 즉, 도 5a를 통해 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 각각의 첫 번째 페이지(P<0>)를 동시에 선택하거나 또는 각각의 두 번째 페이지(P<1>)를 동시에 선택하는 것을 의미한다. 이는, 도 5a에서 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 중 첫 번째 및 두 번째 메모리 블록들(BLOCK<000, 010>)에서는 첫 번째 페이지(P<0>)를 선택하고 세 번째 및 네 번째 메모리 블록들(BLOCK<100, 110>)에서는 두 번째 페이지(P<1>)를 선택하는 것과 같이 서로 다른 위치의 페이지를 동시에 선택하는 것이 불가능하다는 것을 의미한다.For example, selecting four memory blocks (BLOCK<000, 010, 100, 110>) included therein in parallel from the first super memory block (SUPER BLOCK<0>) exemplified through FIG. 5a means selecting pages having the same location in each of the four memory blocks (BLOCK<000, 010, 100, 110>). That is, it means simultaneously selecting the first page (P<0>) of each of the four memory blocks (BLOCK<000, 010, 100, 110>) included therein from the first super memory block (SUPER BLOCK<0>) exemplified through FIG. 5a or simultaneously selecting the second page (P<1>) of each of them. This means that it is impossible to simultaneously select pages in different locations, such as selecting the first page (P<0>) in the first and second memory blocks (BLOCK<000, 010>) among the four memory blocks (BLOCK<000, 010, 100, 110>) included in the first super memory block (SUPER BLOCK<0>) as illustrated in Fig. 5a, and selecting the second page (P<1>) in the third and fourth memory blocks (BLOCK<100, 110>).
마찬가지로, 도 5b를 통해 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>)을 병렬로 선택한다는 것은, 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>) 각각에서 위치가 동일한 페이지를 동시에 선택하는 것을 의미한다. 즉, 도 5b를 통해 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>) 각각의 세 번째 페이지(P<2>)를 동시에 선택하거나 또는 각각의 네 번째 페이지(P<3>)를 동시에 선택하는 것을 의미한다. 이는, 도 5b에서 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>) 중 첫 번째 및 두 번째 메모리 블록들(BLOCK<001, 011>)에서는 세 번째 페이지(P<2>)를 선택하고 세 번째 및 네 번째 메모리 블록들(BLOCK<101, 111>)에서는 네 번째 페이지(P<3>)를 선택하는 것과 같이 서로 다른 위치의 페이지를 동시에 선택하는 것이 불가능하다는 것을 의미한다.Similarly, selecting four memory blocks (BLOCK<001, 011, 101, 111>) included therein in parallel from the second super memory block (SUPER BLOCK<1>) exemplified through FIG. 5b means selecting pages having the same location in each of the four memory blocks (BLOCK<001, 011, 101, 111>) at the same time. That is, it means simultaneously selecting the third page (P<2>) of each of the four memory blocks (BLOCK<001, 011, 101, 111>) included therein from the second super memory block (SUPER BLOCK<1>) exemplified through FIG. 5b or simultaneously selecting the fourth page (P<3>) of each of them. This means that it is impossible to simultaneously select pages in different locations, such as selecting the third page (P<2>) in the first and second memory blocks (BLOCK<001, 011>) among the four memory blocks (BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) as illustrated in Fig. 5b, and selecting the fourth page (P<3>) in the third and fourth memory blocks (BLOCK<101, 111>).
한편, 도 5a 및 도 5b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각은 내부에 포함된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) 각각에 포함된 다수의 페이지들(P<0, 1, 2,...>) 각각은, 독립적으로 유효 페이지(VAILD PAGE) 또는 무효 페이지(INVALID PAGE)가 될 수 있다.Meanwhile, each of the super memory blocks (SUPER BLOCK<0, 1>) exemplified through FIGS. 5a and 5b includes four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) contained therein, and each of the multiple pages (P<0, 1, 2,...>) contained therein can independently become a valid page (VAILD PAGE) or an invalid page (INVALID PAGE).
예컨대, 도 5a에 예시된 것과 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 내지 세 번째 메모리 블록(BLOCK<000, 010, 100>) 각각의 첫 번째 페이지(P<0>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)일 수 있다.For example, as illustrated in Fig. 5a, in the first super memory block (SUPER BLOCK<0>), only the first page (P<0>) of each of the first to third memory blocks (BLOCK<000, 010, 100>) may be a valid page (VAILD PAGE), and all remaining pages may be invalid pages (INVALID PAGE).
또한, 도 5b에 예시된 것과 같이 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK011)의 세 번째 페이지(P<2>), 및 네 번째 메모리 블록(BLOCK111)의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)일 수 있다.In addition, as illustrated in FIG. 5b, in the second super memory block (SUPER BLOCK<1>), only the first page (P<0>) of the first memory block (BLOCK001), the third page (P<2>) of the second memory block (BLOCK011), and the second page (P<1>) of the fourth memory block (BLOCK111) may be valid pages (VAILD PAGE), and all remaining pages may be invalid pages (INVALID PAGE).
이렇게, 도 5a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)과 도 5b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 각각 3개의 유효 페이지를 포함하는 상태라는 것을 알 수 있다.In this way, it can be seen that the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 5a and the second super memory block (SUPER BLOCK<1>) illustrated in Fig. 5b each contain three valid pages.
또한, 가비지 컬렉션을 위해 도 5a 및 도 5b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각에 포함된 4개씩의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>, MEMORY BLOCK<001, 011, 101, 111>)을 각각 희생블록(victim block)으로 선택할 수 있다.Additionally, for garbage collection, four memory blocks (MEMORY BLOCK<000, 010, 100, 110>, MEMORY BLOCK<001, 011, 101, 111>) included in each of the super memory blocks (SUPER BLOCK<0, 1>) illustrated in FIGS. 5a and 5b can be selected as victim blocks.
이렇게, 가비지 컬렉션을 위해 도 5a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하였을 때, 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>)에 포함된 3개의 유효 페이지로부터 데이터를 추출하는데 필요한 시간을 첫 번째 소요시간(TOTAL<0>)이라고 할 수 있다. 또한, 가비지 컬렉션을 위해 도 5b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하였을 때, 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>)에 포함된 3개의 유효 페이지로부터 데이터를 추출하는데 필요한 시간을 두 번째 소요시간(TOTAL<1>)이라고 할 수 있다.In this way, when the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 5a is selected as a sacrifice block for garbage collection, the time required to extract data from three valid pages included in the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included therein can be referred to as the first time required (TOTAL<0>). In addition, when the second super memory block (SUPER BLOCK<1>) illustrated in Fig. 5b is selected as a sacrifice block for garbage collection, the time required to extract data from three valid pages included in the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included therein can be referred to as the second time required (TOTAL<1>).
이때, 첫 번재 소요시간(TOTAL<0>)과 두 번째 소요시간(TOTAL<1>)은 다음과 같은 이유로 인해 크게 차이날 수 있다.At this time, the first time required (TOTAL<0>) and the second time required (TOTAL<1>) may differ significantly for the following reasons:
구체적으로, 가비지 컬렉션에서 도 5a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하여 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>)에 포함된 3개의 유효 페이지로부터 데이터를 추출하기 위해 3개의 유효 페이지의 위치를 확인할 수 있다.Specifically, in the garbage collection, the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 5a is selected as a victim block, and the locations of three valid pages included in the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included therein can be identified to extract data from the three valid pages.
확인결과, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 내지 세 번째 메모리 블록(BLOCK<000, 010, 100>) 각각의 첫 번째 페이지(P<0>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.As a result of the verification, it can be seen that in the first super memory block (SUPER BLOCK<0>), only the first page (P<0>) of each of the first to third memory blocks (BLOCK<000, 010, 100>) is a valid page (VAILD PAGE), and all remaining pages are invalid pages (INVALID PAGE).
확인결과에 따라, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 3개의 유효 페이지(VAILD PAGE)는 그 위치가 서로 동일한 것을 알 수 있다. 즉, 3개의 유효 페이지(VAILD PAGE)로부터 3개의 유효 데이터를 추출하기 위해서 한 번의 리드(P<0>_READ)를 수행해야 한다는 것을 알 수 있다.According to the verification result, we can see that the three valid pages (VAILD PAGE) included in the first super memory block (SUPER BLOCK<0>) have the same location. In other words, we can see that one read (P<0>_READ) must be performed to extract three valid data from three valid pages (VAILD PAGE).
따라서, 컨트롤러(130)는, 제0 시점(t0)에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 메모리 블록(BLOCK<000, 010, 100, 110>) 각각의 첫 번째 페이지(P<0>)에 대한 한 번의 리드(P<0>_READ)를 수행한다. 한 번의 리드(P<0>_READ)를 통해 4개의 페이지 데이터(B000P0_VD, B010P0_VD, B100P0_VD, B110P0_IVD)를 4개의 페이지 버퍼들(PB<000, 010, 100, 110>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제1 시점(t1)에서 페이지 버퍼들(PB<000, 010, 100, 110>)에 캐싱된 4개의 페이지 데이터들(B000P0_VD, B010P0_VD, B100P0_VD, B110P0_IVD) 중 세 개의 유효 데이터(VALID DATA : B000P0_VD, B010P0_VD, B100P0_VD)만 선택하여 내부의 메모리(144)로 전송(DATA TRANSFER)한다. 물론, 컨트롤러(130)는, 제0 시점(t0)에서 페이지 버퍼들(PB<000, 010, 100, 110>)에 캐싱된 4개의 페이지 데이터들(B000P0_VD, B010P0_VD, B100P0_VD, B110P0_IVD) 중 1개의 무효 데이터(INVALID DATA : B110P0_IVD)는, 제1 시점(t1)에서 내부의 메모리(144)로 전송하지 않고 폐기(discard)한다.Therefore, the controller (130) performs one read (P<0>_READ) on the first page (P<0>) of each of the four memory blocks (BLOCK<000, 010, 100, 110>) included in the first super memory block (SUPER BLOCK<0>) at time 0 (t0). Through one read (P<0>_READ), four page data (B000P0_VD, B010P0_VD, B100P0_VD, B110P0_IVD) are cached in four page buffers (PB<000, 010, 100, 110>). Next, the controller (130) selects only three valid data (VALID DATA: B000P0_VD, B010P0_VD, B100P0_VD, B110P0_IVD) among four page data (B000P0_VD, B010P0_VD, B100P0_VD) cached in the page buffers (PB<000, 010, 100, 110>) at the first time point (t1) and transfers (DATA TRANSFER) them to the internal memory (144). Of course, the controller (130) discards one invalid data (INVALID DATA: B110P0_IVD) among the four page data (B000P0_VD, B010P0_VD, B100P0_VD, B110P0_IVD) cached in the page buffers (PB<000, 010, 100, 110>) at the first time point (t1) without transmitting it to the internal memory (144).
이렇게, 컨트롤러(130)는, 한 번의 리드(P<0>_READ)를 통해, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 3개의 유효 페이지(VAILD PAGE : BLOCK000_P<0>, BLOCK010_P<0>, BLOCK110_P<0>)에 저장된 3개의 유효 데이터(VALID DATA : B000P0_VD, B010P0_VD, B100P0_VD)를 모두 추출할 수 있다.In this way, the controller (130) can extract all three valid data (VALID DATA: B000P0_VD, B010P0_VD, B100P0_VD) stored in three valid pages (VAILD PAGE: BLOCK000_P<0>, BLOCK010_P<0>, BLOCK110_P<0>) included in the first super memory block (SUPER BLOCK<0>) through one read (P<0>_READ).
여기서, 한 번의 리드(P<0>_READ)를 수행하는데 필요한 시간을 리드시간(tREAD)이라고 가정할 수 있다. 또한, 1개의 페이지 버퍼(PB<000> or PB<010> or PB<100>)에 저장된 1개의 페이지 데이터(B000P0_VD or B010P0_VD or B100P0_VD)를 내부의 메모리(144)로 전송하는데 필요한 시간을 전송시간(tTX)라고 가정할 수 있다. 이렇게 가정할 경우, 가비지 컬렉션에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 첫 번째 소요시간(TOTAL<0>)은, '{리드시간(tREAD) * 1} + {전송시간(tTX) * 3}'이 될 것이다. 예를 들어, 리드시간(tREAD)이 50us이고, 전송시간(tTX)이 10us라고 가정하면, 가비지 컬렉션에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 첫 번째 소요시간(TOTAL<0>)은, 80us가 될 것이다.Here, the time required to perform one read (P<0>_READ) can be assumed as the read time (tREAD). In addition, the time required to transfer one page data (B000P0_VD or B010P0_VD or B100P0_VD) stored in one page buffer (PB<000> or PB<010> or PB<100>) to the internal memory (144) can be assumed as the transfer time (tTX). In this assumption, the first required time (TOTAL<0>) required to extract data by selecting the first super memory block (SUPER BLOCK<0>) as a victim block in garbage collection will be '{read time (tREAD) * 1} + {transfer time (tTX) * 3}'. For example, assuming that the read time (tREAD) is 50us and the transfer time (tTX) is 10us, the first time required to extract data by selecting the first super memory block (SUPER BLOCK<0>) as a victim block in garbage collection (TOTAL<0>) will be 80us.
그리고, 가비지 컬렉션에서 도 5b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하여 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>)에 포함된 3개의 유효 페이지로부터 데이터를 추출하기 위해 3개의 유효 페이지의 위치를 확인할 수 있다.And, in the garbage collection, the second super memory block (SUPER BLOCK<1>) illustrated in Fig. 5b can be selected as a victim block to check the locations of three valid pages included in the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included therein in order to extract data from the three valid pages.
확인결과, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK011)의 세 번째 페이지(P<2>), 및 네 번째 메모리 블록(BLOCK111)의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.As a result of the verification, it can be seen that in the second super memory block (SUPER BLOCK<1>), only the first page (P<0>) of the first memory block (BLOCK001), the third page (P<2>) of the second memory block (BLOCK011), and the second page (P<1>) of the fourth memory block (BLOCK111) are valid pages (VAILD PAGE), and all remaining pages are invalid pages (INVALID PAGE).
확인결과에 따라, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 3개의 유효 페이지(VAILD PAGE)는 서로간에 그 위치가 동일하지 않은 것을 알 수 있다. 즉, 3개의 유효 페이지(VAILD PAGE)로부터 3개의 유효 데이터를 추출하기 위해서 세 번의 리드(P<0>_READ, P<1>_READ, P<2>_READ)를 수행해야 한다는 것을 알 수 있다. According to the verification result, we can see that the three valid pages (VAILD PAGE) included in the second super memory block (SUPER BLOCK<1>) do not have the same locations as each other. That is, we can see that three reads (P<0>_READ, P<1>_READ, P<2>_READ) must be performed to extract three valid data from the three valid pages (VAILD PAGE).
따라서, 컨트롤러(130)는, 제0 시점(t0)에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록(BLOCK<001, 011, 101, 111>) 각각의 첫 번째 페이지(P<0>)에 대한 첫 번째 리드(P<0>_READ)를 수행한다. 첫 번째 리드(P<0>_READ)를 통해 4개의 페이지 데이터(B001P0_VD, B011P0_IVD, B101P0_IVD, B111P0_IVD)를 4개의 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제1 시점(t1)에서 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P0_VD, B011P0_IVD, B101P0_IVD, B111P0_IVD) 중 1개의 유효 데이터(VALID DATA : B001P0_VD)만 선택하여 내부의 메모리(144)로 전송(DATA TRANSFER)한다. 물론, 컨트롤러(130)는, 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P0_VD, B011P0_IVD, B101P0_IVD, B111P0_IVD) 중 3개의 무효 데이터(INVALID DATA : B011P0_IVD, B101P0_IVD, B111P0_IVD)는, 내부의 메모리(144)로 전송하지 않고 폐기(discard)한다.Accordingly, the controller (130) performs a first read (P<0>_READ) on the first page (P<0>) of each of the four memory blocks (BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) at time 0 (t0). Through the first read (P<0>_READ), four page data (B001P0_VD, B011P0_IVD, B101P0_IVD, B111P0_IVD) are cached in four page buffers (PB<001, 011, 101, 111>). Next, the controller (130) selects only one valid data (VALID DATA: B001P0_VD) among four page data (B001P0_VD, B011P0_IVD, B101P0_IVD, B111P0_IVD) cached in the page buffers (PB<001, 011, 101, 111>) at a first time point (t1) and transfers (DATA TRANSFER) the selected valid data to the internal memory (144). Of course, the controller (130) discards three invalid data (INVALID DATA: B011P0_IVD, B101P0_IVD, B111P0_IVD) among the four page data (B001P0_VD, B011P0_IVD, B101P0_IVD, B111P0_IVD) cached in the page buffers (PB<001, 011, 101, 111>) without transmitting them to the internal memory (144).
이렇게, 컨트롤러(130)는, 첫 번째 리드(P<0>_READ)를 통해, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 1개의 유효 페이지(VAILD PAGE : BLOCK001_P<0>)에 저장된 1개의 유효 데이터(VALID DATA : B001P0_VD)를 추출할 수 있다.In this way, the controller (130) can extract one valid data (VALID DATA: B001P0_VD) stored in one valid page (VAILD PAGE: BLOCK001_P<0>) included in the second super memory block (SUPER BLOCK<1>) through the first read (P<0>_READ).
이어서, 컨트롤러(130)는, 제2 시점(t2)에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록(BLOCK<001, 011, 101, 111>) 각각의 두 번째 페이지(P<1>)에 대한 두 번째 리드(P<1>_READ)를 수행한다. 두 번째 리드(P<1>_READ)를 통해 4개의 페이지 데이터(B001P1_IVD, B011P1_IVD, B101P1_IVD, B111P1_VD)를 4개의 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제3 시점(t3)에서 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P1_IVD, B011P1_IVD, B101P1_IVD, B111P1_VD) 중 1개의 유효 데이터(VALID DATA : B111P1_VD)만 선택하여 내부의 메모리(144)로 전송(DATA TRANSFER)한다. 물론, 컨트롤러(130)는, 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P1_IVD, B011P1_IVD, B101P1_IVD, B111P1_VD) 중 3개의 무효 데이터(INVALID DATA : B001P1_IVD, B011P1_IVD, B101P1_IVD)는, 내부의 메모리(144)로 전송하지 않고 폐기(discard)한다.Next, the controller (130) performs a second read (P<1>_READ) on the second page (P<1>) of each of the four memory blocks (BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) at a second time point (t2). Through the second read (P<1>_READ), four page data (B001P1_IVD, B011P1_IVD, B101P1_IVD, B111P1_VD) are cached in four page buffers (PB<001, 011, 101, 111>). Next, the controller (130) selects only one valid data (VALID DATA: B111P1_VD) among four page data (B001P1_IVD, B011P1_IVD, B101P1_IVD, B111P1_VD) cached in the page buffers (PB<001, 011, 101, 111>) at a third time point (t3) and transfers (DATA TRANSFER) it to the internal memory (144). Of course, the controller (130) discards three invalid data (INVALID DATA: B001P1_IVD, B011P1_IVD, B101P1_IVD, B111P1_VD) among the four page data (B001P1_IVD, B011P1_IVD, B101P1_IVD) cached in the page buffers (PB<001, 011, 101, 111>) without transmitting them to the internal memory (144).
이렇게, 컨트롤러(130)는, 두 번째 리드(P<1>_READ)를 통해, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 1개의 유효 페이지(VAILD PAGE : BLOCK111_P<1>)에 저장된 1개의 유효 데이터(VALID DATA : B111P1_VD)를 추출할 수 있다.In this way, the controller (130) can extract one valid data (VALID DATA: B111P1_VD) stored in one valid page (VAILD PAGE: BLOCK111_P<1>) included in the second super memory block (SUPER BLOCK<1>) through the second read (P<1>_READ).
이어서, 컨트롤러(130)는, 제4 시점(t4)에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록(BLOCK<001, 011, 101, 111>) 각각의 세 번째 페이지(P<2>)에 대한 세 번째 리드(P<2>_READ)를 수행한다. 세 번째 리드(P<2>_READ)를 통해 4개의 페이지 데이터(B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD)를 4개의 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제5 시점(t5)에서 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) 중 1개의 유효 데이터(VALID DATA : B011P2_VD)만 선택하여 내부의 메모리(144)로 전송(DATA TRANSFER)한다. 물론, 컨트롤러(130)는, 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) 중 3개의 무효 데이터(INVALID DATA : B001P2_IVD, B101P2_IVD, B111P2_IVD)는, 내부의 메모리(144)로 전송하지 않고 폐기(discard)한다.Next, the controller (130) performs a third read (P<2>_READ) on the third page (P<2>) of each of the four memory blocks (BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) at a fourth time point (t4). Through the third read (P<2>_READ), four page data (B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) are cached in four page buffers (PB<001, 011, 101, 111>). Next, the controller (130) selects only one valid data (VALID DATA: B011P2_VD) among four page data (B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) cached in the page buffers (PB<001, 011, 101, 111>) at the fifth time point (t5) and transfers (DATA TRANSFER) it to the internal memory (144). Of course, the controller (130) discards three invalid data (INVALID DATA: B001P2_IVD, B101P2_IVD, B111P2_IVD) among the four page data (B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) cached in the page buffers (PB<001, 011, 101, 111>) without transmitting them to the internal memory (144).
이렇게, 컨트롤러(130)는, 세 번째 리드(P<2>_READ)를 통해, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 1개의 유효 페이지(VAILD PAGE : BLOCK011_P<2>)에 저장된 1개의 유효 데이터(VALID DATA : B011P2_VD)를 추출할 수 있다.In this way, the controller (130) can extract one valid data (VALID DATA: B011P2_VD) stored in one valid page (VAILD PAGE: BLOCK011_P<2>) included in the second super memory block (SUPER BLOCK<1>) through the third read (P<2>_READ).
정리하면, 컨트롤러(130)는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 3개의 유효 페이지(VAILD PAGE : BLOCK001_P<0>, BLOCK011_P<2>, BLOCK111_P<1>)에 저장된 3개의 유효 데이터(VALID DATA : B001P0_VD, B011P2_VD, B111P1_VD)를 모두 추출하기 위해 세 번의 리드(P<0>_READ, P<1>_READ, P<2>_READ)가 필요한 것을 알 수 있다.In summary, it can be seen that the controller (130) requires three reads (P<0>_READ, P<1>_READ, P<2>_READ) to extract all three valid data (VALID DATA: B001P0_VD, B011P2_VD, B111P1_VD) stored in three valid pages (VAILD PAGE: BLOCK001_P<0>, BLOCK011_P<2>, BLOCK111_P<1>) included in the second super memory block (SUPER BLOCK<1>).
여기서, 한 번의 리드(P<0>_READ or P<1>_READ or P<2>_READ)를 수행하는데 필요한 시간을 리드시간(tREAD)이라고 가정할 수 있다. 또한, 1개의 페이지 버퍼(PB<001> or PB<011> or PB<111>)에 저장된 1개의 페이지 데이터(B001P0_VD or B011P2_VD or B111P1_VD)를 내부의 메모리(144)로 전송하는데 필요한 시간을 전송시간(tTX)라고 가정할 수 있다. 이렇게 가정할 경우, 가비지 컬렉션에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 소요시간(TOTAL<1>)은, '{리드시간(tREAD) * 3} + {전송시간(tTX) * 3}'이 될 것이다. 예를 들어, 리드시간(tREAD)이 50us이고, 전송시간(tTX)이 10us라고 가정하면, 가비지 컬렉션에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 두 번째 소요시간(TOTAL<1>)은, 180us가 될 것이다.Here, the time required to perform one read (P<0>_READ or P<1>_READ or P<2>_READ) can be assumed as the read time (tREAD). In addition, the time required to transfer one page data (B001P0_VD or B011P2_VD or B111P1_VD) stored in one page buffer (PB<001> or PB<011> or PB<111>) to the internal memory (144) can be assumed as the transfer time (tTX). In this case, the time required to extract data by selecting the second super memory block (SUPER BLOCK<1>) as a victim block in garbage collection (TOTAL<1>) will be '{Read time (tREAD) * 3} + {Transfer time (tTX) * 3}'. For example, assuming that the read time (tREAD) is 50us and the transfer time (tTX) is 10us, the second time required to extract data by selecting the second super memory block (SUPER BLOCK<1>) as a victim block in garbage collection (TOTAL<1>) will be 180us.
정리하면, 도 5a에 예시된 것과 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)과 도 5b에 예시된 것과 같이 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 각각 3개의 유효 페이지를 포함하므로, 유효 페이지의 개수를 기준으로 가비지 컬렉션을 위한 희생블록을 선택하는 방식하는 경우에는 동일한 조건인 것을 알 수 있다.In summary, as illustrated in Fig. 5a, the first super memory block (SUPER BLOCK<0>) and as illustrated in Fig. 5b, the second super memory block (SUPER BLOCK<1>), each contain three valid pages, so it can be seen that the same conditions apply when selecting a victim block for garbage collection based on the number of valid pages.
하지만, 가비지 컬렉션을 위해 도 5a 및 도 5b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각을 희생블록으로 선택하는 경우, 도 5a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)으로부터 데이터를 추출하는데 필요한 첫 번째 소요시간(TOTAL<0>)은 80us인 반면, 도 5b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)으로부터 데이터를 추출하는데 필요한 두 번째 소요시간(TOTAL<1>)은 180us로서 두 배 이상의 차이가 나는 것을 알 수 있다.However, when each of the super memory blocks (SUPER BLOCK<0, 1>) illustrated in FIGS. 5a and 5b is selected as a sacrifice block for garbage collection, the first time required (TOTAL<0>) to extract data from the first super memory block (SUPER BLOCK<0>) illustrated in FIG. 5a is 80us, whereas the second time required (TOTAL<1>) to extract data from the second super memory block (SUPER BLOCK<1>) illustrated in FIG. 5b is 180us, which is more than twice the difference.
즉, 컨트롤러(130)는, 가비지 컬렉션을 효과적으로 수행하기 위해서 도 5a 및 도 5b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 중 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하는 것이 바람직하다.That is, in order to effectively perform garbage collection, it is desirable for the controller (130) to select the first super memory block (SUPER BLOCK<0>) among the super memory blocks (SUPER BLOCK<0, 1>) illustrated in FIGS. 5a and 5b as a sacrifice block.
도 6은 도 5a 및 도 5b를 통해 설명된 본 발명의 제1 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 수행할 때, 희생블록을 선택하는 동작을 설명하기 위해 도시한 도면이다.FIG. 6 is a diagram illustrating an operation of selecting a victim block when performing garbage collection on a super memory block in a memory system according to the first embodiment of the present invention described through FIGS. 5a and 5b.
도 6을 참조하면, 본 발명의 제1 실시예에 따른 메모리 시스템(110)은, 컨트롤러(130) 및 메모리 장치(150)를 포함한다.Referring to FIG. 6, a memory system (110) according to the first embodiment of the present invention includes a controller (130) and a memory device (150).
그리고, 컨트롤러(130)는, 가비지 컬렉션 제어부(196), 및 메모리(144)를 포함할 수 있다. 여기서, 가비지 컬렉션 제어부(196)의 일반적인 동작은 전술한 도 3을 통해 설명하였으므로, 여기에서는 더 자세히 설명하지 않도록 하겠다.And, the controller (130) may include a garbage collection control unit (196) and a memory (144). Here, the general operation of the garbage collection control unit (196) has been described through the aforementioned FIG. 3, so it will not be described in more detail here.
그리고, 도 4를 통해 설명한 바와 같이 메모리 장치(150)는, 다수의 메모리 블록들(MEMORY BLOCK<000, 001,...>)을 포함한다. 또한, 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 병렬리드가 가능한 N개의 메모리 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:N>)로 관리한다. 이때, N은 2이상의 자연수이며, 도 5a 및 도 5b에서는 N이 4인 것을 가정하고 있다. 여기에서는, 도 5a 및 도 5b를 통해 설명된 두 개의 슈퍼 메모리 블록(SUPER BLOCK<0, 1>)과 함께 프리(free) 상태인 하나의 슈퍼 메모리 블록(SUPER BLOCK<2>)이 메모리 장치(150)에 포함된 것을 가정한다. 물론, 도 6에 예시된 사항은 어디까지나 설명의 편의를 위해 간략화된 것이며, 실제는 얼마든지 다른 형태(더 많은 개수의 슈퍼 메모리 블록이 메모리 장치에 포함되는 것과 같은 형태)로 확장될 수 있다.And, as described through FIG. 4, the memory device (150) includes a plurality of memory blocks (MEMORY BLOCK<000, 001,...>). In addition, the controller (130) groups N memory blocks capable of parallel reading among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) according to set conditions and manages them as a plurality of super memory blocks (SUPER BLOCK<0:N>). At this time, N is a natural number greater than or equal to 2, and it is assumed in FIGS. 5A and 5B that N is 4. Here, it is assumed that one super memory block (SUPER BLOCK<2>) in a free state is included in the memory device (150) together with two super memory blocks (SUPER BLOCK<0, 1>) described through FIGS. 5A and 5B. Of course, the details exemplified in Fig. 6 are simplified for convenience of explanation, and in reality, they can be expanded into other forms (such as a form in which a greater number of super memory blocks are included in a memory device).
구체적으로, 컨트롤러(130)는, 내부에 포함된 가비지 컬렉션 제어부(196)를 통해 가비지 컬렉션을 위해 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>)로부터 유효 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들(PRE_TOTAL<0, 1>)을 생성하고, 생성된 소요예측시간들(PRE_TOTAL<0, 1>)을 소요예측시간 테이블(600)로서 관리한다.Specifically, the controller (130) generates required predicted times (PRE_TOTAL<0, 1>) by predicting the time required for extracting valid data from memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) for garbage collection by superblock unit through the garbage collection control unit (196) included therein, and manages the generated required predicted times (PRE_TOTAL<0, 1>) as a required predicted time table (600).
또한, 컨트롤러(130)는, 가비지 컬렉션 제어부(196)를 통해 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 각각의 유효 페이지 개수들(VPC<0:1>)을 슈퍼블록단위로 카운팅하고, 카운팅된 유효 페이지 개수들(VPC<0:1>)을 유효 페이지 개수 테이블(610)로서 관리한다.In addition, the controller (130) counts the number of valid pages (VPC<0:1>) of each memory block (MEMORY BLOCK<000, 001,...>) included in the memory device (150) in superblock units through the garbage collection control unit (196), and manages the counted number of valid pages (VPC<0:1>) as a valid page count table (610).
좀 더 구체적으로, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>)에서, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각에 그룹화된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) 중 위치가 동일한 유효 페이지의 개수(DP_CNT<0:1>)를 뺀 개수에 리드예측시간(PRE_tREAD)를 곱하여 제1 시간(FIRST_TIME<0:1>)을 계산(FIRST_TIME<0:1> = (VPC<0:1> - DP_CNT<0:1>) * PRE_tREAD)한다.More specifically, the controller (130) calculates the first time (FIRST_TIME<0:1>) by multiplying the number obtained by subtracting the number of valid pages (DP_CNT<0:1>) having the same location among four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) grouped in each of the multiple super memory blocks (SUPER BLOCK<0:1>) from the number of valid pages (VPC<0:1>) of each of the multiple super memory blocks (SUPER BLOCK<0:1>) by the read prediction time (PRE_tREAD). (FIRST_TIME<0:1> = (VPC<0:1> - DP_CNT<0:1>) * PRE_tREAD)
또한, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>)에 전송예측시간(PRE_tTX)을 곱한 제2 시간(SECOND_TIME<0:1>)을 계산(SECOND_TIME<0:1> = VPC<0:1> * PRE_tTX)한다.In addition, the controller (130) calculates a second time (SECOND_TIME<0:1>) by multiplying the number of valid pages (VPC<0:1>) of each of a plurality of super memory blocks (SUPER BLOCK<0:1>) by the predicted transmission time (PRE_tTX) (SECOND_TIME<0:1> = VPC<0:1> * PRE_tTX).
또한, 컨트롤러(130)는, 제1 시간(FIRST_TIME<0:1>)과 제2 시간(SECOND_TIME<0:1>)을 더한 값을 계산(TOTAL<0:1> = FIRST_TIME<0:1> + SECOND_TIME<0:1>)하여 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 소요예측시간들(PRE_TOTAL<0, 1>)으로서 생성한다.In addition, the controller (130) calculates a value that adds the first time (FIRST_TIME<0:1>) and the second time (SECOND_TIME<0:1>) (TOTAL<0:1> = FIRST_TIME<0:1> + SECOND_TIME<0:1>) and generates the predicted required times (PRE_TOTAL<0, 1>) for each of a plurality of super memory blocks (SUPER BLOCK<0:1>).
예를 들어 설명하기 위해 도 6과 함께 도 5a를 함께 참조하면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 내지 세 번째 메모리 블록(BLOCK<000, 010, 100>) 각각의 첫 번째 페이지(P<0>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.Referring to FIG. 5a together with FIG. 6 for example to explain, it can be seen that in the first super memory block (SUPER BLOCK<0>), only the first page (P<0>) of each of the first to third memory blocks (BLOCK<000, 010, 100>) is a valid page (VAILD PAGE), and all the remaining pages are invalid pages (INVALID PAGE).
따라서, 컨트롤러(130)는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 첫 번째 유효 페이지 개수(VPC<0>)가 3인 것을 알 수 있다Therefore, the controller (130) can know that the number of first valid pages (VPC<0>) included in the first super memory block (SUPER BLOCK<0>) is 3.
또한, 컨트롤러(130)는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 3개의 유효 페이지가 모두 첫 번째 페이지(P<0>)로서, 위치가 동일한 첫 번째 유효 페이지 개수(DP_CNT<0>)가 2인 것을 알 수 있다. 여기서, 첫 번째 유효 페이지(BLOCK000/P<0>)를 기준으로 할 때, 두 번째 및 세 번째 유효 페이지(BLOCK010/P<0>, BLOCK100/P<0>)는 첫 번째 유효 페이지(BLOCK000/P<0>)와 동일한 위치이다. 따라서, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에서 위치가 동일한 유효 페이지에는 두 번째 및 세 번째 유효 페이지(BLOCK010/P<0>, BLOCK100/P<0>)가 포함되고, 이를 통해 첫 번째 유효 페이지 개수(DP_CNT<0>)는 2가 된다.In addition, the controller (130) can know that all three valid pages included in the first super memory block (SUPER BLOCK<0>) are the first page (P<0>), and the number of first valid pages (DP_CNT<0>) having the same location is 2. Here, based on the first valid page (BLOCK000/P<0>), the second and third valid pages (BLOCK010/P<0>, BLOCK100/P<0>) are in the same location as the first valid page (BLOCK000/P<0>). Therefore, the second and third valid pages (BLOCK010/P<0>, BLOCK100/P<0>) are included in the valid pages having the same location in the first super memory block (SUPER BLOCK<0>), and through this, the number of first valid pages (DP_CNT<0>) becomes 2.
따라서, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 제1 시간(FIRST_TIME<0>)은, '(3 ?? 2) * PRE_tREAD'와 같은 계산을 통해 한 번의 리드예측시간(PRE_tREAD)에 대응하는 시간이 된다. 또한, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 제2 시간(SECOND_TIME<0>)은, '3 * PRE_tTX'와 같은 계산을 통해 세 번의 전송예측시간(PRE_tTX)에 대응하는 시간이 된다. 결론적으로, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)은, 한 번의 리드예측시간(PRE_tREAD)에 대응하는 첫 번째 제1 시간(FIRST_TIME<0>)과 세 번의 전송예측시간(PRE_tTX)에 대응하는 첫 번째 제2 시간(SECOND_TIME<0>)을 더한 시간이 된다.Therefore, the first first time (FIRST_TIME<0>) corresponding to the first super memory block (SUPER BLOCK<0>) becomes the time corresponding to one read prediction time (PRE_tREAD) through calculation such as '(3 ?? 2) * PRE_tREAD'. In addition, the first second time (SECOND_TIME<0>) corresponding to the first super memory block (SUPER BLOCK<0>) becomes the time corresponding to three transmission prediction times (PRE_tTX) through calculation such as '3 * PRE_tTX'. In conclusion, the first predicted time (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) is the sum of the first first time (FIRST_TIME<0>) corresponding to one read predicted time (PRE_tREAD) and the first second time (SECOND_TIME<0>) corresponding to three transmission predicted times (PRE_tTX).
예컨대, 리드예측시간(PRE_tREAD)이 50us라고 가정하고, 전송예측시간(PRE_tTX)이 10us라고 가정하면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)은, 50us의 첫 번째 제1 시간(FIRST_TIME<0>)과 30us의 첫 번째 제2 시간(SECOND_TIME<0>)을 더한 80us가 될 것이다.For example, assuming that the read prediction time (PRE_tREAD) is 50us and the transmission prediction time (PRE_tTX) is 10us, the first predicted time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) will be 80us, which is the sum of the first first time (FIRST_TIME<0>) of 50us and the first second time (SECOND_TIME<0>) of 30us.
마찬가지로, 예를 들어 설명하기 위해 도 6과 함께 도 5b를 함께 참조하면, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK011)의 세 번째 페이지(P<2>), 및 네 번째 메모리 블록(BLOCK111)의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.Similarly, referring to FIG. 5b together with FIG. 6 for illustration purposes, it can be seen that in the second super memory block (SUPER BLOCK<1>), only the first page (P<0>) of the first memory block (BLOCK001), the third page (P<2>) of the second memory block (BLOCK011), and the second page (P<1>) of the fourth memory block (BLOCK111) are valid pages (VAILD PAGE), and all the remaining pages are invalid pages (INVALID PAGE).
따라서, 컨트롤러(130)는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 두 번째 유효 페이지 개수(VPC<1>)가 3인 것을 알 수 있다.Accordingly, the controller (130) can know that the number of second valid pages (VPC<1>) included in the second super memory block (SUPER BLOCK<1>) is 3.
또한, 컨트롤러(130)는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 3개의 유효 페이지 각각의 위치가 서로 다른 상태로서, 위치가 동일한 두 번째 유효 페이지 개수(DP_CNT<1>)가 0인 것을 알 수 있다. 여기서, 첫 번째 유효 페이지(BLOCK001/P<0>)를 기준으로 할 때, 두 번째 유효 페이지(BLOCK011/P<3>)와 세 번째 유효 페이지(BLOCK111/P<0>)는 각각 첫 번째 유효 페이지(BLOCK000/P<0>)와 다른 위치이다. 또한, 두 번째 유효 페이지(BLOCK011/P<3>)와 세 번째 유효 페이지(BLOCK111/P<0>)도 서로 다른 위치이다. 따라서, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에서 위치가 동일한 유효 페이지는 존재하지 않으며, 이를 통해 두 번째 유효 페이지 개수(DP_CNT<1>)는 0이 된다.In addition, the controller (130) can know that the positions of each of the three valid pages included in the second super memory block (SUPER BLOCK<1>) are different, and thus the number of second valid pages (DP_CNT<1>) having the same position is 0. Here, with the first valid page (BLOCK001/P<0>) as a standard, the second valid page (BLOCK011/P<3>) and the third valid page (BLOCK111/P<0>) are each in different positions from the first valid page (BLOCK000/P<0>). In addition, the second valid page (BLOCK011/P<3>) and the third valid page (BLOCK111/P<0>) are also in different positions. Therefore, there is no valid page in the second super memory block (SUPER BLOCK<1>) having the same position, and thus the number of second valid pages (DP_CNT<1>) becomes 0.
따라서, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 제1 시간(FIRST_TIME<1>)은, '(3 ?? 0) * PRE_tREAD'와 같은 계산을 통해 세 번의 리드예측시간(PRE_tREAD)에 대응하는 시간이 된다. 또한, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 제2 시간(SECOND_TIME<1>)은, '3 * PRE_tTX'와 같은 계산을 통해 세 번의 전송예측시간(PRE_tTX)에 대응하는 시간이 된다. 결론적으로, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)은, 세 번의 리드예측시간(PRE_tREAD)에 대응하는 두 번째 제1 시간(FIRST_TIME<1>)과 세 번의 전송예측시간(PRE_tTX)에 대응하는 두 번째 제2 시간(SECOND_TIME<1>)을 더한 시간이 된다.Therefore, the second first time (FIRST_TIME<1>) corresponding to the second super memory block (SUPER BLOCK<1>) becomes the time corresponding to three read prediction times (PRE_tREAD) through calculations such as '(3 ?? 0) * PRE_tREAD'. In addition, the second second time (SECOND_TIME<1>) corresponding to the second super memory block (SUPER BLOCK<1>) becomes the time corresponding to three transmission prediction times (PRE_tTX) through calculations such as '3 * PRE_tTX'. In conclusion, the second estimated time (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) is the sum of the second first time (FIRST_TIME<1>) corresponding to three read estimated times (PRE_tREAD) and the second second time (SECOND_TIME<1>) corresponding to three transmission estimated times (PRE_tTX).
예컨대, 리드예측시간(PRE_tREAD)이 50us라고 가정하고, 전송예측시간이 10us라고 가정하면, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)은, 150us의 두 번째 제1 시간(FIRST_TIME<1>)과 30us의 두 번째 제2 시간(SECOND_TIME<1>)을 더한 180us가 될 것이다.For example, assuming that the read prediction time (PRE_tREAD) is 50us and the transmission prediction time is 10us, the second predicted time required (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) will be 180us, which is the sum of the second first time (FIRST_TIME<1>) of 150us and the second second time (SECOND_TIME<1>) of 30us.
참고로, 컨트롤러(130)는, 메모리 장치(150)에 대한 리드예측시간(PRE_tREAD)과 전송예측시간(PRE_tTX)에 대한 정보를 설정하고 있을 수 있다. 즉, 설계자는 메모리 장치(150)의 종류나 상태에 따라 테스트를 통해 메모리 장치(150)에 대한 리드예측시간(PRE_tREAD)과 전송예측시간(PRE_tTX)을 미리 설정할 수 있다.For reference, the controller (130) may set information on the read prediction time (PRE_tREAD) and the transmission prediction time (PRE_tTX) for the memory device (150). That is, the designer may set the read prediction time (PRE_tREAD) and the transmission prediction time (PRE_tTX) for the memory device (150) in advance through a test depending on the type or state of the memory device (150).
전술한 바와 같이, 컨트롤러(130)는, 가비지 컬렉션을 수행하기 이전에 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각에 대한 소요예측시간(PRE_TOTAL<0, 1>)을 예측연산할 수 있다.As described above, the controller (130) can predict the expected time required (PRE_TOTAL<0, 1>) for each of a plurality of super memory blocks (SUPER BLOCK<0:1>) before performing garbage collection.
그리고, 컨트롤러(130)는, 내부에 포함된 가지비 컬렉션 제어부(196)를 통해 소요예측시간 테이블(600)에 포함된 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>)에 대한 소요예측시간들(PRE_TOTAL<0, 1>)을 참조하여 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 어떤 메모리 블록을 가비지 컬렉션을 위해 희생블록으로 선택할지 결정할 수 있다.And, the controller (130) can refer to the estimated times (PRE_TOTAL<0, 1>) for a plurality of super memory blocks (SUPER BLOCK<0:1>) included in the estimated time table (600) through the garbage collection control unit (196) included therein to determine which memory block among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) to select as a sacrifice block for garbage collection.
이때, 컨트롤러(130)는, 소요예측시간 테이블(600)에 포함된 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>)에 대한 소요예측시간들(PRE_TOTAL<0, 1>)을 참조하는 방식에는 다음과 같은 두 가지 방식이 있을 수 있으며, 어느 하나의 방식을 선택할 수 있다.At this time, the controller (130) may refer to the required predicted times (PRE_TOTAL<0, 1>) for a number of super memory blocks (SUPER BLOCK<0:1>) included in the required predicted time table (600) in the following two ways, and may select one of the two ways.
첫 번째 방식은, 컨트롤러(130)에서 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>)에 대한 소요예측시간들(PRE_TOTAL<0, 1>) 중 상대적으로 가장 작은 값의 소요예측시간에 대응하는 슈퍼 메모리 블록에 그룹화된 N개의 메모리 블록들 중 적어도 하나 이상의 유효 페이지를 포함하는 메모리 블록을 희생블록으로 선택하는 방식이다.The first method is a method in which a controller (130) selects a memory block including at least one valid page among N memory blocks grouped in a super memory block corresponding to a relatively smallest value of the required predicted time (PRE_TOTAL<0, 1>) among a plurality of super memory blocks (SUPER BLOCK<0:1>) as a victim block.
예컨대, 전술한 설명에서와 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 소요예측시간(PRE_TOTAL<0>)은 80us이고, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대한 소요예측시간(PRE_TOTAL<1>)은 180us이므로, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 소요예측시간(PRE_TOTAL<0>)이 더 작다. 따라서, 컨트롤러(130)는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 그룹화된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>) 중 적어도 하나 이상의 유효 페이지를 포함하는 3개의 메모리 블록들(MEMORY BLOCK<000, 010, 100>)을 희생블록으로 선택한다.For example, as described above, the expected time required (PRE_TOTAL<0>) for the first super memory block (SUPER BLOCK<0>) is 80us, and the expected time required (PRE_TOTAL<1>) for the second super memory block (SUPER BLOCK<1>) is 180us, so the expected time required (PRE_TOTAL<0>) for the first super memory block (SUPER BLOCK<0>) is smaller. Accordingly, the controller (130) selects three memory blocks (MEMORY BLOCK<000, 010, 100, 110>) that include at least one valid page among the four memory blocks (MEMORY BLOCK<000, 010, 100>) grouped in the first super memory block (SUPER BLOCK<0>) as victim blocks.
이렇게, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 3개의 메모리 블록들(MEMORY BLOCK<000, 010, 100>)이 희생블록으로 선택되었기 때문에, 가비지 컬렉션이 수행되는 구간에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 3개의 유효 페이지는 컨트롤러(130) 내부의 메모리(144)로 전달되었다가, 타겟블록(target block)인 세 번째 슈퍼 메모리 블록(SUPER BLOCK<2>)에 저장될 것이다.In this way, since the three memory blocks (MEMORY BLOCK<000, 010, 100>) included in the first super memory block (SUPER BLOCK<0>) are selected as victim blocks, in the section where garbage collection is performed, the three valid pages included in the first super memory block (SUPER BLOCK<0>) will be transferred to the memory (144) within the controller (130) and then stored in the third super memory block (SUPER BLOCK<2>), which is the target block.
두 번째 방식은, 전술한 첫 번째 방식을 사용하기 전에 컨트롤러(130)에서 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각에 포함된 N개의 메모리 블록들 각각의 유효 페이지 개수를 모두 합친 개수(VPC<0:1>)가 '설정된 개수' 이하인 슈퍼 메모리 블록의 개수를 확인하는 방식이다. 즉, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>) 중 '설정된 개수' 이하인 슈퍼 메모리 블록이 '한 개'인 경우, 전술한 첫 번째 방식을 사용하지 않는다. 반면, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>) 중 '설정된 개수' 이하인 슈퍼 메모리 블록이 '적어도 두 개 이상'인 경우, 전술한 첫 번째 방식을 사용한다.The second method is a method in which, before using the first method described above, the controller (130) checks the number of super memory blocks whose combined number of valid pages (VPC<0:1>) of each of the N memory blocks included in each of the plurality of super memory blocks (SUPER BLOCK<0:1>) is less than or equal to a 'set number'. That is, the controller (130) does not use the first method described above if there is 'one' super memory block less than or equal to the 'set number' among the valid number of pages (VPC<0:1>) of each of the plurality of super memory blocks (SUPER BLOCK<0:1>). On the other hand, the controller (130) uses the first method described above if there are 'at least two' super memory blocks less than or equal to the 'set number' among the valid number of pages (VPC<0:1>) of each of the plurality of super memory blocks (SUPER BLOCK<0:1>).
예컨대, 전술한 설명에서와 다르게 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)의 유효 페이지 개수(VPC<0>)가 5이고, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)의 유효 페이지 개수(VPC<1>)가 1일 수 있다. 또한, 컨트롤러(130)는, '설정된 개수'를 2로 설정할 수 있다. 이와 같은 경우, 컨트롤러(130)는, 한 개의 슈퍼 메모리 블록, 즉, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)이 '설정된 개수'이하의 유효 페이지 개수를 갖는다는 것을 확인할 수 있다. 따라서, 컨트롤러(130)는, 전술한 첫 번째 방식을 사용하지 않고, '설정된 개수'이하의 유효 페이지 개수를 갖는 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 N개의 메모리 블록들 중 적어도 하나 이상의 유효 페이지를 포함하는 메모리 블록을 희생블록으로 선택한다.For example, unlike in the above-described description, the number of valid pages (VPC<0>) of the first super memory block (SUPER BLOCK<0>) may be 5, and the number of valid pages (VPC<1>) of the second super memory block (SUPER BLOCK<1>) may be 1. In addition, the controller (130) may set the 'set number' to 2. In this case, the controller (130) may confirm that one super memory block, that is, the second super memory block (SUPER BLOCK<1>), has a number of valid pages less than or equal to the 'set number'. Therefore, the controller (130) selects, as a victim block, a memory block including at least one valid page among the N memory blocks included in the second super memory block (SUPER BLOCK<1>) having a number of valid pages less than or equal to the 'set number', without using the first method described above.
반면, 전술한 설명에서와 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)의 유효 페이지 개수(VPC<0>)가 3이고, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)의 유효 페이지 개수(VPC<1>)도 3일 수 있다. 또한, 컨트롤러(130)는, '설정된 개수'를 2로 설정할 수 있다. 이와 같은 경우, 컨트롤러(130)는, 두 개의 슈퍼 메모리 블록, 즉, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>) 및 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)이 모두 '설정된 개수'이하의 유효 페이지 개수를 갖는다는 것을 확인할 수 있다. 따라서, 컨트롤러(130)는, 전술한 첫 번째 방식을 사용하여, 상대적으로 더 작은 소요예측시간(PRE_TOTAL<0>)을 갖는 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 N개의 메모리 블록들 중 적어도 하나 이상의 유효 페이지를 포함하는 메모리 블록을 희생블록으로 선택한다.On the other hand, as described above, the number of valid pages (VPC<0>) of the first super memory block (SUPER BLOCK<0>) may be 3, and the number of valid pages (VPC<1>) of the second super memory block (SUPER BLOCK<1>) may also be 3. In addition, the controller (130) may set the 'set number' to 2. In this case, the controller (130) may confirm that both super memory blocks, that is, the first super memory block (SUPER BLOCK<0>) and the second super memory block (SUPER BLOCK<1>), have a number of valid pages less than or equal to the 'set number'. Therefore, the controller (130) selects, as a victim block, a memory block including at least one valid page among the N memory blocks included in the first super memory block (SUPER BLOCK<0>) having a relatively smaller estimated time required (PRE_TOTAL<0>).
한편, 전술한 설명과 같이 컨트롤러(130)는, 소요예측시간들(PRE_TOTAL<0, 1>)을 생성하고, 생성된 소요예측시간들(PRE_TOTAL<0, 1>)을 소요예측시간 테이블(600)로서 관리한다.Meanwhile, as described above, the controller (130) generates required predicted times (PRE_TOTAL<0, 1>) and manages the generated required predicted times (PRE_TOTAL<0, 1>) as a required predicted time table (600).
이때, 컨트롤러(130)는, 다음과 같은 두 가지 방식 중 어느 하나의 방식을 사용하여 소요예측시간들(PRE_TOTAL<0, 1>)을 업데이트(update)할 수 있다.At this time, the controller (130) can update the estimated time required (PRE_TOTAL<0, 1>) using one of the following two methods.
첫 번째 방식은, 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 유효 페이지의 개수가 가변되는 특정 메모리 블록이 발생할 때마다, 특정 메모리 블록이 그룹화된 슈퍼 메모리 블록의 소요예측시간을 업데이트할 수 있다.In the first method, the controller (130) can update the expected time required for a super memory block in which a specific memory block is grouped whenever a specific memory block with a variable number of valid pages occurs among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150).
예컨대, 도 4 및 도 5a를 함께 참조하면, 첫 번째 포그라운드 동작 또는 백그라운드 동작에 따라 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)의 유효 페이지 개수가 가변될 수 있다. 이어서, 두 번째 포그라운드 동작 또는 백그라운드 동작의 수행에 따라 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)의 유효 페이지 개수가 가변될 수 있다.For example, referring to FIGS. 4 and 5A together, the number of valid pages of a first memory block (BLOCK000) of a first plane (PLANE00) of a first memory die (DIE0) may vary depending on whether a first foreground operation or a background operation is performed. Subsequently, the number of valid pages of a second memory block (BLOCK001) of a first plane (PLANE00) of the first memory die (DIE0) may vary depending on whether a second foreground operation or a background operation is performed.
이와 같은 경우, 컨트롤러(130)는, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)의 유효 페이지가 가변되는 것에 응답하여, 해당 메모리 블록(BLOCK000)이 그룹화된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)의 값을 다시 예측연산할 수 있다. 이어서, 컨트롤러(130)는, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)의 유효 페이지 개수가 가변되는 것에 응답하여, 해당 메모리 블록(BLOCK001)이 그룹화된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)의 값을 다시 예측연산할 수 있다.In this case, the controller (130) can re-predict the value of the first estimated time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) in which the memory block (BLOCK000) is grouped in response to the change in the valid page of the first memory block (BLOCK000) of the first plane (PLANE00) of the first memory die (DIE0). Then, the controller (130) can re-predict the value of the second estimated time required (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) in which the memory block (BLOCK001) is grouped in response to the change in the number of valid pages of the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0).
두 번째 방식은, 컨트롤러(130)는, '설정된 시점'마다 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 유효 페이지의 개수가 가변된 특정 메모리 블록이 존재하는지를 확인하고, 확인결과 유효 페이지의 개수가 가변된 특정 메모리 블록이 존재하는 경우, 특정 메모리 블록이 그룹화된 슈퍼 메모리 블록의 소요예측시간을 업데이트할 수 있다.In the second method, the controller (130) checks whether there is a specific memory block among the memory blocks (MEMORY BLOCK<000, 001,...>) with a variable number of valid pages at each 'set point in time', and if the result of the check shows that there is a specific memory block with a variable number of valid pages, the controller can update the expected time required for the super memory block in which the specific memory block is grouped.
예컨대, 도 4 및 도 5a를 함께 참조하면, 제1 설정된 시점(미도시)과 제2 설정된 시점(미도시) 사이에서 연속된 적어도 두 개의 포그라운드 동작 또는 백그라운드 동작이 수행되어 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)의 유효 페이지 개수 및 두 번째 메모리 블록(BLOCK001)의 유효 페이지 개수가 가변될 수 있다.For example, referring to FIGS. 4 and 5A together, at least two consecutive foreground operations or background operations may be performed between a first set point in time (not shown) and a second set point in time (not shown) so that the number of valid pages of a first memory block (BLOCK000) of a first plane (PLANE00) of a first memory die (DIE0) and the number of valid pages of a second memory block (BLOCK001) may be varied.
이와 같은 경우, 컨트롤러(130)는, 제2 설정된 시점에서 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 유효 페이지의 개수가 가변된 메모리 블록이 존재하는지 여부를 확인하고, 확인결과에 따라 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000) 및 두 번째 메모리 블록(BLOCK001) 각각의 유효 페이지 개수가 가변하였다는 것을 알 수 있다. 따라서, 컨트롤러(130)는, 제2 설정된 시점에서 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)이 그룹화된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)의 값 및 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)이 그룹화된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)의 값을 동시에 다시 예측연산할 수 있다.In this case, the controller (130) checks whether there is a memory block among the memory blocks (MEMORY BLOCK<000, 001,...>) with a variable number of valid pages at the second set time point, and based on the check result, it can be known that the number of valid pages of each of the first memory block (BLOCK000) and the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0) has varied. Accordingly, the controller (130) can simultaneously re-predict the value of the first predicted time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) in which the first memory block (BLOCK000) of the first plane (PLANE00) of the first memory die (DIE0) is grouped at the second set time point, and the value of the second predicted time required (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) in which the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0) is grouped.
참고로, '설정된 시점'은, 설계자에 의해 미리 정의될 수 있는 시점으로서, 설정된 크기의 데이터가 라이트될 때마다 반복되는 시점 또는 특정동작의 수행이 완료될 때마다 반복되는 시점일 수 있다.For reference, a 'set point in time' is a point in time that can be predefined by the designer, and can be a point in time that is repeated whenever data of a set size is written, or a point in time that is repeated whenever the performance of a specific operation is completed.
한편, 가비지 컬렉션이 수행되어 희생블록으로 선택된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 모든 유효 페이지가 컨트롤러(130) 내부의 메모리(144)로 전달되었다가, 타겟블록(target block)인 세 번째 슈퍼 메모리 블록(SUPER BLOCK<2>)으로 이동되면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에는 더 이상 유효 페이지가 존재하지 않는 상태가 될 것이다. 따라서, 가비지 컬렉션 이후의 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은 소거(erase)동작을 통해 프리(free) 슈퍼 메모리 블록이 되는 동작 이외에 무효(invalid)한 슈퍼 메모리 블록으로서 어떠한 동작에도 관여될 필요가 없다. 그런데, 컨트롤러(130)는, 가비지 컬렉션을 수행하기 이전에 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 첫 번째 소요예측시간(PRE_TOTAL<0>)을 생성하였기 때문에, 가비지 컬렉션을 수행한 이후에도 소요예측시간 테이블(600)에 그 값이 남아 있을 수 있다. 이렇게, 소요예측시간 테이블(600)에 남아있는 첫 번째 소요예측시간(PRE_TOTAL<0>)의 값으로 인해 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대해 알 수 없는 비정상적인 동작이 수행될 수 있다. 따라서, 컨트롤러(130)는, 희생블록으로 선택된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 가비지 컬렉션이 수행된 이후에, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)을 '예정값'으로 설정하여 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대해 알 수 없는 비정상적인 동작이 수행되는 것을 방지한다.Meanwhile, when garbage collection is performed and all valid pages included in the first super memory block (SUPER BLOCK<0>) selected as a victim block are transferred to the memory (144) within the controller (130) and then moved to the third super memory block (SUPER BLOCK<2>), which is a target block, there will be no more valid pages in the first super memory block (SUPER BLOCK<0>). Therefore, the first super memory block (SUPER BLOCK<0>) after garbage collection does not need to be involved in any operation as an invalid super memory block other than the operation of becoming a free super memory block through an erase operation. However, since the controller (130) generates the first estimated time required (PRE_TOTAL<0>) for the first super memory block (SUPER BLOCK<0>) before performing garbage collection, its value may remain in the estimated time required table (600) even after performing garbage collection. In this way, an unknown abnormal operation may be performed for the first super memory block (SUPER BLOCK<0>) due to the value of the first estimated time required (PRE_TOTAL<0>) remaining in the estimated time required table (600). Accordingly, the controller (130) sets the first estimated time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) to a ‘planned value’ after garbage collection is performed on the first super memory block (SUPER BLOCK<0>) selected as the sacrifice block, thereby preventing an unknown abnormal operation from being performed on the first super memory block (SUPER BLOCK<0>).
정리하면, 컨트롤러(130)는, 특정 슈퍼 메모리 블록이 희생블록으로 선택되어 가비지 컬렉션을 통해 내부의 유효 페이지가 모두 타겟 슈퍼 메모리 블록으로 이동한 경우, 특정 슈퍼 메모리 블록이 알 수 없는 잘못된 동작을 수행할 수 없도록 특정 슈퍼 메모리 블록에 대한 소요예측시간을 '예정값'으로 설정할 수 있다.In summary, the controller (130) can set the expected time required for a specific super memory block to an 'expected value' to prevent the specific super memory block from performing an unknown erroneous operation when the specific super memory block is selected as a sacrifice block and all valid pages inside are moved to the target super memory block through garbage collection.
한편, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 프리 메모리 블록의 개수가 충분히 많은 상태이면, 가비지 컬렉션을 수행할 확률이 높지 않다. 즉, 일반적으로 가비지 컬렉션은 메모리 장치(150)에 포함된 프리 메모리 블록의 개수가 '일정 개수' 이하로 줄어들 때 수행하는 동작이다.Meanwhile, if the number of free memory blocks among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) is sufficiently large, the probability of performing garbage collection is not high. That is, garbage collection is generally an operation performed when the number of free memory blocks included in the memory device (150) is reduced below a 'certain number'.
따라서, 본 발명의 제1 실시예에 따른 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 프리 메모리 블록의 개수가 '제1 개수'이하인 구간에서 전술한 소요예측시간들(PRE_TOTAL<0, 1>)을 생성 및 관리한다. 물론, 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 프리 메모리 블록의 개수가 '제1 개수'보다 큰 '제2 개수' 이상인 구간에서 소요예측시간들(PRE_TOTAL<0, 1>)을 생성 및 관리하지 않는다.Accordingly, the controller (130) according to the first embodiment of the present invention generates and manages the aforementioned required predicted times (PRE_TOTAL<0, 1>) in a section where the number of free memory blocks among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) is equal to or less than the 'first number'. Of course, the controller (130) does not generate and manage the required predicted times (PRE_TOTAL<0, 1>) in a section where the number of free memory blocks among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) is equal to or greater than the 'second number' which is greater than the 'first number'.
참고로, '제1 개수'는, 일반적인 가비지 컬렉션 동작의 트리거(trigger) 시점을 결정하기 위한 '일정 개수'와는 다르게 설정될 수 있다. 예컨대, '제1 개수'보다 '일정 개수'가 더 작을 수 있다.Note that the 'first number' may be set differently from the 'schedule number' used to determine the trigger point of a general garbage collection operation. For example, the 'schedule number' may be smaller than the 'first number'.
<제2 실시예><Example 2>
도 7a 및 도 7b는 본 발명의 제2 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 설명하는 도면이다.FIGS. 7A and 7B are diagrams illustrating garbage collection for a super memory block in a memory system according to a second embodiment of the present invention.
먼저, 도 7a 및 도 7b에 도시된 본 발명의 제2 실시예에서는 앞선 도 4에서 설명한 컨트롤러(130)에서 슈퍼 메모리 블록들을 구분하는 방식 중 세 번째 방식을 사용하는 것을 알 수 있다.First, it can be seen that in the second embodiment of the present invention illustrated in FIGS. 7a and 7b, the third method among the methods of distinguishing super memory blocks in the controller (130) described in FIG. 4 above is used.
즉, 도 7a 및 도 7b에서는 컨트롤러(130)가 메모리 장치(150)에 포함된 4개의 플래인들(PLANE<00, 01, 10, 11>) 각각에서 임의의 하나의 메모리 블록을 선택하여 하나의 슈퍼 메모리 블록(SUPER BLOCK<0> or SUPER BLOCK<1>)으로 관리한다. 따라서, 하나의 슈퍼 메모리 블록(SUPER BLOCK<0> or SUPER BLOCK<1>)에는 4개의 메모리 블록이 포함된다.That is, in FIGS. 7a and 7b, the controller (130) selects one random memory block from each of the four planes (PLANE<00, 01, 10, 11>) included in the memory device (150) and manages it as one super memory block (SUPER BLOCK<0> or SUPER BLOCK<1>). Accordingly, one super memory block (SUPER BLOCK<0> or SUPER BLOCK<1>) includes four memory blocks.
예컨대, 도 4 및 도 7a를 참조하면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)과, 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)의 첫 번째 메모리 블록(BLOCK010)과, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)의 첫 번째 메모리 블록(BLOCK100), 및 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)의 첫 번째 메모리 블록(BLOCK110)을 그룹화한 것이다.For example, referring to FIG. 4 and FIG. 7a, a first super memory block (SUPER BLOCK<0>) groups a first memory block (BLOCK000) of a first plane (PLANE00) of a first memory die (DIE0), a first memory block (BLOCK010) of a second plane (PLANE01) of the first memory die (DIE0), a first memory block (BLOCK100) of a first plane (PLANE10) of a second memory die (DIE1), and a first memory block (BLOCK110) of a second plane (PLANE11) of the second memory die (DIE1).
그리고, 도 4 및 도 7b를 참조하면, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)과, 첫 번째 메모리 다이(DIE0)의 두 번째 플래인(PLANE01)의 두 번째 메모리 블록(BLOCK011)과, 두 번째 메모리 다이(DIE1)의 첫 번째 플래인(PLANE10)의 두 번째 메모리 블록(BLOCK101), 및 두 번째 메모리 다이(DIE1)의 두 번째 플래인(PLANE11)의 두 번째 메모리 블록(BLOCK111)을 그룹화한 것이다.And, referring to FIG. 4 and FIG. 7b, the second super memory block (SUPER BLOCK<1>) groups the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0), the second memory block (BLOCK011) of the second plane (PLANE01) of the first memory die (DIE0), the second memory block (BLOCK101) of the first plane (PLANE10) of the second memory die (DIE1), and the second memory block (BLOCK111) of the second plane (PLANE11) of the second memory die (DIE1).
그리고, 도 7a 및 도 7b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각은 내부에 포함된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>)을 병렬로 선택하여 각각 페이지 단위의 데이터를 입/출력할 수 있다.And, each of the super memory blocks (SUPER BLOCK<0, 1>) exemplified through FIGS. 7a and 7b can select four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) contained therein in parallel and input/output data in page units, respectively.
여기서, 도 7a 및 도 7b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각은 내부에 포함된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>)을 병렬로 선택할 때, 서로 다른 위치의 페이지들에 대해서 병렬리드가 가능하다고 가정할 수 있다. 물론, 서로 다른 위치의 페이지들에 대해서 병렬리드가 가능하다고 해도 하나의 블록에서 한 번에 하나의 페이지만 선택하여 리드하는 것이 가능하다.Here, each of the super memory blocks (SUPER BLOCK<0, 1>) exemplified through FIGS. 7a and 7b can be assumed to be capable of parallel reading for pages at different locations when selecting four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) contained therein in parallel. Of course, even if parallel reading is possible for pages at different locations, it is possible to select and read only one page at a time from one block.
예컨대, 도 7a를 통해 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>)을 병렬로 선택한다는 것은, 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 각각에서 위치와 상관없이 하나의 페이지를 선택하는 것을 의미한다. 즉, 도 7a를 통해 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 중 첫 번째 메모리 블록(BLOCK000)에서는 첫 번째 페이지(P<0>)를 선택하고, 두 번째 메모리 블록(BLOCK010)에서는 세 번째 페이지(P<2>)를 선택하며, 세 번째 및 네 번째 메모리 블록(BLOCK<100, 110>)에서는 각각 두 번째 페이지(P<1>)를 선택하는 것을 의미한다. 물론, 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 중 첫 번째 및 두 번째 메모리 블록(BLOCK<000, 010>)에서는 각각 두 개의 페이지를 선택하고, 세 번째 및 네 번째 메모리 블록(BLOCK<100, 110>)에서는 어떠한 페이지도 선택하지 않는 것과 같은 방식의 리드는 불가능하다.For example, selecting four memory blocks (BLOCK<000, 010, 100, 110>) contained therein in parallel from the first super memory block (SUPER BLOCK<0>) illustrated through Fig. 7a means selecting one page regardless of its location from each of the four memory blocks (BLOCK<000, 010, 100, 110>). That is, in the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 7a, among the four memory blocks (BLOCK<000, 010, 100, 110>) included therein, the first page (P<0>) is selected in the first memory block (BLOCK000), the third page (P<2>) is selected in the second memory block (BLOCK010), and the second page (P<1>) is selected in the third and fourth memory blocks (BLOCK<100, 110>), respectively. Of course, it is impossible to read in the same way as selecting two pages each from the first and second memory blocks (BLOCK<000, 010>) among the four memory blocks (BLOCK<000, 010, 100, 110>) and not selecting any pages from the third and fourth memory blocks (BLOCK<100, 110>).
마찬가지로, 도 7b를 통해 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>)을 병렬로 선택한다는 것은, 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>) 각각에서 위치와 상관없이 하나의 페이지를 동시에 선택하는 것을 의미한다. 즉, 도 7b를 통해 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에서 내부에 포함된 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>) 중 첫 번째 메모리 블록(BLOCK001)에서는 첫 번째 페이지(P<0>)를 선택하고, 두 번째 내지 네 번째 메모리 블록(BLOCK<011, 101, 111>)에서는 각각 두 번째 페이지(P<1>)를 선택하는 것을 의미한다. 물론, 4개의 메모리 블록들(BLOCK<001, 011, 101, 111>) 중 두 번째 및 세 번째 메모리 블록(BLOCK<011, 101>)에서는 각각 두 개의 페이지를 선택하고, 첫 번째 및 네 번째 메모리 블록(BLOCK<001, 111>)에서는 어떠한 페이지도 선택하지 않는 것과 같은 방식의 리드는 불가능하다.Similarly, selecting four memory blocks (BLOCK<001, 011, 101, 111>) included therein in parallel in the second super memory block (SUPER BLOCK<1>) exemplified through FIG. 7b means selecting one page simultaneously from each of the four memory blocks (BLOCK<001, 011, 101, 111>) regardless of the position. That is, it means selecting the first page (P<0>) from the first memory block (BLOCK001) among the four memory blocks (BLOCK<001, 011, 101, 111>) included therein in the second super memory block (SUPER BLOCK<1>) exemplified through FIG. 7b, and selecting the second page (P<1>) from the second to fourth memory blocks (BLOCK<011, 101, 111>), respectively. Of course, it is impossible to read in the same way as selecting two pages each from the second and third memory blocks (BLOCK<011, 101>) among the four memory blocks (BLOCK<001, 011, 101, 111>) and not selecting any pages from the first and fourth memory blocks (BLOCK<001, 111>).
한편, 도 7a 및 도 7b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각은 내부에 포함된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) 각각에 포함된 다수의 페이지들(P<0, 1, 2,...>) 각각은, 독립적으로 유효 페이지(VAILD PAGE) 또는 무효 페이지(INVALID PAGE)가 될 수 있다.Meanwhile, each of the super memory blocks (SUPER BLOCK<0, 1>) exemplified through FIGS. 7a and 7b includes four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) contained therein, and each of the multiple pages (P<0, 1, 2,...>) contained therein can independently become a valid page (VAILD PAGE) or an invalid page (INVALID PAGE).
예컨대, 도 7a에 예시된 것과 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 메모리 블록(BLOCK000)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK010)의 세 번째 페이지(P<2>)와, 세 번째 및 네 번째 메모리 블록(BLOCK<100, 110>) 각각의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)일 수 있다.For example, as illustrated in FIG. 7a, in the first super memory block (SUPER BLOCK<0>), only the first page (P<0>) of the first memory block (BLOCK000), the third page (P<2>) of the second memory block (BLOCK010), and the second page (P<1>) of each of the third and fourth memory blocks (BLOCK<100, 110>) may be valid pages (VAILD PAGE), and all remaining pages may be invalid pages (INVALID PAGE).
또한, 도 7b에 예시된 것과 같이 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK011)의 두 번재 및 세 번째 페이지(P<1, 2>), 및 네 번째 메모리 블록(BLOCK111)의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)일 수 있다.In addition, as illustrated in FIG. 7b, in the second super memory block (SUPER BLOCK<1>), only the first page (P<0>) of the first memory block (BLOCK001), the second and third pages (P<1, 2>) of the second memory block (BLOCK011), and the second page (P<1>) of the fourth memory block (BLOCK111) may be valid pages (VAILD PAGE), and all remaining pages may be invalid pages (INVALID PAGE).
이렇게, 도 7a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)과 도 7b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 각각 4개의 유효 페이지를 포함하는 상태라는 것을 알 수 있다.In this way, it can be seen that the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 7a and the second super memory block (SUPER BLOCK<1>) illustrated in Fig. 7b each contain four valid pages.
또한, 가비지 컬렉션을 위해 도 7a 및 도 7b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각에 포함된 4개씩의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>, MEMORY BLOCK<001, 011, 101, 111>)을 각각 희생블록(victim block)으로 선택할 수 있다.Additionally, for garbage collection, four memory blocks (MEMORY BLOCK<000, 010, 100, 110>, MEMORY BLOCK<001, 011, 101, 111>) included in each of the super memory blocks (SUPER BLOCK<0, 1>) illustrated in FIGS. 7a and 7b can be selected as victim blocks.
이렇게, 가비지 컬렉션을 위해 도 7a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하였을 때, 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>)에 포함된 4개의 유효 페이지로부터 데이터를 추출하는데 필요한 시간을 첫 번째 소요시간(TOTAL<0>)이라고 할 수 있다. 또한, 가비지 컬렉션을 위해 도 7b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하였을 때, 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>)에 포함된 4개의 유효 페이지로부터 데이터를 추출하는데 필요한 시간을 두 번째 소요시간(TOTAL<1>)이라고 할 수 있다.In this way, when the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 7a is selected as a victim block for garbage collection, the time required to extract data from four valid pages included in the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included therein can be referred to as the first time required (TOTAL<0>). In addition, when the second super memory block (SUPER BLOCK<1>) illustrated in Fig. 7b is selected as a victim block for garbage collection, the time required to extract data from four valid pages included in the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included therein can be referred to as the second time required (TOTAL<1>).
이때, 첫 번재 소요시간(TOTAL<0>)과 두 번째 소요시간(TOTAL<1>)은 다음과 같은 이유로 인해 크게 차이날 수 있다.At this time, the first time required (TOTAL<0>) and the second time required (TOTAL<1>) may differ significantly for the following reasons:
구체적으로, 가비지 컬렉션에서 도 7a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하여 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>)에 포함된 4개의 유효 페이지로부터 데이터를 추출하기 위해 4개의 유효 페이지의 위치를 확인할 수 있다.Specifically, in the garbage collection, the first super memory block (SUPER BLOCK<0>) illustrated in Fig. 7a is selected as a victim block, and the locations of the four valid pages included in the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included therein can be identified in order to extract data from the four valid pages.
확인결과, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 메모리 블록(BLOCK000)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK010)의 세 번째 페이지(P<2>)와, 세 번째 및 네 번째 메모리 블록(BLOCK<100, 110>) 각각의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.As a result of the verification, it can be seen that in the first super memory block (SUPER BLOCK<0>), only the first page (P<0>) of the first memory block (BLOCK000), the third page (P<2>) of the second memory block (BLOCK010), and the second page (P<1>) of each of the third and fourth memory blocks (BLOCK<100, 110>) are valid pages (VAILD PAGE), and all the remaining pages are invalid pages (INVALID PAGE).
확인결과에 따라, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 유효 페이지(VAILD PAGE)는 그 위치가 서로 다른 것도 있고 서로 같은 것도 있는 것을 알 수 있다. 또한, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>) 각각은 1개씩의 유효 페이지를 포함하는 것을 알 수 있다. 즉, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>) 각각의 유효 페이지 개수 중 가장 큰 개수는 1인 것을 알 수 있다. 이는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 유효 페이지로부터 4개의 유효 데이터를 추출하기 위해서 한 번의 리드(FIRST_READ)를 수행해야 한다는 것을 의미한다.According to the verification result, it can be seen that the four valid pages (VAILD PAGE) included in the first super memory block (SUPER BLOCK<0>) have different locations and the same locations. In addition, it can be seen that each of the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included in the first super memory block (SUPER BLOCK<0>) includes one valid page. In other words, it can be seen that the largest number of valid pages in each of the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included in the first super memory block (SUPER BLOCK<0>) is 1. This means that one read (FIRST_READ) must be performed to extract four valid data from the four valid pages included in the first super memory block (SUPER BLOCK<0>).
따라서, 컨트롤러(130)는, 제0 시점(t0)에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 첫 번째 메모리 블록(BLOCK000)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK010)의 세 번째 페이지(P<2>)와, 세 번째 및 네 번째 메모리 블록(BLOCK<100, 110>) 각각의 두 번째 페이지(P<1>)에 대해 한 번의 리드(FIRST_READ)를 수행한다. 한 번의 리드(FIRST_READ)를 통해 4개의 페이지 데이터(B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD)를 4개의 페이지 버퍼들(PB<000, 010, 100, 110>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제1 시점(t1)에서 페이지 버퍼들(PB<000, 010, 100, 110>)에 캐싱된 4개의 페이지 데이터들(B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD)은 모두 유효 데이터(VALID DATA)이므로, 4개의 페이지 데이터들(B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD)을 모두 내부의 메모리(144)로 전송(DATA TRANSFER)한다.Accordingly, the controller (130) performs one read (FIRST_READ) on the first page (P<0>) of the first memory block (BLOCK000) included in the first super memory block (SUPER BLOCK<0>), the third page (P<2>) of the second memory block (BLOCK010), and the second page (P<1>) of each of the third and fourth memory blocks (BLOCK<100, 110>) at time 0 (t0). Through one read (FIRST_READ), four page data (B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD) are cached in four page buffers (PB<000, 010, 100, 110>). Next, the controller (130) transmits (DATA TRANSFER) all four page data (B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD) cached in the page buffers (PB<000, 010, 100, 110>) at the first time point (t1) to the internal memory (144) because all four page data (B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD) are valid data (VALID DATA).
이렇게, 컨트롤러(130)는, 한 번의 리드(FIRST_READ)를 통해, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 유효 페이지(VAILD PAGE : BLOCK000_P<0>, BLOCK010_P<2>, BLOCK100_P<1>, BLOCK110_P<1>)에 저장된 4개의 유효 데이터(VALID DATA : B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD)를 모두 추출할 수 있다.In this way, the controller (130) can extract all four valid data (VALID DATA: B000P0_VD, B010P2_VD, B100P1_VD, B110P1_VD) stored in four valid pages (VAILD PAGE: BLOCK000_P<0>, BLOCK010_P<2>, BLOCK100_P<1>, BLOCK110_P<1>) included in the first super memory block (SUPER BLOCK<0>) through one read (FIRST_READ).
여기서, 한 번의 리드(FIRST_READ)를 수행하는데 필요한 시간을 리드시간(tREAD)이라고 가정할 수 있다. 또한, 1개의 페이지 버퍼(PB<000> or PB<010> or PB<100> or PB<110>)에 저장된 1개의 페이지 데이터(B000P0_VD or B010P2_VD or B100P1_VD or B110P1_VD)를 내부의 메모리(144)로 전송하는데 필요한 시간을 전송시간(tTX)라고 가정할 수 있다. 이렇게 가정할 경우, 가비지 컬렉션에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 첫 번째 소요시간(TOTAL<0>)은, '{리드시간(tREAD) * 1} + {전송시간(tTX) * 4}'이 될 것이다. 예를 들어, 리드시간(tREAD)이 50us이고, 전송시간(tTX)이 10us라고 가정하면, 가비지 컬렉션에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 첫 번째 소요시간(TOTAL<0>)은, 90us가 될 것이다.Here, the time required to perform one read (FIRST_READ) can be assumed as the read time (tREAD). In addition, the time required to transfer one page data (B000P0_VD or B010P2_VD or B100P1_VD or B110P1_VD) stored in one page buffer (PB<000> or PB<010> or PB<100> or PB<110>) to the internal memory (144) can be assumed as the transfer time (tTX). In this assumption, the first time required (TOTAL<0>) to extract data by selecting the first super memory block (SUPER BLOCK<0>) as a victim block in garbage collection will be '{read time (tREAD) * 1} + {transfer time (tTX) * 4}'. For example, assuming that the read time (tREAD) is 50us and the transfer time (tTX) is 10us, the first time required to extract data by selecting the first super memory block (SUPER BLOCK<0>) as a victim block in garbage collection (TOTAL<0>) will be 90us.
그리고, 가비지 컬렉션에서 도 7b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하여 내부에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>)에 포함된 4개의 유효 페이지로부터 데이터를 추출하기 위해 4개의 유효 페이지의 위치를 확인할 수 있다.And, in the garbage collection, the second super memory block (SUPER BLOCK<1>) illustrated in Fig. 7b can be selected as a victim block to check the locations of the four valid pages included in the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included therein in order to extract data from the four valid pages.
확인결과, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK011)의 두 번재 및 세 번째 페이지(P<1, 2>), 및 네 번째 메모리 블록(BLOCK111)의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.As a result of the verification, it can be seen that in the second super memory block (SUPER BLOCK<1>), only the first page (P<0>) of the first memory block (BLOCK001), the second and third pages (P<1, 2>) of the second memory block (BLOCK011), and the second page (P<1>) of the fourth memory block (BLOCK111) are valid pages (VAILD PAGE), and all the remaining pages are invalid pages (INVALID PAGE).
확인결과에 따라, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 유효 페이지(VAILD PAGE)는 그 위치가 서로 다른 것도 있고 서로 같은 것도 있는 것을 알 수 있다. 또한, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>) 중 첫 번째 및 네 번째 메모리 블록(BLOCK<001, 111>) 각각은 1개씩의 유효 페이지를 포함하고, 두 번째 메모리 블록(BLOCK011)은 2개의 유효 페이지를 포함하며, 세 번째 메모리 블록(BLOCK101)은 유효 페이지를 포함하지 않는 것을 알 수 있다. 즉, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>) 각각의 유효 페이지 개수 중 가장 큰 개수는 2인 것을 알 수 있다. 이는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 유효 페이지로부터 4개의 유효 데이터를 추출하기 위해서 두 번의 리드(FIRST_READ, SECOND_READ)를 수행해야 한다는 것을 의미한다.According to the verification result, it can be seen that the four valid pages (VAILD PAGE) included in the second super memory block (SUPER BLOCK<1>) have different locations and the same locations for some of them. In addition, among the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>), the first and fourth memory blocks (BLOCK<001, 111>) each include one valid page, the second memory block (BLOCK011) includes two valid pages, and the third memory block (BLOCK101) does not include any valid pages. That is, we can see that the largest number of valid pages in each of the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) is 2. This means that two reads (FIRST_READ, SECOND_READ) must be performed to extract four valid data from the four valid pages included in the second super memory block (SUPER BLOCK<1>).
따라서, 컨트롤러(130)는, 제0 시점(t0)에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 내지 네 번째 메모리 블록(BLOCK<011, 101, 111>) 각각의 두 번째 페이지(P<1>)에 대해 첫 번째 리드(FIRST_READ)를 수행한다. 첫 번째 리드(FIRST_READ)를 통해 4개의 페이지 데이터(B001P0_VD, B011P1_VD, B101P1_IVD, B111P1_VD)를 4개의 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제1 시점(t1)에서 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P0_VD, B011P1_VD, B101P1_IVD, B111P1_VD) 중 3개의 유효 데이터(VALID DATA : B001P0_VD, B011P1_VD, B111P1_VD)만 선택하여 내부의 메모리(144)로 전송(DATA TRANSFER)한다. 물론, 컨트롤러(130)는, 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P0_VD, B011P1_VD, B101P1_IVD, B111P1_VD) 중 1개의 무효 데이터(INVALID DATA : B101P1_IVD)는, 내부의 메모리(144)로 전송하지 않고 폐기(discard)한다.Accordingly, the controller (130) performs a first read (FIRST_READ) on the first page (P<0>) of the first memory block (BLOCK001) included in the second super memory block (SUPER BLOCK<1>) at time 0 (t0) and the second page (P<1>) of each of the second to fourth memory blocks (BLOCK<011, 101, 111>). Through the first read (FIRST_READ), four page data (B001P0_VD, B011P1_VD, B101P1_IVD, B111P1_VD) are cached in four page buffers (PB<001, 011, 101, 111>). Next, the controller (130) selects only three valid data (VALID DATA: B001P0_VD, B011P1_VD, B111P1_VD) among four page data (B001P0_VD, B011P1_VD, B101P1_IVD, B111P1_VD) cached in the page buffers (PB<001, 011, 101, 111>) at the first time point (t1) and transfers (DATA TRANSFER) them to the internal memory (144). Of course, the controller (130) discards one invalid data (INVALID DATA: B101P1_IVD) among the four page data (B001P0_VD, B011P1_VD, B101P1_IVD, B111P1_VD) cached in the page buffers (PB<001, 011, 101, 111>) without transmitting it to the internal memory (144).
이렇게, 컨트롤러(130)는, 첫 번째 리드(FIRST_READ)를 통해, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 3개의 유효 페이지(VAILD PAGE : BLOCK001_P<0>, BLOCK011_P<1>, BLOCK111_P<1>)에 저장된 3개의 유효 데이터(VALID DATA : B001P0_VD, B011P1_VD, B111P1_VD)를 추출할 수 있다.In this way, the controller (130) can extract three valid data (VALID DATA: B001P0_VD, B011P1_VD, B111P1_VD) stored in three valid pages (VAILD PAGE: BLOCK001_P<0>, BLOCK011_P<1>, BLOCK111_P<1>) included in the second super memory block (SUPER BLOCK<1>) through the first read (FIRST_READ).
이어서, 컨트롤러(130)는, 제2 시점(t2)에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록(BLOCK<001, 011, 101, 111>) 각각의 세 번째 페이지(P<2>)에 대한 두 번째 리드(SECOND_READ)를 수행한다. 두 번째 리드(SECOND_READ)를 통해 4개의 페이지 데이터(B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD)를 4개의 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱한다. 이어서, 컨트롤러(130)는, 제3 시점(t3)에서 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) 중 1개의 유효 데이터(VALID DATA : B011P2_VD)만 선택하여 내부의 메모리(144)로 전송(DATA TRANSFER)한다. 물론, 컨트롤러(130)는, 페이지 버퍼들(PB<001, 011, 101, 111>)에 캐싱된 4개의 페이지 데이터들(B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) 중 3개의 무효 데이터(INVALID DATA : B001P2_IVD, B101P2_IVD, B111P2_IVD)는, 내부의 메모리(144)로 전송하지 않고 폐기(discard)한다.Next, the controller (130) performs a second read (SECOND_READ) on the third page (P<2>) of each of the four memory blocks (BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) at a second time point (t2). Through the second read (SECOND_READ), four page data (B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) are cached in four page buffers (PB<001, 011, 101, 111>). Next, the controller (130) selects only one valid data (VALID DATA: B011P2_VD) among four page data (B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) cached in the page buffers (PB<001, 011, 101, 111>) at a third time point (t3) and transfers (DATA TRANSFER) it to the internal memory (144). Of course, the controller (130) discards three invalid data (INVALID DATA: B001P2_IVD, B101P2_IVD, B111P2_IVD) among the four page data (B001P2_IVD, B011P2_VD, B101P2_IVD, B111P2_IVD) cached in the page buffers (PB<001, 011, 101, 111>) without transmitting them to the internal memory (144).
이렇게, 컨트롤러(130)는, 두 번째 리드(SECOND_READ)를 통해, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 1개의 유효 페이지(VAILD PAGE : BLOCK011_P<2>)에 저장된 1개의 유효 데이터(VALID DATA : B011P2_VD)를 추출할 수 있다.In this way, the controller (130) can extract one valid data (VALID DATA: B011P2_VD) stored in one valid page (VAILD PAGE: BLOCK011_P<2>) included in the second super memory block (SUPER BLOCK<1>) through the second read (SECOND_READ).
정리하면, 컨트롤러(130)는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 유효 페이지(VAILD PAGE : BLOCK001_P<0>, BLOCK011_P<1>, BLOCK011_P<2>, BLOCK111_P<1>)에 저장된 4개의 유효 데이터(VALID DATA : B001P0_VD, B011P1_VD, B011P2_VD, B111P1_VD)를 모두 추출하기 위해 두 번의 리드(FIRST_READ, SECOND_READ)가 필요한 것을 알 수 있다.In summary, it can be seen that the controller (130) requires two reads (FIRST_READ, SECOND_READ) to extract all four valid data (VALID DATA: B001P0_VD, B011P1_VD, B011P2_VD, B111P1_VD) stored in four valid pages (VAILD PAGE: BLOCK001_P<0>, BLOCK011_P<1>, BLOCK011_P<2>, BLOCK111_P<1>) included in the second super memory block (SUPER BLOCK<1>).
여기서, 한 번의 리드(FIRST_READ or SECOND_READ)를 수행하는데 필요한 시간을 리드시간(tREAD)이라고 가정할 수 있다. 또한, 1개의 페이지 버퍼(PB<001> or PB<011> or PB<101> or PB<111>)에 저장된 1개의 페이지 데이터(B001P0_VD or B011P1_VD or B011P2_VD or B111P1_VD)를 내부의 메모리(144)로 전송하는데 필요한 시간을 전송시간(tTX)라고 가정할 수 있다. 이렇게 가정할 경우, 가비지 컬렉션에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 두 번째 소요시간(TOTAL<1>)은, '{리드시간(tREAD) * 2} + {전송시간(tTX) * 4}'이 될 것이다. 예를 들어, 리드시간(tREAD)이 50us이고, 전송시간(tTX)이 10us라고 가정하면, 가비지 컬렉션에서 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)을 희생블록으로 선택하여 데이터를 추출하는데 필요한 두 번째 소요시간(TOTAL<1>)은, 140us가 될 것이다.Here, the time required to perform one read (FIRST_READ or SECOND_READ) can be assumed as the read time (tREAD). Also, the time required to transfer one page data (B001P0_VD or B011P1_VD or B011P2_VD or B111P1_VD) stored in one page buffer (PB<001> or PB<011> or PB<101> or PB<111>) to the internal memory (144) can be assumed as the transfer time (tTX). In this case, the second time required (TOTAL<1>) to extract data by selecting the second super memory block (SUPER BLOCK<1>) as a victim block in garbage collection will be '{read time (tREAD) * 2} + {transfer time (tTX) * 4}'. For example, assuming that the read time (tREAD) is 50us and the transmit time (tTX) is 10us, the second time required to extract data by selecting the second super memory block (SUPER BLOCK<1>) as a victim block in garbage collection (TOTAL<1>) will be 140us.
정리하면, 도 7a에 예시된 것과 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)과 도 7b에 예시된 것과 같이 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 각각 4개의 유효 페이지를 포함하므로, 유효 페이지의 개수를 기준으로 가비지 컬렉션을 위한 희생블록을 선택하는 방식하는 경우에는 동일한 조건인 것을 알 수 있다.In summary, as illustrated in Fig. 7a, the first super memory block (SUPER BLOCK<0>) and as illustrated in Fig. 7b, the second super memory block (SUPER BLOCK<1>), each contain four valid pages, so it can be seen that the same conditions apply when selecting a victim block for garbage collection based on the number of valid pages.
하지만, 가비지 컬렉션을 위해 도 7a 및 도 7b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 각각을 희생블록으로 선택하는 경우, 도 7a에 예시된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)으로부터 데이터를 추출하는데 필요한 첫 번째 소요시간(TOTAL<0>)은 90us인 반면, 도 7b에 예시된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)으로부터 데이터를 추출하는데 필요한 두 번째 소요시간(TOTAL<1>)은 140us로서 매우 큰 차이가 나는 것을 알 수 있다.However, when each of the super memory blocks (SUPER BLOCK<0, 1>) illustrated in FIGS. 7a and 7b is selected as a sacrifice block for garbage collection, the first time required (TOTAL<0>) to extract data from the first super memory block (SUPER BLOCK<0>) illustrated in FIG. 7a is 90us, whereas the second time required (TOTAL<1>) to extract data from the second super memory block (SUPER BLOCK<1>) illustrated in FIG. 7b is 140us, which is a very large difference.
즉, 컨트롤러(130)는, 가비지 컬렉션을 효과적으로 수행하기 위해서 도 7a 및 도 7b를 통해 예시된 슈퍼 메모리 블록들(SUPER BLOCK<0, 1>) 중 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)을 희생블록으로 선택하는 것이 바람직하다.That is, in order to effectively perform garbage collection, it is desirable for the controller (130) to select the first super memory block (SUPER BLOCK<0>) among the super memory blocks (SUPER BLOCK<0, 1>) illustrated in FIGS. 7a and 7b as a sacrifice block.
도 8은 도 7a 및 도 7b를 통해 설명된 본 발명의 제2 실시예에 따른 메모리 시스템에서 슈퍼 메모리 블록에 대한 가비지 컬렉션을 수행할 때, 희생블록을 선택하는 동작을 설명하기 위해 도시한 도면이다.FIG. 8 is a diagram illustrating an operation of selecting a victim block when performing garbage collection on a super memory block in a memory system according to the second embodiment of the present invention described through FIGS. 7a and 7b.
도 8을 참조하면, 본 발명의 제2 실시예에 따른 메모리 시스템(110)은, 컨트롤러(130) 및 메모리 장치(150)를 포함한다.Referring to FIG. 8, a memory system (110) according to the second embodiment of the present invention includes a controller (130) and a memory device (150).
그리고, 컨트롤러(130)는, 가비지 컬렉션 제어부(196), 및 메모리(144)를 포함할 수 있다. 여기서, 가비지 컬렉션 제어부(196)의 일반적인 동작은 전술한 도 3을 통해 설명하였으므로, 여기에서는 더 자세히 설명하지 않도록 하겠다.And, the controller (130) may include a garbage collection control unit (196) and a memory (144). Here, the general operation of the garbage collection control unit (196) has been described through the aforementioned FIG. 3, so it will not be described in more detail here.
그리고, 도 4를 통해 설명한 바와 같이 메모리 장치(150)는, 다수의 메모리 블록들(MEMORY BLOCK<000, 001,...>)을 포함한다. 또한, 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 병렬리드가 가능한 N개의 메모리 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:N>)로 관리한다. 이때, N은 2이상의 자연수이며, 도 7a 및 도 7b에서는 N이 4인 것을 가정하고 있다. 여기에서는, 도 7a 및 도 7b를 통해 설명된 두 개의 슈퍼 메모리 블록(SUPER BLOCK<0, 1>)과 함께 프리(free) 상태인 하나의 슈퍼 메모리 블록(SUPER BLOCK<2>)이 메모리 장치(150)에 포함된 것을 가정한다. 물론, 도 8에 예시된 사항은 어디까지나 설명의 편의를 위해 간략화된 것이며, 실제는 얼마든지 다른 형태(더 많은 개수의 슈퍼 메모리 블록이 메모리 장치에 포함되는 것과 같은 형태)로 확장될 수 있다.And, as described through FIG. 4, the memory device (150) includes a plurality of memory blocks (MEMORY BLOCK<000, 001,...>). In addition, the controller (130) groups N memory blocks capable of parallel reading among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) according to set conditions and manages them as a plurality of super memory blocks (SUPER BLOCK<0:N>). At this time, N is a natural number greater than or equal to 2, and it is assumed in FIGS. 7a and 7b that N is 4. Here, it is assumed that one super memory block (SUPER BLOCK<2>) in a free state is included in the memory device (150) together with two super memory blocks (SUPER BLOCK<0, 1>) described through FIGS. 7a and 7b. Of course, the details exemplified in Fig. 8 are simplified for convenience of explanation, and in reality, they can be expanded into any number of different forms (such as a form in which a greater number of super memory blocks are included in a memory device).
구체적으로, 컨트롤러(130)는, 내부에 포함된 가비지 컬렉션 제어부(196)를 통해 가비지 컬렉션을 위해 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>)로부터 유효 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들(PRE_TOTAL<0, 1>)을 생성하고, 생성된 소요예측시간들(PRE_TOTAL<0, 1>)을 소요예측시간 테이블(600)로서 관리한다.Specifically, the controller (130) generates required predicted times (PRE_TOTAL<0, 1>) by predicting the time required for extracting valid data from memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) for garbage collection by superblock unit through the garbage collection control unit (196) included therein, and manages the generated required predicted times (PRE_TOTAL<0, 1>) as a required predicted time table (600).
또한, 컨트롤러(130)는, 가비지 컬렉션 제어부(196)를 통해 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 각각의 유효 페이지 개수들(VPC<0:1>)을 슈퍼블록단위로 카운팅하고, 카운팅된 유효 페이지 개수들(VPC<0:1>)을 유효 페이지 개수 테이블(610)로서 관리한다.In addition, the controller (130) counts the number of valid pages (VPC<0:1>) of each memory block (MEMORY BLOCK<000, 001,...>) included in the memory device (150) in superblock units through the garbage collection control unit (196), and manages the counted number of valid pages (VPC<0:1>) as a valid page count table (610).
좀 더 구체적으로, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각에 그룹화된 4개씩의 메모리 블록들(BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) 각각의 유효 페이지 개수 중 가장 큰 개수(MB_CNT<0:1>)에 리드예측시간(PRE_tREAD)를 곱하여 제1 시간(FIRST_TIME<0:1>)을 계산(FIRST_TIME<0:1> = MB_CNT<0:1> * PRE_tREAD한다.More specifically, the controller (130) calculates the first time (FIRST_TIME<0:1>) by multiplying the largest number (MB_CNT<0:1>) among the valid page numbers of each of four memory blocks (BLOCK<000, 010, 100, 110>, BLOCK<001, 011, 101, 111>) grouped in each of a plurality of super memory blocks (SUPER BLOCK<0:1>) by the read prediction time (PRE_tREAD) (FIRST_TIME<0:1> = MB_CNT<0:1> * PRE_tREAD).
또한, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>)에 전송예측시간(PRE_tTX)을 곱한 제2 시간(SECOND_TIME<0:1>)을 계산(SECOND_TIME<0:1> = VPC<0:1> * PRE_tTX)한다.In addition, the controller (130) calculates a second time (SECOND_TIME<0:1>) by multiplying the number of valid pages (VPC<0:1>) of each of a plurality of super memory blocks (SUPER BLOCK<0:1>) by the predicted transmission time (PRE_tTX) (SECOND_TIME<0:1> = VPC<0:1> * PRE_tTX).
또한, 컨트롤러(130)는, 제1 시간(FIRST_TIME<0:1>)과 제2 시간(SECOND_TIME<0:1>)을 더한 값을 계산(TOTAL<0:1> = FIRST_TIME<0:1> + SECOND_TIME<0:1>)하여 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 소요예측시간들(PRE_TOTAL<0, 1>)으로서 생성한다.In addition, the controller (130) calculates a value that adds the first time (FIRST_TIME<0:1>) and the second time (SECOND_TIME<0:1>) (TOTAL<0:1> = FIRST_TIME<0:1> + SECOND_TIME<0:1>) and generates the predicted required times (PRE_TOTAL<0, 1>) for each of a plurality of super memory blocks (SUPER BLOCK<0:1>).
예를 들어 설명하기 위해 도 8과 함께 도 7a를 함께 참조하면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은, 첫 번째 메모리 블록(BLOCK000)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK010)의 세 번째 페이지(P<2>)와, 세 번째 및 네 번째 메모리 블록(BLOCK<100, 110>) 각각의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.For example, referring to FIG. 7a together with FIG. 8 to explain, it can be seen that in the first super memory block (SUPER BLOCK<0>), only the first page (P<0>) of the first memory block (BLOCK000), the third page (P<2>) of the second memory block (BLOCK010), and the second page (P<1>) of each of the third and fourth memory blocks (BLOCK<100, 110>) are valid pages (VAILD PAGE), and all the remaining pages are invalid pages (INVALID PAGE).
따라서, 컨트롤러(130)는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 첫 번째 유효 페이지 개수(VPC<0>)가 4인 것을 알 수 있다Therefore, the controller (130) can know that the number of first valid pages (VPC<0>) included in the first super memory block (SUPER BLOCK<0>) is 4.
또한, 컨트롤러(130)는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 그룹화된 4개의 메모리 블록들(BLOCK<000, 010, 100, 110>) 각각이 1개씩의 유효 페이지를 포함하는 것을 알 수 있다. 즉, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>) 각각의 유효 페이지 개수 중 가장 큰 개수(MB_CNT<0>)는 1인 것을 알 수 있다. In addition, the controller (130) can know that each of the four memory blocks (BLOCK<000, 010, 100, 110>) grouped in the first super memory block (SUPER BLOCK<0>) includes one valid page. That is, it can be known that the largest number (MB_CNT<0>) among the numbers of valid pages of each of the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included in the first super memory block (SUPER BLOCK<0>) is 1.
따라서, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 제1 시간(FIRST_TIME<0>)은, '1 * PRE_tREAD'와 같은 계산을 통해 한 번의 리드예측시간(PRE_tREAD)에 대응하는 시간이 된다. 또한, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 제2 시간(SECOND_TIME<0>)은, '4 * PRE_tTX'와 같은 계산을 통해 네 번의 전송예측시간(PRE_tTX)에 대응하는 시간이 된다. 결론적으로, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)은, 한 번의 리드예측시간(PRE_tREAD)에 대응하는 첫 번째 제1 시간(FIRST_TIME<0>)과 네 번의 전송예측시간(PRE_tTX)에 대응하는 첫 번째 제2 시간(SECOND_TIME<0>)을 더한 시간이 된다.Therefore, the first first time (FIRST_TIME<0>) corresponding to the first super memory block (SUPER BLOCK<0>) becomes the time corresponding to one read prediction time (PRE_tREAD) through calculation such as '1 * PRE_tREAD'. In addition, the first second time (SECOND_TIME<0>) corresponding to the first super memory block (SUPER BLOCK<0>) becomes the time corresponding to four transmission prediction times (PRE_tTX) through calculation such as '4 * PRE_tTX'. In conclusion, the first predicted time (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) is the sum of the first first time (FIRST_TIME<0>) corresponding to one read predicted time (PRE_tREAD) and the first second time (SECOND_TIME<0>) corresponding to four transmission predicted times (PRE_tTX).
예컨대, 리드예측시간(PRE_tREAD)이 50us라고 가정하고, 전송예측시간(PRE_tTX)이 10us라고 가정하면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)은, 50us의 첫 번째 제1 시간(FIRST_TIME<0>)과 40us의 첫 번째 제2 시간(SECOND_TIME<0>)을 더한 90us가 될 것이다.For example, assuming that the read prediction time (PRE_tREAD) is 50us and the transmission prediction time (PRE_tTX) is 10us, the first predicted time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) will be 90us, which is the sum of the first first time (FIRST_TIME<0>) of 50us and the first second time (SECOND_TIME<0>) of 40us.
마찬가지로, 예를 들어 설명하기 위해 도 8과 함께 도 7b를 함께 참조하면, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)은, 첫 번째 메모리 블록(BLOCK001)의 첫 번째 페이지(P<0>)와, 두 번째 메모리 블록(BLOCK011)의 두 번재 및 세 번째 페이지(P<1, 2>), 및 네 번째 메모리 블록(BLOCK111)의 두 번째 페이지(P<1>)만 유효 페이지(VAILD PAGE)이고, 나머지 모든 페이지들은 무효 페이지(INVALID PAGE)인 것을 알 수 있다.Similarly, referring to FIG. 7b together with FIG. 8 for illustration purposes, it can be seen that, in the second super memory block (SUPER BLOCK<1>), only the first page (P<0>) of the first memory block (BLOCK001), the second and third pages (P<1, 2>) of the second memory block (BLOCK011), and the second page (P<1>) of the fourth memory block (BLOCK111) are valid pages (VAILD PAGE), and all the remaining pages are invalid pages (INVALID PAGE).
따라서, 컨트롤러(130)는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 두 번째 유효 페이지 개수(VPC<1>)가 4인 것을 알 수 있다.Accordingly, the controller (130) can know that the number of second valid pages (VPC<1>) included in the second super memory block (SUPER BLOCK<1>) is 4.
또한, 컨트롤러(130)는, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>) 중 첫 번째 및 네 번째 메모리 블록(BLOCK<001, 111>) 각각은 1개씩의 유효 페이지를 포함하고, 두 번째 메모리 블록(BLOCK011)은 2개의 유효 페이지를 포함하며, 세 번째 메모리 블록(BLOCK101)은 유효 페이지를 포함하지 않는 것을 알 수 있다. 즉, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<001, 011, 101, 111>) 각각의 유효 페이지 개수 중 가장 큰 개수(MB_CNT<1>)는 2인 것을 알 수 있다.In addition, the controller (130) can know that among the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>), the first and fourth memory blocks (BLOCK<001, 111>) each include one valid page, the second memory block (BLOCK011) includes two valid pages, and the third memory block (BLOCK101) does not include a valid page. That is, it can be known that the largest number (MB_CNT<1>) among the numbers of valid pages of each of the four memory blocks (MEMORY BLOCK<001, 011, 101, 111>) included in the second super memory block (SUPER BLOCK<1>) is 2.
따라서, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 제1 시간(FIRST_TIME<1>)은, '2 * PRE_tREAD'와 같은 계산을 통해 두 번의 리드예측시간(PRE_tREAD)에 대응하는 시간이 된다. 또한, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 제2 시간(SECOND_TIME<1>)은, '4 * PRE_tTX'와 같은 계산을 통해 네 번의 전송예측시간(PRE_tTX)에 대응하는 시간이 된다. 결론적으로, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)은, 두 번의 리드예측시간(PRE_tREAD)에 대응하는 두 번째 제1 시간(FIRST_TIME<1>)과 네 번의 전송예측시간(PRE_tTX)에 대응하는 두 번째 제2 시간(SECOND_TIME<1>)을 더한 시간이 된다.Therefore, the second first time (FIRST_TIME<1>) corresponding to the second super memory block (SUPER BLOCK<1>) becomes the time corresponding to two read prediction times (PRE_tREAD) through calculations such as '2 * PRE_tREAD'. In addition, the second second time (SECOND_TIME<1>) corresponding to the second super memory block (SUPER BLOCK<1>) becomes the time corresponding to four transmission prediction times (PRE_tTX) through calculations such as '4 * PRE_tTX'. In conclusion, the second estimated time (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) is the sum of the second first time (FIRST_TIME<1>) corresponding to two read estimated times (PRE_tREAD) and the second second time (SECOND_TIME<1>) corresponding to four transmission estimated times (PRE_tTX).
예컨대, 리드예측시간(PRE_tREAD)이 50us라고 가정하고, 전송예측시간이 10us라고 가정하면, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)은, 100us의 두 번째 제1 시간(FIRST_TIME<1>)과 40us의 두 번째 제2 시간(SECOND_TIME<1>)을 더한 140us가 될 것이다.For example, assuming that the read prediction time (PRE_tREAD) is 50us and the transmission prediction time is 10us, the second predicted time required (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) will be 140us, which is the sum of the second first time (FIRST_TIME<1>) of 100us and the second second time (SECOND_TIME<1>) of 40us.
참고로, 컨트롤러(130)는, 메모리 장치(150)에 대한 리드예측시간(PRE_tREAD)과 전송예측시간(PRE_tTX)에 대한 정보를 설정하고 있을 수 있다. 즉, 설계자는 메모리 장치(150)의 종류나 상태에 따라 테스트를 통해 메모리 장치(150)에 대한 리드예측시간(PRE_tREAD)과 전송예측시간(PRE_tTX)을 미리 설정할 수 있다.For reference, the controller (130) may set information on the read prediction time (PRE_tREAD) and the transmission prediction time (PRE_tTX) for the memory device (150). That is, the designer may set the read prediction time (PRE_tREAD) and the transmission prediction time (PRE_tTX) for the memory device (150) in advance through a test depending on the type or state of the memory device (150).
전술한 바와 같이, 컨트롤러(130)는, 가비지 컬렉션을 수행하기 이전에 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각에 대한 소요예측시간(PRE_TOTAL<0, 1>)을 예측연산할 수 있다.As described above, the controller (130) can predict the expected time required (PRE_TOTAL<0, 1>) for each of a plurality of super memory blocks (SUPER BLOCK<0:1>) before performing garbage collection.
그리고, 컨트롤러(130)는, 내부에 포함된 가지비 컬렉션 제어부(196)를 통해 소요예측시간 테이블(600)에 포함된 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>)에 대한 소요예측시간들(PRE_TOTAL<0, 1>)을 참조하여 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 어떤 메모리 블록을 가비지 컬렉션을 위해 희생블록으로 선택할지 결정할 수 있다.And, the controller (130) can refer to the estimated times (PRE_TOTAL<0, 1>) for a plurality of super memory blocks (SUPER BLOCK<0:1>) included in the estimated time table (600) through the garbage collection control unit (196) included therein to determine which memory block among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) to select as a sacrifice block for garbage collection.
이때, 컨트롤러(130)는, 소요예측시간 테이블(600)에 포함된 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>)에 대한 소요예측시간들(PRE_TOTAL<0, 1>)을 참조하는 방식에는 다음과 같은 두 가지 방식이 있을 수 있으며, 어느 하나의 방식을 선택할 수 있다.At this time, the controller (130) may refer to the required predicted times (PRE_TOTAL<0, 1>) for a number of super memory blocks (SUPER BLOCK<0:1>) included in the required predicted time table (600) in the following two ways, and may select one of the two ways.
첫 번째 방식은, 컨트롤러(130)에서 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>)에 대한 소요예측시간들(PRE_TOTAL<0, 1>) 중 상대적으로 가장 작은 값의 소요예측시간에 대응하는 슈퍼 메모리 블록에 그룹화된 N개의 메모리 블록들 중 적어도 하나 이상의 유효 페이지를 포함하는 메모리 블록을 희생블록으로 선택하는 방식이다.The first method is a method in which a controller (130) selects a memory block including at least one valid page among N memory blocks grouped in a super memory block corresponding to a relatively smallest value of the required predicted time (PRE_TOTAL<0, 1>) among a plurality of super memory blocks (SUPER BLOCK<0:1>) as a victim block.
예컨대, 전술한 설명에서와 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 소요예측시간(PRE_TOTAL<0>)은 90us이고, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대한 소요예측시간(PRE_TOTAL<1>)은 140us이므로, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 소요예측시간(PRE_TOTAL<0>)이 더 작다. 따라서, 컨트롤러(130)는, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 그룹화된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>) 중 적어도 하나 이상의 유효 페이지를 포함하는 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>)을 희생블록으로 선택한다.For example, as described above, the expected time required (PRE_TOTAL<0>) for the first super memory block (SUPER BLOCK<0>) is 90us, and the expected time required (PRE_TOTAL<1>) for the second super memory block (SUPER BLOCK<1>) is 140us, so the expected time required (PRE_TOTAL<0>) for the first super memory block (SUPER BLOCK<0>) is smaller. Accordingly, the controller (130) selects four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) that include at least one valid page among the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) grouped in the first super memory block (SUPER BLOCK<0>) as victim blocks.
이렇게, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 메모리 블록들(MEMORY BLOCK<000, 010, 100, 110>)이 희생블록으로 선택되었기 때문에, 가비지 컬렉션이 수행되는 구간에서 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 4개의 유효 페이지는 컨트롤러(130) 내부의 메모리(144)로 전달되었다가, 타겟블록(target block)인 세 번째 슈퍼 메모리 블록(SUPER BLOCK<2>)에 저장될 것이다.In this way, since the four memory blocks (MEMORY BLOCK<000, 010, 100, 110>) included in the first super memory block (SUPER BLOCK<0>) are selected as sacrifice blocks, in the section where garbage collection is performed, the four valid pages included in the first super memory block (SUPER BLOCK<0>) will be transferred to the memory (144) within the controller (130) and then stored in the third super memory block (SUPER BLOCK<2>), which is the target block.
두 번째 방식은, 전술한 첫 번째 방식을 사용하기 전에 컨트롤러(130)에서 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각에 포함된 N개의 메모리 블록들 각각의 유효 페이지 개수를 모두 합친 개수(VPC<0:1>)가 '설정된 개수' 이하인 슈퍼 메모리 블록의 개수를 확인하는 방식이다. 즉, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>) 중 '설정된 개수' 이하인 슈퍼 메모리 블록이 '한 개'인 경우, 전술한 첫 번째 방식을 사용하지 않는다. 반면, 컨트롤러(130)는, 다수의 슈퍼 메모리 블록들(SUPER BLOCK<0:1>) 각각의 유효 페이지 개수(VPC<0:1>) 중 '설정된 개수' 이하인 슈퍼 메모리 블록이 '적어도 두 개 이상'인 경우, 전술한 첫 번째 방식을 사용한다.The second method is a method in which, before using the first method described above, the controller (130) checks the number of super memory blocks whose combined number of valid pages (VPC<0:1>) of each of the N memory blocks included in each of the plurality of super memory blocks (SUPER BLOCK<0:1>) is less than or equal to a 'set number'. That is, the controller (130) does not use the first method described above if there is 'one' super memory block less than or equal to the 'set number' among the valid number of pages (VPC<0:1>) of each of the plurality of super memory blocks (SUPER BLOCK<0:1>). On the other hand, the controller (130) uses the first method described above if there are 'at least two' super memory blocks less than or equal to the 'set number' among the valid number of pages (VPC<0:1>) of each of the plurality of super memory blocks (SUPER BLOCK<0:1>).
예컨대, 전술한 설명에서와 다르게 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)의 유효 페이지 개수(VPC<0>)가 5이고, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)의 유효 페이지 개수(VPC<1>)가 1일 수 있다. 또한, 컨트롤러(130)는, '설정된 개수'를 2로 설정할 수 있다. 이와 같은 경우, 컨트롤러(130)는, 한 개의 슈퍼 메모리 블록, 즉, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)이 '설정된 개수'이하의 유효 페이지 개수를 갖는다는 것을 확인할 수 있다. 따라서, 컨트롤러(130)는, 전술한 첫 번째 방식을 사용하지 않고, '설정된 개수'이하의 유효 페이지 개수를 갖는 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 포함된 N개의 메모리 블록들 중 적어도 하나 이상의 유효 페이지를 포함하는 메모리 블록을 희생블록으로 선택한다.For example, unlike in the above-described description, the number of valid pages (VPC<0>) of the first super memory block (SUPER BLOCK<0>) may be 5, and the number of valid pages (VPC<1>) of the second super memory block (SUPER BLOCK<1>) may be 1. In addition, the controller (130) may set the 'set number' to 2. In this case, the controller (130) may confirm that one super memory block, that is, the second super memory block (SUPER BLOCK<1>), has a number of valid pages less than or equal to the 'set number'. Therefore, the controller (130) selects, as a victim block, a memory block including at least one valid page among the N memory blocks included in the second super memory block (SUPER BLOCK<1>) having a number of valid pages less than or equal to the 'set number', without using the first method described above.
반면, 전술한 설명에서와 같이 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)의 유효 페이지 개수(VPC<0>)가 4이고, 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)의 유효 페이지 개수(VPC<1>)도 4일 수 있다. 또한, 컨트롤러(130)는, '설정된 개수'를 2로 설정할 수 있다. 이와 같은 경우, 컨트롤러(130)는, 두 개의 슈퍼 메모리 블록, 즉, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>) 및 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)이 모두 '설정된 개수'이하의 유효 페이지 개수를 갖는다는 것을 확인할 수 있다. 따라서, 컨트롤러(130)는, 전술한 첫 번째 방식을 사용하여, 상대적으로 더 작은 소요예측시간(PRE_TOTAL<0>)을 갖는 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 N개의 메모리 블록들 중 적어도 하나 이상의 유효 페이지를 포함하는 메모리 블록을 희생블록으로 선택한다.On the other hand, as described above, the number of valid pages (VPC<0>) of the first super memory block (SUPER BLOCK<0>) may be 4, and the number of valid pages (VPC<1>) of the second super memory block (SUPER BLOCK<1>) may also be 4. In addition, the controller (130) may set the 'set number' to 2. In this case, the controller (130) may confirm that both the first super memory block (SUPER BLOCK<0>) and the second super memory block (SUPER BLOCK<1>) have a number of valid pages less than or equal to the 'set number'. Therefore, the controller (130) selects, as a victim block, a memory block including at least one valid page among the N memory blocks included in the first super memory block (SUPER BLOCK<0>) having a relatively smaller estimated time required (PRE_TOTAL<0>).
한편, 전술한 설명과 같이 컨트롤러(130)는, 소요예측시간들(PRE_TOTAL<0, 1>)을 생성하고, 생성된 소요예측시간들(PRE_TOTAL<0, 1>)을 소요예측시간 테이블(600)로서 관리한다.Meanwhile, as described above, the controller (130) generates required predicted times (PRE_TOTAL<0, 1>) and manages the generated required predicted times (PRE_TOTAL<0, 1>) as a required predicted time table (600).
이때, 컨트롤러(130)는, 다음과 같은 두 가지 방식 중 어느 하나의 방식을 사용하여 소요예측시간들(PRE_TOTAL<0, 1>)을 업데이트(update)할 수 있다.At this time, the controller (130) can update the estimated time required (PRE_TOTAL<0, 1>) using one of the following two methods.
첫 번째 방식은, 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 유효 페이지의 개수가 가변되는 특정 메모리 블록이 발생할 때마다, 특정 메모리 블록이 그룹화된 슈퍼 메모리 블록의 소요예측시간을 업데이트할 수 있다.In the first method, the controller (130) can update the expected time required for a super memory block in which a specific memory block is grouped whenever a specific memory block with a variable number of valid pages occurs among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150).
예컨대, 도 4 및 도 7a를 함께 참조하면, 첫 번째 포그라운드 동작 또는 백그라운드 동작에 따라 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)의 유효 페이지 개수가 가변될 수 있다. 이어서, 두 번째 포그라운드 동작 또는 백그라운드 동작의 수행에 따라 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)의 유효 페이지 개수가 가변될 수 있다.For example, referring to FIG. 4 and FIG. 7A together, the number of valid pages of a first memory block (BLOCK000) of a first plane (PLANE00) of a first memory die (DIE0) may vary depending on whether a first foreground operation or a background operation is performed. Subsequently, the number of valid pages of a second memory block (BLOCK001) of a first plane (PLANE00) of the first memory die (DIE0) may vary depending on whether a second foreground operation or a background operation is performed.
이와 같은 경우, 컨트롤러(130)는, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)의 유효 페이지가 가변되는 것에 응답하여, 해당 메모리 블록(BLOCK000)이 그룹화된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)의 값을 다시 예측연산할 수 있다. 이어서, 컨트롤러(130)는, 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)의 유효 페이지 개수가 가변되는 것에 응답하여, 해당 메모리 블록(BLOCK001)이 그룹화된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)의 값을 다시 예측연산할 수 있다.In this case, the controller (130) can re-predict the value of the first estimated time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) in which the memory block (BLOCK000) is grouped in response to the change in the valid page of the first memory block (BLOCK000) of the first plane (PLANE00) of the first memory die (DIE0). Then, the controller (130) can re-predict the value of the second estimated time required (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) in which the memory block (BLOCK001) is grouped in response to the change in the number of valid pages of the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0).
두 번째 방식은, 컨트롤러(130)는, '설정된 시점'마다 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 유효 페이지의 개수가 가변된 특정 메모리 블록이 존재하는지를 확인하고, 확인결과 유효 페이지의 개수가 가변된 특정 메모리 블록이 존재하는 경우, 특정 메모리 블록이 그룹화된 슈퍼 메모리 블록의 소요예측시간을 업데이트할 수 있다.In the second method, the controller (130) checks whether there is a specific memory block among the memory blocks (MEMORY BLOCK<000, 001,...>) with a variable number of valid pages at each 'set point in time', and if the result of the check shows that there is a specific memory block with a variable number of valid pages, the controller can update the expected time required for the super memory block in which the specific memory block is grouped.
예컨대, 도 4 및 도 7a를 함께 참조하면, 제1 설정된 시점(미도시)와 제2 설정된 시점(미도시) 사이에서 연속된 적어도 두 개의 포그라운드 동작 또는 백그라운드 동작이 수행되어 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)의 유효 페이지 개수 및 두 번째 메모리 블록(BLOCK001)의 유효 페이지 개수가 가변될 수 있다.For example, referring to FIG. 4 and FIG. 7a together, at least two consecutive foreground operations or background operations may be performed between a first set point in time (not shown) and a second set point in time (not shown) so that the number of valid pages of a first memory block (BLOCK000) of a first plane (PLANE00) of a first memory die (DIE0) and the number of valid pages of a second memory block (BLOCK001) may be varied.
이와 같은 경우, 컨트롤러(130)는, 제2 설정된 시점에서 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 유효 페이지의 개수가 가변된 메모리 블록이 존재하는지 여부를 확인하고, 확인결과에 따라 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000) 및 두 번째 메모리 블록(BLOCK001) 각각의 유효 페이지 개수가 가변하였다는 것을 알 수 있다. 따라서, 컨트롤러(130)는, 제2 설정된 시점에서 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 첫 번째 메모리 블록(BLOCK000)이 그룹화된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)의 값 및 첫 번째 메모리 다이(DIE0)의 첫 번째 플래인(PLANE00)의 두 번째 메모리 블록(BLOCK001)이 그룹화된 두 번째 슈퍼 메모리 블록(SUPER BLOCK<1>)에 대응하는 두 번째 소요예측시간(PRE_TOTAL<1>)의 값을 동시에 다시 예측연산할 수 있다.In this case, the controller (130) checks whether there is a memory block among the memory blocks (MEMORY BLOCK<000, 001,...>) with a variable number of valid pages at the second set time point, and based on the check result, it can be known that the number of valid pages of each of the first memory block (BLOCK000) and the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0) has varied. Accordingly, the controller (130) can simultaneously re-predict the value of the first predicted time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) in which the first memory block (BLOCK000) of the first plane (PLANE00) of the first memory die (DIE0) is grouped at the second set time point, and the value of the second predicted time required (PRE_TOTAL<1>) corresponding to the second super memory block (SUPER BLOCK<1>) in which the second memory block (BLOCK001) of the first plane (PLANE00) of the first memory die (DIE0) is grouped.
참고로, '설정된 시점'은, 설계자에 의해 미리 정의될 수 있는 시점으로서, 설정된 크기의 데이터가 라이트될 때마다 반복되는 시점 또는 특정동작의 수행이 완료될 때마다 반복되는 시점일 수 있다.For reference, a 'set point in time' is a point in time that can be predefined by the designer, and can be a point in time that is repeated whenever data of a set size is written, or a point in time that is repeated whenever the performance of a specific operation is completed.
한편, 가비지 컬렉션이 수행되어 희생블록으로 선택된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 포함된 모든 유효 페이지가 컨트롤러(130) 내부의 메모리(144)로 전달되었다가, 타겟블록(target block)인 세 번째 슈퍼 메모리 블록(SUPER BLOCK<2>)으로 이동되면, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에는 더 이상 유효 페이지가 존재하지 않는 상태가 될 것이다. 따라서, 가비지 컬렉션 이후의 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)은 소거(erase)동작을 통해 프리(free) 슈퍼 메모리 블록이 되는 동작 이외에 무효(invalid)한 슈퍼 메모리 블록으로서 어떠한 동작에도 관여될 필요가 없다. 그런데, 컨트롤러(130)는, 가비지 컬렉션을 수행하기 이전에 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 첫 번째 소요예측시간(PRE_TOTAL<0>)을 생성하였기 때문에, 가비지 컬렉션을 수행한 이후에도 소요예측시간 테이블(600)에 그 값이 남아 있을 수 있다. 이렇게, 소요예측시간 테이블(600)에 남아있는 첫 번째 소요예측시간(PRE_TOTAL<0>)의 값으로 인해 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대해 알 수 없는 비정상적인 동작이 수행될 수 있다. 따라서, 컨트롤러(130)는, 희생블록으로 선택된 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대한 가비지 컬렉션이 수행된 이후에, 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대응하는 첫 번째 소요예측시간(PRE_TOTAL<0>)을 '예정값'으로 설정하여 첫 번째 슈퍼 메모리 블록(SUPER BLOCK<0>)에 대해 알 수 없는 비정상적인 동작이 수행되는 것을 방지한다.Meanwhile, when garbage collection is performed and all valid pages included in the first super memory block (SUPER BLOCK<0>) selected as a victim block are transferred to the memory (144) within the controller (130) and then moved to the third super memory block (SUPER BLOCK<2>), which is a target block, there will be no more valid pages in the first super memory block (SUPER BLOCK<0>). Therefore, the first super memory block (SUPER BLOCK<0>) after garbage collection does not need to be involved in any operation as an invalid super memory block other than the operation of becoming a free super memory block through an erase operation. However, since the controller (130) generates the first estimated time required (PRE_TOTAL<0>) for the first super memory block (SUPER BLOCK<0>) before performing garbage collection, its value may remain in the estimated time required table (600) even after performing garbage collection. In this way, an unknown abnormal operation may be performed for the first super memory block (SUPER BLOCK<0>) due to the value of the first estimated time required (PRE_TOTAL<0>) remaining in the estimated time required table (600). Accordingly, the controller (130) sets the first estimated time required (PRE_TOTAL<0>) corresponding to the first super memory block (SUPER BLOCK<0>) to a ‘planned value’ after garbage collection is performed on the first super memory block (SUPER BLOCK<0>) selected as the sacrifice block, thereby preventing an unknown abnormal operation from being performed on the first super memory block (SUPER BLOCK<0>).
정리하면, 컨트롤러(130)는, 특정 슈퍼 메모리 블록이 희생블록으로 선택되어 가비지 컬렉션을 통해 내부의 유효 페이지가 모두 타겟 슈퍼 메모리 블록으로 이동한 경우, 특정 슈퍼 메모리 블록이 알 수 없는 잘못된 동작을 수행할 수 없도록 특정 슈퍼 메모리 블록에 대한 소요예측시간을 '예정값'으로 설정할 수 있다.In summary, the controller (130) can set the expected time required for a specific super memory block to an 'expected value' to prevent the specific super memory block from performing an unknown erroneous operation when the specific super memory block is selected as a sacrifice block and all valid pages inside are moved to the target super memory block through garbage collection.
한편, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 프리 메모리 블록의 개수가 충분히 많은 상태이면, 가비지 컬렉션을 수행할 확률이 높지 않다. 즉, 일반적으로 가비지 컬렉션은 메모리 장치(150)에 포함된 프리 메모리 블록의 개수가 '일정 개수' 이하로 줄어들 때 수행하는 동작이다.Meanwhile, if the number of free memory blocks among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) is sufficiently large, the probability of performing garbage collection is not high. That is, garbage collection is generally an operation performed when the number of free memory blocks included in the memory device (150) is reduced below a 'certain number'.
따라서, 본 발명의 제2 실시예에 따른 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 프리 메모리 블록의 개수가 '제1 개수'이하인 구간에서 전술한 소요예측시간들(PRE_TOTAL<0, 1>)을 생성 및 관리한다. 물론, 컨트롤러(130)는, 메모리 장치(150)에 포함된 메모리 블록들(MEMORY BLOCK<000, 001,...>) 중 프리 메모리 블록의 개수가 '제1 개수'보다 큰 '제2 개수' 이상인 구간에서 소요예측시간들(PRE_TOTAL<0, 1>)을 생성 및 관리하지 않는다.Accordingly, the controller (130) according to the second embodiment of the present invention generates and manages the aforementioned required predicted times (PRE_TOTAL<0, 1>) in a section where the number of free memory blocks among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) is equal to or less than the 'first number'. Of course, the controller (130) does not generate and manage the required predicted times (PRE_TOTAL<0, 1>) in a section where the number of free memory blocks among the memory blocks (MEMORY BLOCK<000, 001,...>) included in the memory device (150) is equal to or greater than the 'second number' which is greater than the 'first number'.
참고로, '제1 개수'는, 일반적인 가비지 컬렉션 동작의 트리거(trigger) 시점을 결정하기 위한 '일정 개수'와는 다르게 설정될 수 있다. 예컨대, '제1 개수'보다 '일정 개수'가 더 작을 수 있다.Note that the 'first number' may be set differently from the 'schedule number' used to determine the trigger point of a general garbage collection operation. For example, the 'schedule number' may be smaller than the 'first number'.
이상에서 설명한 본 발명은 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하다는 것이 본 발명이 속한 기술분야에서 통상의 지식을 가진자에게 있어 명백할 것이다.The present invention described above is not limited to the above-described embodiments and the attached drawings, and it will be apparent to a person skilled in the art to which the present invention pertains that various substitutions, modifications, and changes are possible within a scope that does not depart from the technical spirit of the present invention.
Claims (20)
상기 블록들 중 병렬리드가 가능한 N개의 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼블록들로서 관리하고, 가비지 컬렉션(garbage collection)을 위해 상기 블록들에서 유효(valid) 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들을 생성하며, 상기 소요예측시간들을 참조하여 상기 블록들 중 상기 가비지 컬렉션을 위한 희생(victim)블록을 선택하는 컨트롤러를 포함하며,
상기 컨트롤러는,
상기 블록들 중 프리(free)블록의 개수가, 제1 개수 이하인 구간에서 상기 소요예측시간들을 생성 및 관리하고, 상기 제1 개수보다 큰 제2 개수 이상인 구간에서 상기 소요예측시간들을 관리하지 않으며, N은 2이상의 자연수인 메모리 시스템.
A nonvolatile memory device comprising a plurality of pages, each page including a plurality of memory cells, a plurality of blocks, each page including the pages, a plurality of planes, each page including the blocks, and a plurality of dies, each page including the planes, and including page buffers for catching data output from the blocks in units of pages;
A controller is included that groups N blocks among the above blocks that can be read in parallel according to set conditions and manages them as a plurality of super blocks, generates predicted times by calculating the time required to extract valid data from the blocks for garbage collection in units of super blocks, and selects a victim block for the garbage collection among the blocks with reference to the predicted times.
The above controller,
A memory system that generates and manages the predicted times required in a section where the number of free blocks among the above blocks is equal to or less than a first number, and does not manage the predicted times required in a section where the number of free blocks among the above blocks is equal to or greater than a second number greater than the first number, and where N is a natural number greater than or equal to 2.
상기 컨트롤러는,
상기 슈퍼블록들 중 제1 슈퍼블록에 그룹화된 N개의 블록 각각에서 동일한 위치의 페이지에 대해서만 병렬리드가 가능한 경우, N개의 블록 각각의 유효 페이지 개수를 모두 합한 제1 개수에서 제1 슈퍼블록에 그룹화된 N개의 블록에서 위치가 동일한 유효 페이지의 개수를 뺀 개수에 리드예측시간을 곱한 제1 시간과, 상기 제1 개수에 전송예측시간을 곱한 제2 시간을 계산한 뒤, 상기 제1 시간과 상기 제2 시간을 더하여 상기 제1 슈퍼블록에 대응하는 소요예측시간을 생성하며, 상기 제1 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하고,
상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고,
상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간인 메모리 시스템.
In the first paragraph,
The above controller,
In the case where parallel reading is possible only for pages in the same position in each of the N blocks grouped in the first superblock among the above superblocks, a first time is calculated by multiplying a read prediction time by a first number obtained by subtracting the number of valid pages in the same position in the N blocks grouped in the first superblock from a first number obtained by adding all the numbers of valid pages in each of the N blocks, and a second time is calculated by multiplying the first number by a transmission prediction time, and then adding the first time and the second time to generate a required predicted time corresponding to the first superblock, and applying the required predicted time generation method applied to the first superblock to each of the above superblocks to generate the required predicted times,
The above lead prediction time is the time predicted to be taken to cache the data of the above blocks in the above page buffers.
The above transmission prediction time is a memory system that predicts the time it will take to transmit data cached in the page buffers to the controller.
상기 컨트롤러는,
상기 슈퍼블록들 중 제2 슈퍼블록에 그룹화된 N개의 블록 각각에서 서로 다른 위치에 페이지에 대해서 병렬리드가 가능한 경우, N개의 블록 각각의 유효 페이지 개수 중 가장 큰 개수에 리드예측시간을 곱한 제3 시간과, N개의 블록 각각의 유효 페이지 개수를 모두 합한 개수에 전송예측시간을 곱한 제4 시간을 계산한 뒤, 상기 제3 시간과 상기 제4 시간을 더하여 상기 제2 슈퍼블록에 대응하는 소요예측시간을 생성하며, 상기 제2 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하고,
상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고,
상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간인 메모리 시스템.
In the first paragraph,
The above controller,
In the case where parallel reading is possible for pages at different locations in each of the N blocks grouped in the second superblock among the above superblocks, a third time is calculated by multiplying the read prediction time by the largest number of valid pages of each of the N blocks, and a fourth time is calculated by multiplying the transmission prediction time by the sum of the valid pages of each of the N blocks, and then the third time and the fourth time are added to generate the required predicted times corresponding to the second superblock, and the required predicted times are generated by applying the method of generating the required predicted times applied to the second superblock to each of the above superblocks,
The above lead prediction time is the time predicted to be taken to cache the data of the above blocks in the above page buffers.
The above transmission prediction time is a memory system that predicts the time it will take to transmit data cached in the page buffers to the controller.
상기 컨트롤러는,
상기 블록들 중 유효 페이지의 개수가 가변되는 블록이 발생할 때마다, 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산하는 메모리 시스템.
In the first paragraph,
The above controller,
A memory system that re-predicts the value of the required prediction time corresponding to the superblock in which the blocks with the variable number of valid pages are grouped whenever a block with a variable number of valid pages occurs among the above blocks.
상기 컨트롤러는,
설정된 시점마다 상기 블록들 중 유효 페이지의 개수가 가변된 블록이 존재하는지 확인하고, 확인결과 존재하는 경우 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산하는 메모리 시스템.
In the first paragraph,
The above controller,
A memory system that checks whether there is a block with a variable number of valid pages among the above blocks at each set point in time, and if there is a block with a variable number of valid pages among the above blocks, re-predicts the value of the expected time corresponding to the superblock in which the blocks with a variable number of valid pages are grouped.
상기 컨트롤러는,
상기 소요예측시간들 중 상대적으로 가장 작은 값의 소요예측시간에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택하는 메모리 시스템.
In the first paragraph,
The above controller,
A memory system that selects a block including at least one valid page among N blocks grouped in a superblock corresponding to a relatively smallest predicted time among the above predicted times as the sacrifice block.
상기 컨트롤러는,
상기 슈퍼블록들 각각에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합친 개수가 설정된 개수 이하인 슈퍼블록이,
1개인 경우, 선택된 1개의 슈퍼블록에 그룹화된 N개의 블록을 상기 희생블록으로 선택하고,
적어도 두 개 이상인 경우, 적어도 두 개 이상의 슈퍼블록에 대응하는 적어도 두 개 이상의 소요예측시간의 값 중 상대적으로 가장 작은 값에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택하는 메모리 시스템.
In the first paragraph,
The above controller,
A superblock in which the sum of the number of valid pages of each of the N blocks grouped in each of the above superblocks is less than or equal to a set number,
In case of 1, select N blocks grouped in 1 selected superblock as the sacrifice block,
A memory system for selecting, as the victim block, a block including at least one valid page among N blocks grouped in a superblock corresponding to a relatively smallest value among the values of at least two or more required prediction times corresponding to at least two or more superblocks, when there are at least two or more.
상기 컨트롤러는,
상기 슈퍼블록들 중 제3 슈퍼블록에 그룹화된 N개의 블록이 상기 희생블록으로 선택되어 상기 가비지 컬렉션을 통해 모든 유효 데이터가 타겟블록(target block)으로 이동된 경우, 상기 제3 슈퍼블록에 대응하는 소요예측시간을 예정값으로 설정하는 메모리 시스템.
In the first paragraph,
The above controller,
A memory system that sets the expected time corresponding to the third superblock to a target value when N blocks grouped in the third superblock among the above superblocks are selected as the sacrifice blocks and all valid data is moved to the target block through the garbage collection.
상기 다이들 중 제1 다이는 제1 채널(channel)에 연결되고, 상기 다이들 중 제2 다이는 제2 채널에 연결되며, 상기 제1 다이에 포함된 플래인들은 상기 제1 채널을 공유하는 다수의 제1 경로(way)에 연결되고, 상기 제2 다이에 포함된 플래인들은 상기 제2 채널을 공유하는 다수의 제2 경로에 연결되며,
상기 컨트롤러는,
상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록을 그룹화하는 것, 및 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 상기 설정된 조건에 포함시키거나, 또는
상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록을 그룹화하는 것, 및 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 상기 설정된 조건에 포함시키거나, 또는
상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 상기 설정된 조건에 포함시키는 메모리 시스템.
In the first paragraph,
A first die among the dies is connected to a first channel, a second die among the dies is connected to a second channel, planes included in the first die are connected to a plurality of first ways sharing the first channel, and planes included in the second die are connected to a plurality of second ways sharing the second channel.
The above controller,
Including in the set condition grouping a first block included in the first plane of the first die and a second block included in the second plane of the first die, and grouping a third block included in the third plane of the second die and a fourth block included in the fourth plane of the second die, or
Including in the set condition grouping a first block included in the first plane of the first die and a third block included in the third plane of the second die, and grouping a second block included in the second plane of the first die and a fourth block included in the fourth plane of the second die, or
A memory system including in the set condition grouping a first block included in a first plane of the first die, a second block included in a second plane of the first die, a third block included in a third plane of the second die, and a fourth block included in a fourth plane of the second die.
상기 블록들 중 병렬리드가 가능한 N개의 블록을 설정된 조건에 따라 그룹화하여 다수의 슈퍼블록들로서 관리하는 단계;
가비지 컬렉션(garbage collection)을 위해 상기 블록들에서 유효(valid) 데이터를 추출할 때 필요한 소요시간을 슈퍼블록단위로 예측연산한 소요예측시간들을 생성하는 생성단계; 및
상기 소요예측시간들을 참조하여 상기 블록들 중 상기 가비지 컬렉션을 위한 희생(victim)블록을 선택하는 선택단계를 포함하며,
상기 생성단계는,
상기 블록들 중 프리(free)블록의 개수가 제1 개수 이하인 구간에서 상기 소요예측시간들을 생성 및 관리하는 단계; 및
상기 블록들 중 프리블록의 개수가 상기 제1 개수보다 큰 제2 개수 이상인 구간에서 상기 소요예측시간들을 관리하지 않는 단계를 포함하며, N은 2이상의 자연수인 메모리 시스템의 동작방법.
A method of operating a memory system including a controller and a nonvolatile memory device including a plurality of pages each including a plurality of memory cells, a plurality of blocks each including the pages, a plurality of planes each including the blocks, and a plurality of dies each including the planes, and including page buffers for catching data output from the blocks in units of pages,
A step of grouping N blocks among the above blocks capable of parallel reading according to set conditions and managing them as a plurality of super blocks;
A generation step for generating predicted times by predicting the time required to extract valid data from the above blocks for garbage collection in units of superblocks; and
It includes a selection step of selecting a victim block for the garbage collection among the blocks by referring to the above-mentioned estimated times,
The above generation steps are:
A step of generating and managing the required predicted times in a section where the number of free blocks among the above blocks is less than or equal to a first number; and
A method of operating a memory system, comprising a step of not managing the required predicted times in a section in which the number of free blocks among the above blocks is a second number or greater than the first number, and N is a natural number greater than or equal to 2.
상기 슈퍼블록들 중 제1 슈퍼블록에 그룹화된 N개의 블록 각각에서 동일한 위치의 페이지에 대해서만 병렬리드가 가능한 경우, 상기 생성단계는,
상기 제1 슈퍼블록에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합한 제1 개수에서 상기 제1 슈퍼블록에 그룹화된 N개의 블록에서 위치가 동일한 유효 페이지의 개수를 뺀 개수에 리드예측시간을 곱한 제1 시간을 계산하는 단계;
상기 제1 개수에 전송예측시간을 곱한 제2 시간을 계산하는 단계;
상기 제1 시간과 상기 제2 시간을 더하여 상기 제1 슈퍼블록에 대응하는 소요예측시간을 생성하는 단계; 및
상기 제1 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하는 단계를 포함하며,
상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고, 상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간인 메모리 시스템의 동작방법.
In Article 11,
If parallel reading is possible only for pages at the same location in each of the N blocks grouped in the first superblock among the above superblocks, the generation step is
A step of calculating a first time by multiplying a first number obtained by adding the number of valid pages of each of the N blocks grouped in the first superblock to a number obtained by subtracting the number of valid pages having the same location in the N blocks grouped in the first superblock, by the read prediction time;
A step of calculating a second time by multiplying the transmission prediction time by the first number;
A step of generating a required predicted time corresponding to the first superblock by adding the first time and the second time; and
A step of generating the predicted times required by applying the method of generating the predicted times required applied to the first superblock to each of the superblocks is included.
The above read prediction time is the time predicted to be taken to cache data of the blocks in the page buffers, and the above transfer prediction time is the time predicted to be taken to transmit data cached in the page buffers to the controller. The operation method of the memory system.
상기 슈퍼블록들 중 제2 슈퍼블록에 그룹화된 N개의 블록 각각에서 서로 다른 위치에 페이지에 대해서 병렬리드가 가능한 경우, 상기 생성단계는,
상기 제2 슈퍼블록에 그룹화된 N개의 블록 각각의 유효 페이지 개수 중 가장 큰 개수에 리드예측시간을 곱한 제3 시간을 계산하는 단계;
상기 제2 슈퍼블록에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합한 개수에 전송예측시간을 곱한 제4 시간을 계산하는 단계;
상기 제3 시간과 상기 제4 시간을 더하여 상기 제2 슈퍼블록에 대응하는 소요예측시간을 생성하는 단계; 및
상기 제2 슈퍼블록에 적용한 소요예측시간의 생성방법을 상기 슈퍼블록들 각각에 적용하여 상기 소요예측시간들을 생성하는 단계를 포함하며,
상기 리드예측시간은, 상기 블록들의 데이터를 상기 페이지버퍼들에 캐싱하는데 걸릴 것으로 예측하는 시간이고, 상기 전송예측시간은, 상기 페이지버퍼들에 캐싱된 데이터를 상기 컨트롤러로 전송하는데 걸릴 것으로 예측하는 시간인 메모리 시스템의 동작방법.
In Article 11,
If parallel reading is possible for pages at different locations in each of the N blocks grouped in the second superblock among the above superblocks, the generation step is
A third step of calculating a third time by multiplying the largest number of valid pages of each of the N blocks grouped in the second superblock by the read prediction time;
A fourth time step of calculating the transmission prediction time multiplied by the sum of the number of valid pages of each of the N blocks grouped in the second superblock;
A step of generating a required predicted time corresponding to the second superblock by adding the third time and the fourth time; and
It includes a step of generating the predicted time required by applying the method of generating the predicted time required applied to the second superblock to each of the superblocks,
The above read prediction time is the time predicted to be taken to cache data of the blocks in the page buffers, and the above transfer prediction time is the time predicted to be taken to transmit data cached in the page buffers to the controller. The operation method of the memory system.
상기 블록들 중 유효 페이지의 개수가 가변되는 블록이 발생할 때마다, 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산하는 단계를 더 포함하는 메모리 시스템의 동작방법.
In Article 11,
A method of operating a memory system further comprising the step of re-predicting the value of the required prediction time corresponding to the superblock in which the block with the variable number of valid pages is grouped whenever a block with a variable number of valid pages occurs among the above blocks.
설정된 시점마다 상기 블록들 중 유효 페이지의 개수가 가변된 블록이 존재하는지 확인하고, 확인결과 존재하는 경우 유효 페이지의 개수가 가변된 블록이 그룹화된 슈퍼블록에 대응하는 소요예측시간의 값을 다시 예측연산하는 단계를 더 포함하는 메모리 시스템의 동작방법.
In Article 11,
An operating method of a memory system further comprising the step of checking whether there is a block among the blocks with a variable number of valid pages at each set time point, and, if there is a block among the blocks, re-predicting the value of the required predicted time corresponding to the superblock in which the block with a variable number of valid pages is grouped.
상기 선택단계는,
상기 소요예측시간들 중 상대적으로 가장 작은 값의 소요예측시간에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택하는 것을 특징으로 하는 메모리 시스템의 동작방법.
In Article 11,
The above selection step is,
An operating method of a memory system, characterized in that a block including at least one valid page among N blocks grouped in a superblock corresponding to a relatively smallest predicted time among the above predicted times required is selected as the sacrifice block.
상기 선택단계는,
상기 슈퍼블록들 각각에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합친 개수가 설정된 개수 이하인 슈퍼블록이 1개인 경우, 선택된 1개의 슈퍼블록에 그룹화된 N개의 블록을 상기 희생블록으로 선택하는 단계; 및
상기 슈퍼블록들 각각에 그룹화된 N개의 블록 각각의 유효 페이지 개수를 모두 합친 개수가 설정된 개수 이하인 슈퍼블록이 적어도 두 개 이상인 경우, 적어도 두 개 이상의 슈퍼블록에 대응하는 적어도 두 개 이상의 소요예측시간의 값 중 상대적으로 가장 작은 값에 대응하는 슈퍼블록에 그룹화된 N개의 블록 중 적어도 하나 이상의 유효 페이지를 포함하는 블록을 상기 희생블록으로 선택하는 단계를 포함하는 메모리 시스템의 동작방법.
In Article 11,
The above selection step is,
A step of selecting N blocks grouped in one selected superblock as the victim block, if there is one superblock in which the sum of the number of valid pages of each of N blocks grouped in each of the above superblocks is less than or equal to a set number; and
A method of operating a memory system, comprising the step of selecting, as the victim block, a block including at least one valid page among the N blocks grouped in a superblock corresponding to a relatively smallest value among the values of the required predicted time corresponding to the at least two or more superblocks, when there are at least two superblocks in which the sum of the numbers of valid pages of each of the N blocks grouped in each of the above superblocks is less than or equal to a set number.
상기 슈퍼블록들 중 제3 슈퍼블록에 그룹화된 N개의 블록이 상기 희생블록으로 선택되어 상기 가비지 컬렉션을 통해 모든 유효 데이터가 타겟블록(target block)으로 이동된 경우, 상기 제3 슈퍼블록에 대응하는 소요예측시간을 예정값으로 설정하는 단계를 더 포함하는 메모리 시스템의 동작방법.
In Article 11,
A method of operating a memory system further comprising the step of setting a predicted time corresponding to the third superblock to a target value when N blocks grouped in a third superblock among the above superblocks are selected as the sacrifice blocks and all valid data is moved to the target block through the garbage collection.
상기 다이들 중 제1 다이는 제1 채널(channel)에 연결되고, 상기 다이들 중 제2 다이는 제2 채널에 연결되며, 상기 제1 다이에 포함된 플래인들은 상기 제1 채널을 공유하는 다수의 제1 경로(way)에 연결되고, 상기 제2 다이에 포함된 플래인들은 상기 제2 채널을 공유하는 다수의 제2 경로에 연결되며,
상기 설정된 조건은,
상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록을 그룹화하는 것, 및 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 포함하거나, 또는
상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록을 그룹화하는 것, 및 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 포함하거나, 또는
상기 제1 다이의 제1 플래인에 포함된 제1 블록과 상기 제1 다이의 제2 플래인에 포함된 제2 블록과 상기 제2 다이의 제3 플래인에 포함된 제3 블록과 상기 제2 다이의 제4 플래인에 포함된 제4 블록을 그룹화하는 것을 포함하는 메모리 시스템의 동작방법.In Article 11,
A first die among the dies is connected to a first channel, a second die among the dies is connected to a second channel, planes included in the first die are connected to a plurality of first ways sharing the first channel, and planes included in the second die are connected to a plurality of second ways sharing the second channel.
The conditions set above are:
Grouping a first block included in a first plane of the first die and a second block included in a second plane of the first die, and grouping a third block included in a third plane of the second die and a fourth block included in a fourth plane of the second die, or
Grouping a first block included in a first plane of the first die and a third block included in a third plane of the second die, and grouping a second block included in a second plane of the first die and a fourth block included in a fourth plane of the second die, or
An operating method of a memory system, comprising grouping a first block included in a first plane of the first die, a second block included in a second plane of the first die, a third block included in a third plane of the second die, and a fourth block included in a fourth plane of the second die.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/502,964 US11030094B2 (en) | 2018-07-31 | 2019-07-03 | Apparatus and method for performing garbage collection by predicting required time |
CN201910695645.4A CN110781096B (en) | 2018-07-31 | 2019-07-30 | Apparatus and method for performing garbage collection by predicting demand time |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR20180089400 | 2018-07-31 | ||
KR1020180089400 | 2018-07-31 |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20200014175A KR20200014175A (en) | 2020-02-10 |
KR102750797B1 true KR102750797B1 (en) | 2025-01-09 |
Family
ID=69627401
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180167583A Active KR102750797B1 (en) | 2018-07-31 | 2018-12-21 | Apparatus and method for performing garbage collection to predicting required time |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102750797B1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102701111B1 (en) | 2020-08-18 | 2024-09-02 | 에스케이하이닉스 주식회사 | Memory controller and operating method thereof |
KR20220041593A (en) | 2020-09-25 | 2022-04-01 | 에스케이하이닉스 주식회사 | Memory controller and operating method thereof |
KR20230168908A (en) | 2022-06-08 | 2023-12-15 | 에스케이하이닉스 주식회사 | Computing system and operating method thereof |
CN118778908A (en) * | 2024-09-11 | 2024-10-15 | 晶存阵列(上海)科技有限公司 | A virtual block management method and storage device using the method |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4362549B1 (en) * | 2006-08-04 | 2009-11-11 | サンディスク コーポレイション | Gradual garbage collection |
KR102653401B1 (en) * | 2016-07-18 | 2024-04-03 | 에스케이하이닉스 주식회사 | Memory system and operation method for the same |
-
2018
- 2018-12-21 KR KR1020180167583A patent/KR102750797B1/en active Active
Also Published As
Publication number | Publication date |
---|---|
KR20200014175A (en) | 2020-02-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11030094B2 (en) | Apparatus and method for performing garbage collection by predicting required time | |
KR102763921B1 (en) | Memory system and operating method thereof | |
US10860231B2 (en) | Memory system for adjusting map segment based on pattern and operating method thereof | |
US10817418B2 (en) | Apparatus and method for checking valid data in memory system | |
KR102691776B1 (en) | Apparatus and method for providing multi-stream operation in memory system | |
US20140281173A1 (en) | Nonvolatile memory system, system including the same, and method of adaptively adjusting user storage region in the same | |
US10963160B2 (en) | Apparatus and method for checking valid data in block capable of storing large volume data in memory system | |
KR20200068941A (en) | Apparatus and method for controlling data stored in memory system | |
KR102721567B1 (en) | Memory system for migration operation and operating method thereof | |
KR102750797B1 (en) | Apparatus and method for performing garbage collection to predicting required time | |
KR102559549B1 (en) | Apparatus and method for managing block status in memory system | |
KR102692901B1 (en) | Apparatus and method for erasing data programmed in non-volatile memory block in memory system | |
KR20210003625A (en) | Controller, memory system having the same and operating method thereof | |
KR20210157537A (en) | Memory system and operationg method thereof | |
KR20200132047A (en) | Apparatus and method for transmitting map information in memory system | |
KR102772782B1 (en) | Memory system, data processing system and method for operation the same | |
KR20210012641A (en) | Memory system, data processing system and method for operation the same | |
CN115543860A (en) | Data processing system and method of operation thereof | |
KR20210045114A (en) | Memory system for efficiently manage memory block and method operation thereof | |
US20220391093A1 (en) | Memory system, data processing system including the same, and operating method thereof | |
KR20220159270A (en) | Storage device and operating method thereof | |
US11657000B2 (en) | Controller and memory system including the same | |
KR102837223B1 (en) | Apparatus and method for handling different types of data in memory system | |
KR102835523B1 (en) | Memory system, data processing system and method for operation the same | |
KR102736062B1 (en) | A memory system and a data processing system for distributed storing received data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20181221 |
|
PG1501 | Laying open of application | ||
PA0201 | Request for examination |
Patent event code: PA02012R01D Patent event date: 20211202 Comment text: Request for Examination of Application Patent event code: PA02011R01I Patent event date: 20181221 Comment text: Patent Application |
|
E902 | Notification of reason for refusal | ||
PE0902 | Notice of grounds for rejection |
Comment text: Notification of reason for refusal Patent event date: 20240821 Patent event code: PE09021S01D |
|
E701 | Decision to grant or registration of patent right | ||
PE0701 | Decision of registration |
Patent event code: PE07011S01D Comment text: Decision to Grant Registration Patent event date: 20241202 |
|
PG1601 | Publication of registration |