KR102575380B1 - Memory control method and apparatus for efficient cache replacement - Google Patents
Memory control method and apparatus for efficient cache replacement Download PDFInfo
- Publication number
- KR102575380B1 KR102575380B1 KR1020210048625A KR20210048625A KR102575380B1 KR 102575380 B1 KR102575380 B1 KR 102575380B1 KR 1020210048625 A KR1020210048625 A KR 1020210048625A KR 20210048625 A KR20210048625 A KR 20210048625A KR 102575380 B1 KR102575380 B1 KR 102575380B1
- Authority
- KR
- South Korea
- Prior art keywords
- memory control
- block
- reference block
- cache
- replacement candidate
- Prior art date
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/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1027—Address translation using associative or pseudo-associative address translation means, e.g. translation look-aside buffer [TLB]
-
- 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/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/12—Replacement control
- G06F12/121—Replacement control using replacement algorithms
- G06F12/123—Replacement control using replacement algorithms with age lists, e.g. queue, most recently used [MRU] list or least recently used [LRU] list
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/60—Details of cache memory
- G06F2212/6024—History based prefetching
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/60—Details of cache memory
- G06F2212/6032—Way prediction in set-associative cache
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
효율적인 캐시 교체를 위한 메모리 제어 방법 및 장치가 개시된다. 메모리 제어 방법은 특정 시점까지의 참조 블록들로 구성된 제1 길이의 입력 시퀀스를 참조 블록 예측 모델에 입력하는 단계; 상기 참조 블록 예측 모델로부터 상기 특정 시점 이후의 참조 블록들을 예측하기 위한 델타들로 구성된 제2 길이의 출력 시퀀스를 식별하는 단계; 상기 식별된 출력 시퀀스와 직전 시점의 참조 블록을 이용하여 상기 특정 시점 이후에 참조될 가능성이 있는 참조 블록을 예측하는 단계; 및 상기 특정 시점 이후에 참조될 가능성이 있는 것으로 예측된 참조 블록을 예측 버퍼에 저장하는 단계를 포함할 수 있다.A memory control method and apparatus for efficient cache replacement are disclosed. The memory control method includes inputting an input sequence having a first length composed of reference blocks up to a specific point in time to a reference block prediction model; identifying an output sequence of a second length consisting of deltas for predicting reference blocks after the specific point in time from the reference block prediction model; predicting a reference block that is likely to be referenced after the specific point in time using the identified output sequence and a reference block of an immediately preceding point in time; and storing a reference block predicted to be likely to be referenced after the specific point in time in a prediction buffer.
Description
본 발명은 효율적인 캐시 교체를 위한 메모리 제어 방법 및 장치에 관한 것으로, 보다 구체적으로는 과거의 참조 블록을 기반으로 미래에 이용될 가능성이 있는 참조 블록을 예측함으로써 효율적인 캐시 교체 방법을 제공하는 메모리 제어 방법 및 장치에 관한 것이다.The present invention relates to a memory control method and apparatus for efficient cache replacement, and more particularly, to a memory control method that provides an efficient cache replacement method by predicting a reference block likely to be used in the future based on a past reference block. and devices.
제한적인 메모리 스토리지 디바이스인 캐시를 효율적으로 활용하기 위해서 캐시 관리는 필수적이다. 그중 캐시 교체 정책이 존재하는데 기존 캐시 교체 정책은 미래의 블록 참조 패턴을 알지 못해 미래에 참조될 블록을 제거하여 캐시 유용성을 보장할 수 없다.Cache management is essential to efficiently utilize the cache, which is a limited memory storage device. Among them, there is a cache replacement policy, but the existing cache replacement policy cannot guarantee cache usefulness by removing blocks to be referred to in the future because it does not know future block reference patterns.
이에 대해 머신 러닝은 과거의 블록 참조 패턴을 학습하여 미래의 블록 참조 패턴을 예측할 수 있으며, 이전에도 머신 러닝으로 접근한 사례가 존재한다. 그러나 이러한 이전의 사례들은 단지 미래의 블록 참조 패턴을 예측할 뿐 실제 미래에 참조될 블록 자체를 예측하지는 못한다는 한계가 있다.In contrast, machine learning can predict future block reference patterns by learning past block reference patterns, and there have been cases where machine learning has been approached before. However, these previous examples only predict future block reference patterns, but have limitations in that they do not predict the blocks themselves to be actually referenced in the future.
본 발명은 Sequence-to-Sequence 기반의 참조 블록 예측 모델을 통해 과거의 참조 블록을 이용하여 미래에 이용될 가능성이 있는 참조 블록을 예측함으로써 효율적인 캐시 교체 방법을 제공하는 메모리 제어 방법 및 장치를 제공한다.The present invention provides a memory control method and apparatus for providing an efficient cache replacement method by predicting a reference block likely to be used in the future using a past reference block through a sequence-to-sequence based reference block prediction model. .
본 발명의 일실시예에 따른 메모리 제어 방법은 특정 시점까지의 참조 블록들로 구성된 제1 길이의 입력 시퀀스를 참조 블록 예측 모델에 입력하는 단계; 상기 참조 블록 예측 모델로부터 상기 특정 시점 이후의 참조 블록들을 예측하기 위한 델타들로 구성된 제2 길이의 출력 시퀀스를 식별하는 단계; 상기 식별된 출력 시퀀스와 직전 시점의 참조 블록을 이용하여 상기 특정 시점 이후에 참조될 가능성이 있는 참조 블록을 예측하는 단계; 및 상기 특정 시점 이후에 참조될 가능성이 있는 것으로 예측된 참조 블록을 예측 버퍼에 저장하는 단계를 포함할 수 있다.A memory control method according to an embodiment of the present invention includes inputting an input sequence having a first length composed of reference blocks up to a specific point in time to a reference block prediction model; identifying an output sequence of a second length consisting of deltas for predicting reference blocks after the specific point in time from the reference block prediction model; predicting a reference block that is likely to be referenced after the specific point in time using the identified output sequence and a reference block of an immediately preceding point in time; and storing a reference block predicted to be likely to be referenced after the specific point in time in a prediction buffer.
상기 출력 시퀀스는 상기 입력 시퀀스를 구성하는 인접한 참조 블록들 사이의 차이를 이용하여 결정될 수 있다.The output sequence may be determined using differences between adjacent reference blocks constituting the input sequence.
상기 예측하는 단계는 상기 식별된 출력 시퀀스의 델타와 상기 델타의 직전 시점에 대한 참조 블록을 합산함으로써 상기 델타에 대응하는 시점에서 참조될 가능성이 있는 참조 블록을 예측할 수 있다.In the predicting step, a reference block that is likely to be referred to at a point in time corresponding to the delta may be predicted by adding the identified delta of the output sequence and a reference block for a point in time immediately before the delta.
상기 제1 길이의 입력 시퀀스는 상기 예측 버퍼가 비어 있는 경우, 실제 참조가 수행된 참조 블록에 대한 정보를 저장하고 있는 히스토리 블록(History block)의 리스트를 이용하여 결정될 수 있다.When the prediction buffer is empty, the input sequence of the first length may be determined using a list of history blocks storing information on a reference block to which actual reference is performed.
상기 제1 길이의 입력 시퀀스는 상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이 보다 짧은 경우, 상기 예측 버퍼에 저장된 참조 블록 및 상기 히스토리 블록에 포함된 참조 블록을 연결하여 결정될 수 있다.The input sequence having the first length may be determined by connecting a reference block stored in the prediction buffer and a reference block included in the history block when the number of reference blocks stored in the prediction buffer is shorter than the first length of the input sequence. there is.
상기 제1 길이의 입력 시퀀스는 상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이를 충족하는 경우, 상기 예측 버퍼에 저장된 참조 블록을 이용하여 결정될 수 있다.The input sequence having the first length may be determined using the reference block stored in the prediction buffer when the number of reference blocks stored in the prediction buffer satisfies the first length of the input sequence.
상기 제1 길이의 입력 시퀀스는 특정 시점까지의 참조 블록들이 시간 순서대로 정렬될 수 있다.In the input sequence having the first length, reference blocks up to a specific point in time may be arranged in chronological order.
본 발명의 일실시예에 따른 메모리 제어 방법은 캐시 내 여유 공간이 없는 상황에서 신규 참조 블록이 상기 캐시 내에 존재하지 않는 경우, 상기 캐시 내에 존재하는 참조 블록들 중 가장 오랫동안 참조되지 않은 참조 블록을 교체 후보 블록으로 선택하는 단계; 상기 선택된 교체 후보 블록이 예측 버퍼 내에 존재하는 지 여부에 따라 상기 선택된 교체 후보 블록의 제거 여부를 판단하는 단계; 및 상기 선택된 교체 후보 블록을 제거하는 것으로 판단된 경우, 상기 선택된 교체 후보 블록을 제거하고, 상기 신규 참조 블록을 상기 캐시에 추가하는 단계를 포함할 수 있다.In the memory control method according to an embodiment of the present invention, when a new reference block does not exist in the cache in a situation where there is no free space in the cache, a reference block that has not been referenced for a long time among reference blocks existing in the cache is replaced. selecting as a candidate block; determining whether to remove the selected replacement candidate block according to whether the selected replacement candidate block exists in a prediction buffer; and removing the selected replacement candidate block and adding the new reference block to the cache when it is determined that the selected replacement candidate block is to be removed.
상기 판단하는 단계는 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하지 않는 경우, 상기 선택된 교체 후보 블록을 제거하는 것으로 판단하고, 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하는 경우, 상기 선택된 교체 후보 블록을 제거하지 않는 것으로 판단할 수 있다.In the step of determining, if the selected replacement candidate block does not exist in the prediction buffer, it is determined that the selected replacement candidate block is removed, and if the selected replacement candidate block exists in the prediction buffer, the selected replacement candidate block is determined to be removed. It can be determined that the block is not removed.
상기 판단하는 단계는 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하여 제거하지 않는 것으로 판단된 경우, 상기 캐시 내에 존재하는 참조 블록들 중 다음으로 우선 순위를 가지는 참조 블록에 대해 제거 여부를 판단할 수 있다.In the determining step, when it is determined that the selected replacement candidate block exists in the prediction buffer and is not to be removed, it is possible to determine whether to remove a reference block having a next priority among reference blocks existing in the cache. there is.
상기 캐시 내에 존재하는 참조 블록들은 LRU(Least Recently Used) 방식에 따라 저장되고, 상기 캐시에 추가하는 단계는 상기 신규 참조 블록을 상기 캐시의 MRU(Most Recently Used) 위치에 저장할 수 있다.Reference blocks existing in the cache are stored according to a Least Recently Used (LRU) method, and the adding to the cache may store the new reference block in a Most Recently Used (MRU) position of the cache.
상기 예측 버퍼의 크기는 상기 캐시의 크기와 동일할 수 있다.The size of the prediction buffer may be the same as the size of the cache.
본 발명의 일실시예에 따른 메모리 제어 장치는, 프로세서를 포함하고, 상기 프로세서는 특정 시점까지의 참조 블록들로 구성된 제1 길이의 입력 시퀀스를 참조 블록 예측 모델에 입력하고, 상기 참조 블록 예측 모델로부터 상기 특정 시점 이후의 참조 블록들을 예측하기 위한 델타들로 구성된 제2 길이의 출력 시퀀스를 식별하며, 상기 식별된 출력 시퀀스와 직전 시점의 참조 블록을 이용하여 상기 특정 시점 이후에 참조될 가능성이 있는 참조 블록을 예측하고, 상기 특정 시점 이후에 참조될 가능성이 있는 것으로 예측된 참조 블록을 예측 버퍼에 저장할 수 있다.A memory control apparatus according to an embodiment of the present invention includes a processor, wherein the processor inputs an input sequence having a first length composed of reference blocks up to a specific point in time to a reference block prediction model, and the reference block prediction model Identifying an output sequence of a second length composed of deltas for predicting reference blocks after the specific point in time from, and having a possibility of being referenced after the specific point in time using the identified output sequence and the reference block of the immediately preceding point in time A reference block may be predicted, and a reference block predicted to be likely to be referenced after the specific point in time may be stored in a prediction buffer.
상기 출력 시퀀스는 상기 입력 시퀀스를 구성하는 인접한 참조 블록들의 차이를 이용하여 결정될 수 있다.The output sequence may be determined using differences between adjacent reference blocks constituting the input sequence.
상기 프로세서는 상기 식별된 출력 시퀀스의 델타와 상기 델타의 직전 시점에 대한 참조 블록을 합산함으로써 상기 델타에 대응하는 시점에서 참조될 가능성이 있는 참조 블록을 예측할 수 있다.The processor may predict a reference block that is likely to be referred to at a point in time corresponding to the delta by summing the delta of the identified output sequence and a reference block for a point in time immediately before the delta.
상기 제1 길이의 입력 시퀀스는 상기 예측 버퍼가 비어 있는 경우, 실제 참조가 수행된 참조 블록에 대한 정보를 저장하고 있는 히스토리 블록(History block)의 리스트를 이용하여 결정되고, 상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이 보다 짧은 경우, 상기 예측 버퍼에 저장된 참조 블록 및 상기 히스토리 블록에 포함된 참조 블록을 연결하여 결정되며, 상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이를 충족하는 경우, 상기 예측 버퍼에 저장된 참조 블록을 이용하여 결정될 수 있다.When the prediction buffer is empty, the input sequence having the first length is determined using a list of history blocks storing information on a reference block to which an actual reference is performed, and a reference stored in the prediction buffer. When the number of blocks is shorter than the first length of the input sequence, it is determined by connecting a reference block stored in the prediction buffer and a reference block included in the history block, and the number of reference blocks stored in the prediction buffer is the input sequence. When the first length of is satisfied, it may be determined using the reference block stored in the prediction buffer.
본 발명의 일실시예에 따른 메모리 제어 장치는, 프로세서를 포함하고, 상기 프로세서는 캐시 내 여유 공간이 없는 상황에서 신규 참조 블록이 상기 캐시 내에 존재하지 않는 경우, 상기 캐시 내에 존재하는 참조 블록들 중 가장 오랫동안 참조되지 않은 참조 블록을 교체 후보 블록으로 선택하고, 상기 선택된 교체 후보 블록이 예측 버퍼 내에 존재하는 지 여부에 따라 상기 선택된 교체 후보 블록의 제거 여부를 판단하며, 상기 선택된 교체 후보 블록을 제거하는 것으로 판단된 경우, 상기 선택된 교체 후보 블록을 제거하고, 상기 신규 참조 블록을 상기 캐시에 추가할 수 있다.An apparatus for controlling memory according to an embodiment of the present invention includes a processor, and the processor is configured to select among reference blocks existing in the cache when a new reference block does not exist in the cache in a situation where there is no free space in the cache. selecting a reference block that has not been referenced for the longest time as a replacement candidate block, determining whether to remove the selected replacement candidate block according to whether the selected replacement candidate block exists in a prediction buffer, and removing the selected replacement candidate block; If it is determined that the selected replacement candidate block is removed, the new reference block may be added to the cache.
상기 프로세서는 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하지 않는 경우, 상기 선택된 교체 후보 블록을 제거하는 것으로 판단하고, 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하는 경우, 상기 선택된 교체 후보 블록을 제거하지 않는 것으로 판단할 수 있다.If the selected replacement candidate block does not exist in the prediction buffer, the processor determines to remove the selected replacement candidate block, and if the selected replacement candidate block does exist in the prediction buffer, the selected replacement candidate block It can be judged that it is not removed.
상기 프로세서는 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하여 제거하지 않는 것으로 판단된 경우, 상기 캐시 내에 존재하는 참조 블록들 중 다음으로 우선 순위를 가지는 참조 블록에 대해 제거 여부를 판단할 수 있다.When it is determined that the selected replacement candidate block exists in the prediction buffer and is not to be removed, the processor may determine whether to remove a reference block having a next priority among reference blocks existing in the cache.
상기 캐시 내에 존재하는 참조 블록들은 LRU(Least Recently Used) 방식에 따라 저장되고, 상기 프로세서는 상기 신규 참조 블록을 상기 캐시의 MRU(Most Recently Used) 위치에 저장할 수 있다.Reference blocks existing in the cache are stored according to a least recently used (LRU) method, and the processor may store the new reference block in a most recently used (MRU) position of the cache.
본 발명은 Sequence-to-Sequence 기반의 참조 블록 예측 모델을 통해 과거의 참조 블록을 이용하여 미래에 이용될 가능성이 있는 참조 블록을 예측함으로써 효율적인 캐시 교체 방법을 제공할 수 있다.The present invention can provide an efficient cache replacement method by predicting a reference block likely to be used in the future using a past reference block through a sequence-to-sequence based reference block prediction model.
도 1은 본 발명의 일실시예에 따른 참조 블록 예측을 통한 메모리 제어 시스템을 나타낸 도면이다.
도 2는 본 발명의 일실시예에 따른 미래에 이용될 가능성이 있는 참조 블록의 예측 방법을 나타낸 도면이다.
도 3a 내지 도 3c는 본 발명의 일실시예에 따른 입력 시퀀스를 생성하는 예를 나타낸 도면이다.
도 4는 본 발명의 일실시예에 따른 예측 버퍼를 이용한 캐시 교체 방법을 나타낸 도면이다.1 is a diagram illustrating a memory control system through reference block prediction according to an embodiment of the present invention.
2 is a diagram illustrating a method of predicting a reference block that may be used in the future according to an embodiment of the present invention.
3A to 3C are diagrams illustrating examples of generating an input sequence according to an embodiment of the present invention.
4 is a diagram illustrating a cache replacement method using a prediction buffer according to an embodiment of the present invention.
이하, 본 발명의 실시예를 첨부된 도면을 참조하여 상세하게 설명한다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
도 1은 본 발명의 일실시예에 따른 참조 블록 예측을 통한 메모리 제어 시스템을 나타낸 도면이다.1 is a diagram illustrating a memory control system through reference block prediction according to an embodiment of the present invention.
도 1을 참고하면, 메모리 제어 시스템(100)은 메모리 제어 장치(110), 예측 버퍼(120) 및 캐시 메모리(130)로 구성될 수 있다. 보다 구체적으로 메모리 제어 장치(110)는 프로세서(111)를 포함할 수 있으며, 프로세서(111)는 Sequence-to-Sequence 기반의 참조 블록 예측 모델을 통해 과거의 참조 블록을 이용하여 미래에 이용될 가능성이 있는 참조 블록을 예측할 수 있다. 이와 같이 예측된 미래에 이용될 가능성이 있는 참조 블록은 예측 버퍼(120)에 시간 순서대로 저장될 수 있다.Referring to FIG. 1 , the
이후 메모리 제어 장치(110)의 프로세서(111)는 향후 캐시 메모리(130)의 캐시 교체가 필요한 경우, 예측 버퍼(120)에 저장된 참조 블록을 이용하여 캐시 메모리(130)에 저장된 교체 후보 블록의 교체 여부를 결정함으로써 미래에 이용될 가능성이 있는 참조 블록을 제거할 위험성을 감소시킬 수 있다. 이때, 예측 버퍼(120)의 사이즈는 캐시 메모리(130)의 사이즈와 동일할 수 있다.Thereafter, the
도 2는 본 발명의 일실시예에 따른 미래에 이용될 가능성이 있는 참조 블록의 예측 방법을 나타낸 도면이다.2 is a diagram illustrating a method of predicting a reference block that may be used in the future according to an embodiment of the present invention.
본 발명의 메모리 제어 장치(110)는 Sequence-to-Sequence 기반의 참조 블록 예측 모델을 통해 과거의 참조 블록을 이용하여 미래에 이용될 가능성이 있는 참조 블록을 예측할 수 있다. 이때, 참조 블록 예측 모델에 입력되는 입력 시퀀스는 시간 순서대로 정렬된 참조 블록들의 시퀀스이고, 참조 블록 예측 모델을 통해 출력되는 출력 시퀀스는 미래에 이용될 가능성이 있는 참조 블록을 예측하는데 사용되는 델타들의 시퀀스이다.The
이때, 출력 시퀀스는 입력 시퀀스를 구성하는 인접한 참조 블록들 사이의 차이를 이용하여 결정될 수 있다. 일례로, 입력 시퀀스가 {1, 4, 5} 인 경우, 출력 시퀀스는 인접한 두 참조 블록들 {1, 4} 및 {4, 5}의 차인 {3, 1}로 결정될 수 있다.In this case, the output sequence may be determined using differences between adjacent reference blocks constituting the input sequence. For example, when an input sequence is {1, 4, 5}, an output sequence may be determined as {3, 1}, which is a difference between two adjacent reference blocks {1, 4} and {4, 5}.
도 2는 일례로, 입력 시퀀스의 길이가 4이고, 출력 시퀀스의 길이가 2인 경우에 대해 메모리 제어 장치(110)가 미래에 이용될 가능성이 있는 참조 블록을 예측하는 방법을 제공한다.FIG. 2 provides a method for predicting a reference block that is likely to be used in the future by the
도 2를 참고하면, 메모리 제어 장치(110)는 현재 시점()까지 실제 이용된 참조 블록들(~)을 Sequence-to-Sequence 기반의 참조 블록 예측 모델에 입력할 수 있으며, 그 결과 현재 시점() 이후에 이용될 가능성이 있는 참조 블록을 예측하기 위한 델타들()의 시퀀스를 획득할 수 있다. 이때, 획득된 델타들() 각각은 현재 시점() 이후의 시점 및 시점에서 이용될 가능성이 있는 참조 블록을 예측하는데 사용될 수 있다.Referring to FIG. 2 , the
메모리 제어 장치(110)는 시점에서 이용될 가능성이 있는 참조 블록을 예측하기 위하여 직전 시점의 참조 블록, 즉 시점의 참조 블록과 시점의 델타 을 이용할 수 있다. 보다 구체적으로 메모리 제어 장치(110)는 시점의 참조 블록 값과 시점의 델타 값을 합산하여 시점에서 이용될 가능성이 있는 참조 블록을 예측할 수 있다. 일례로, 시점에서 이용될 가능성이 있는 참조 블록은 시점의 참조 블록 값 5와 시점의 델타 값 3을 합산하여 8의 값을 가질 수 있다.The
이후 메모리 제어 장치(110)는 시점에서 이용될 가능성이 있는 참조 블록을 예측하기 위하여 직전 시점의 참조 블록, 즉 시점의 참조 블록과 시점의 델타 를 이용할 수 있다. 보다 구체적으로 메모리 제어 장치(100)는 시점의 참조 블록 값과 시점의 델타 값을 합산하여 시점에서 이용될 가능성이 있는 참조 블록을 예측할 수 있다. 일례로, 시점에서 이용될 가능성이 있는 참조 블록은 시점의 참조 블록 값 8와 시점의 델타 값 -4 를 합산하여 4의 값을 가질 수 있다.Then, the
메모리 제어 장치(110)는 이와 같이 예측된 미래에 이용될 가능성이 잇는 참조 블록의 값을 예측 버퍼(120)에 저장할 수 있다. 그리고 메모리 제어 장치(100)는 향후 캐시 메모리(130)의 캐시 교체가 필요한 경우, 예측 버퍼(120)에 저장된 참조 블록을 이용하여 캐시 메모리(130)에 저장된 교체 후보 블록의 교체 여부를 결정함으로써 미래에 이용될 가능성이 있는 참조 블록을 제거할 위험성을 감소시킬 수 있다.The
도 3a 내지 도 3c는 본 발명의 일실시예에 따른 입력 시퀀스를 생성하는 예를 나타낸 도면이다.3A to 3C are diagrams illustrating examples of generating an input sequence according to an embodiment of the present invention.
도 3a 내지 도 3c에서 입력 시퀀스의 길이는 4, 출력 시퀀스의 길이는 2, 그리고 예측 버퍼의 사이즈는 6을 가정한다. 메모리 제어 장치(110)는 실제 참조가 이루어진 과거부터 현재 시점까지의 참조 블록에 대한 기록과 미래에 이용될 가능성이 있는 참조 블록을 저장하고 있는 예측 버퍼(120)를 기반으로 Sequence-to-Sequence 기반의 참조 블록 예측 모델에 입력되는 입력 시퀀스를 생성할 수 있다.3A to 3C, it is assumed that the length of the input sequence is 4, the length of the output sequence is 2, and the size of the prediction buffer is 6. The
(i) 예측 버퍼가 비어 있는 경우(i) When the prediction buffer is empty
도 3a와 같이 입력 버퍼가 비어 있는 경우, 메모리 제어 장치(110)는 실제 참조가 이루어진 참조 블록에 대한 정보를 저장하고 있는 히스토리 블록(History block)의 리스트를 이용하여 입력 시퀀스를 생성할 수 있다.When the input buffer is empty as shown in FIG. 3A , the
즉, 메모리 제어 장치(110)는 히스토리 블록에 저장된 참조 블록에 대한 정보를 이용하여 현재 시점()까지 실제 이용된 참조 블록들()을 추출함으로써 입력 시퀀스를 생성할 수 있다. 메모리 제어 장치(110)는 이와 같이 생성된 입력 시퀀스를 Sequence-to-Sequence 기반의 참조 블록 예측 모델에 입력하여 현재 시점() 이후에 이용될 가능성이 있는 참조 블록을 예측하기 위한 델타들()의 시퀀스인 출력 시퀀스를 획득할 수 있다.That is, the
이후 메모리 제어 장치(110)는 획득된 출력 시퀀스를 이용하여 현재 시점() 이후의 시점 및 시점에서 이용될 가능성이 있는 참조 블록(8, 4)을 예측할 수 있으며, 예측된 참조 블록들을 예측 버퍼(120)에 저장할 수 있다.Then, the
(ii) 예측 버퍼가 채워져 있지만 입력 시퀀스 길이를 충족하지 못하는 경우(ii) the prediction buffer is full but does not meet the input sequence length;
도 3b와 같이 예측 버퍼(120)의 일부가 참조 블록들로 채워져 있지만 입력 시퀀스 길이를 충족하지 못하는 경우, 메모리 제어 장치(110)는 실제 참조가 이루어진 참조 블록에 대한 정보를 저장하고 있는 히스토리 블록 및 예측 버퍼(120)를 이용하여 입력 시퀀스를 생성할 수 있다.As shown in FIG. 3B, when a portion of the
보다 구체적으로 메모리 제어 장치(110)는 예측 버퍼(120)에 저장된 참조 블록들과 히스토리 블록에 기록된 참조 블록들을 연결하여 입력 시퀀스를 생성할 수 있다.More specifically, the
일례로, 예측 버퍼(120)에는 시점 및 시점에서 이용될 가능성이 있는 참조 블록들(8, 4)이 저장되어 있지만 입력 시퀀스의 길이 4에는 부족하기 때문에 메모리 제어 장치(110)는 부족한 길이에 대응하는 참조 블록들을 히스토리 블록에 기록된 참조 블록들(6, 5)로 채울 수 있다. As an example, the
메모리 제어 장치(110)는 이와 같이 생성된 입력 시퀀스(6, 5, 8, 4)를 Sequence-to-Sequence 기반의 참조 블록 예측 모델에 입력하여 시점 이후에 이용될 가능성이 있는 참조 블록을 예측하기 위한 델타들()의 시퀀스인 출력 시퀀스를 획득할 수 있다.The
이후 메모리 제어 장치(110)는 획득된 출력 시퀀스를 이용하여 시점 이후의 시점 및 시점에서 이용될 가능성이 있는 참조 블록(10, 14)을 예측할 수 있으며, 예측된 참조 블록들을 예측 버퍼(120)에 저장할 수 있다.Then, the
(iii) 예측 버퍼가 채워져 있고, 입력 시퀀스 길이를 충족하는 경우(iii) if the prediction buffer is full and satisfies the input sequence length;
도 3c와 같이 예측 버퍼(120)가 참조 블록들로 채워져 있고, 입력 시퀀스 길이를 충족하는 경우, 메모리 제어 장치(110)는 예측 버퍼(120)를 이용하여 입력 시퀀스를 생성할 수 있다. 즉, 메모리 제어 장치(110)는 예측 버퍼(120)에 저장된 참조 블록에 대한 정보를 이용하여 시점까지 예측된 참조 블록들(8, 4, 10, 14)을 추출함으로써 입력 시퀀스를 생성할 수 있다. 메모리 제어 장치(110)는 이와 같이 생성된 입력 시퀀스를 Sequence-to-Sequence 기반의 참조 블록 예측 모델에 입력하여 시점 이후에 이용될 가능성이 있는 참조 블록을 예측하기 위한 델타들()의 시퀀스인 출력 시퀀스를 획득할 수 있다.As shown in FIG. 3C , when the
이후 메모리 제어 장치(110)는 획득된 출력 시퀀스를 이용하여 시점 이후의 시점 및 시점에서 이용될 가능성이 있는 참조 블록(10, 11)을 예측할 수 있으며, 예측된 참조 블록들을 예측 버퍼(120)에 저장할 수 있다.Then, the
도 4는 본 발명의 일실시예에 따른 예측 버퍼를 이용한 캐시 교체 방법을 나타낸 도면이다. 4 is a diagram illustrating a cache replacement method using a prediction buffer according to an embodiment of the present invention.
캐시 교체는 캐시 메모리(130) 내 여유 공간이 없는 상황에서 신규 참조 블록이 해당 캐시 메모리(130) 내에 존재하지 않는 경우 실행될 수 있다. 메모리 제어 장치(110)는 캐시 메모리(130) 내에 존재하는 참조 블록들 중 LRU(Least Recently Used) 방식에 따라 가장 오랫동안 참조되지 않은 참조 블록을 교체 후보 블록으로 선택할 수 있다. Cache replacement may be executed when a new reference block does not exist in the
이후, 메모리 제어 장치(110)는 선택된 교체 후보 블록이 예측 버퍼(120) 내에 존재하는 지 여부에 따라 선택된 교체 후보 블록의 제거 여부를 판단할 수 있다. 보다 구체적으로 메모리 제어 장치(110)는 선택된 교체 후보 블록이 예측 버퍼(120) 내에 존재하지 않는 경우, 해당 선택된 교체 후보 블록을 제거하는 것으로 판단하고, 선택된 교체 후보 블록이 예측 버퍼(120) 내에 존재하는 경우, 해당 선택된 교체 후보 블록을 제거하지 않는 것으로 판단할 수 있다.Then, the
만약 선택된 교체 후보 블록이 예측 버퍼(120) 내에 존재하여 제거하지 않는 것으로 판단된 경우, 메모리 제어 장치(110)는 캐시 메모리(130) 내에 존재하는 참조 블록들 중 다음으로 오랫동안 참조되지 않은 참조 블록을 교체 후보 블록을 선택하고, 제거 여부를 판단할 수 있다.If it is determined that the selected replacement candidate block exists in the
이때, 선택된 교체 후보 블록이 예측 버퍼(120)에 존재하지 않는 경우, 메모리 제어 장치(110)는 선택된 교체 후보 블록을 캐시 메모리(130)에서 제거하고, 신규 참조 블록을 캐시 메모리(130)에 추가할 수 있다.At this time, when the selected replacement candidate block does not exist in the
도 4의 예를 참고하면, 현재 시점()에 대응하는 신규 참조 블록(5)이 캐시 메모리(130)에 존재하지 않고, 캐시 메모리(130)에 여유 공간이 없으므로 캐시 교체가 필요할 수 있다. 여기서, 캐시 메모리(130)는 가장 오래된 참조 블록부터 최근의 참조 블록 순서로 저장되어 있으므로 메모리 제어 장치(110)는 LRU(Least Recently Used) 방식에 따라 교체 후보 블록(8)을 선택할 수 있다.Referring to the example of FIG. 4, the current point ( Since the
이때, 8이라는 교체 후보 블록은 예측 버퍼(120)에 존재하므로 메모리 제어 장치(110)는 다음 우선순위를 가지는 교체 후보 블록(10)을 선택할 수 있다. 마찬가지로, 10이라는 교체 후보 블록도 예측 버퍼(120)에 존재하므로 메모리 제어 장치(110)는 다음 우선순위를 가지는 교체 후보 블록(2)을 선택할 수 있다.At this time, since
선택된 2라는 교체 후보 블록은 예측 버퍼(120)에 존재하지 않으므로 메모리 제어 장치(110)는 캐시 메모리(130)에서 2라는 교체 후보 블록을 제거하고, 신규 참조 블록(5)을 캐시 메모리(130)의 MRU(Most Recently Used) 위치에 추가할 수 있다.Since the selected
한편, 본 발명에 따른 방법은 컴퓨터에서 실행될 수 있는 프로그램으로 작성되어 마그네틱 저장매체, 광학적 판독매체, 디지털 저장매체 등 다양한 기록 매체로도 구현될 수 있다.Meanwhile, the method according to the present invention is written as a program that can be executed on a computer and can be implemented in various recording media such as magnetic storage media, optical reading media, and digital storage media.
본 명세서에 설명된 각종 기술들의 구현들은 디지털 전자 회로조직으로, 또는 컴퓨터 하드웨어, 펌웨어, 소프트웨어로, 또는 그들의 조합들로 구현될 수 있다. 구현들은 데이터 처리 장치, 예를 들어 프로그램가능 프로세서, 컴퓨터, 또는 다수의 컴퓨터들의 동작에 의한 처리를 위해, 또는 이 동작을 제어하기 위해, 컴퓨터 프로그램 제품, 즉 정보 캐리어, 예를 들어 기계 판독가능 저장 장치(컴퓨터 판독가능 매체) 또는 전파 신호에서 유형적으로 구체화된 컴퓨터 프로그램으로서 구현될 수 있다. 상술한 컴퓨터 프로그램(들)과 같은 컴퓨터 프로그램은 컴파일된 또는 인터프리트된 언어들을 포함하는 임의의 형태의 프로그래밍 언어로 기록될 수 있고, 독립형 프로그램으로서 또는 모듈, 구성요소, 서브루틴, 또는 컴퓨팅 환경에서의 사용에 적절한 다른 유닛으로서 포함하는 임의의 형태로 전개될 수 있다. 컴퓨터 프로그램은 하나의 사이트에서 하나의 컴퓨터 또는 다수의 컴퓨터들 상에서 처리되도록 또는 다수의 사이트들에 걸쳐 분배되고 통신 네트워크에 의해 상호 연결되도록 전개될 수 있다.Implementations of the various techniques described herein may be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or combinations thereof. Implementations may be a computer program product, i.e., an information carrier, e.g., a machine-readable storage, for processing by, or for controlling, the operation of a data processing apparatus, e.g., a programmable processor, computer, or plurality of computers. It can be implemented as a computer program tangibly embodied in a device (computer readable medium) or a radio signal. A computer program, such as the computer program(s) described above, may be written in any form of programming language, including compiled or interpreted languages, and may be written as a stand-alone program or in a module, component, subroutine, or computing environment. It can be deployed in any form, including as other units suitable for the use of. A computer program can be deployed to be processed on one computer or multiple computers at one site or distributed across multiple sites and interconnected by a communication network.
컴퓨터 프로그램의 처리에 적절한 프로세서들은 예로서, 범용 및 특수 목적 마이크로프로세서들 둘 다, 및 임의의 종류의 디지털 컴퓨터의 임의의 하나 이상의 프로세서들을 포함한다. 일반적으로, 프로세서는 판독 전용 메모리 또는 랜덤 액세스 메모리 또는 둘 다로부터 명령어들 및 데이터를 수신할 것이다. 컴퓨터의 요소들은 명령어들을 실행하는 적어도 하나의 프로세서 및 명령어들 및 데이터를 저장하는 하나 이상의 메모리 장치들을 포함할 수 있다. 일반적으로, 컴퓨터는 데이터를 저장하는 하나 이상의 대량 저장 장치들, 예를 들어 자기, 자기-광 디스크들, 또는 광 디스크들을 포함할 수 있거나, 이것들로부터 데이터를 수신하거나 이것들에 데이터를 송신하거나 또는 양쪽으로 되도록 결합될 수도 있다. 컴퓨터 프로그램 명령어들 및 데이터를 구체화하는데 적절한 정보 캐리어들은 예로서 반도체 메모리 장치들, 예를 들어, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(Magnetic Media), CD-ROM(Compact Disk Read Only Memory), DVD(Digital Video Disk)와 같은 광 기록 매체(Optical Media), 플롭티컬 디스크(Floptical Disk)와 같은 자기-광 매체(Magneto-Optical Media), 롬(ROM, Read Only Memory), 램(RAM, Random Access Memory), 플래시 메모리, EPROM(Erasable Programmable ROM), EEPROM(Electrically Erasable Programmable ROM) 등을 포함한다. 프로세서 및 메모리는 특수 목적 논리 회로조직에 의해 보충되거나, 이에 포함될 수 있다.Processors suitable for processing a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from read only memory or random access memory or both. Elements of a computer may include at least one processor that executes instructions and one or more memory devices that store instructions and data. In general, a computer may include, receive data from, send data to, or both, one or more mass storage devices that store data, such as magnetic, magneto-optical disks, or optical disks. It can also be combined to become. Information carriers suitable for embodying computer program instructions and data include, for example, semiconductor memory devices, for example, magnetic media such as hard disks, floppy disks and magnetic tapes, compact disk read only memory (CD-ROM) ), optical media such as DVD (Digital Video Disk), magneto-optical media such as Floptical Disk, ROM (Read Only Memory), RAM (RAM) , Random Access Memory), flash memory, EPROM (Erasable Programmable ROM), EEPROM (Electrically Erasable Programmable ROM), and the like. The processor and memory may be supplemented by, or included in, special purpose logic circuitry.
또한, 컴퓨터 판독가능 매체는 컴퓨터에 의해 액세스될 수 있는 임의의 가용매체일 수 있고, 컴퓨터 저장매체 및 전송매체를 모두 포함할 수 있다.In addition, computer readable media may be any available media that can be accessed by a computer, and may include both computer storage media and transmission media.
본 명세서는 다수의 특정한 구현물의 세부사항들을 포함하지만, 이들은 어떠한 발명이나 청구 가능한 것의 범위에 대해서도 제한적인 것으로서 이해되어서는 안되며, 오히려 특정한 발명의 특정한 실시형태에 특유할 수 있는 특징들에 대한 설명으로서 이해되어야 한다. 개별적인 실시형태의 문맥에서 본 명세서에 기술된 특정한 특징들은 단일 실시형태에서 조합하여 구현될 수도 있다. 반대로, 단일 실시형태의 문맥에서 기술한 다양한 특징들 역시 개별적으로 혹은 어떠한 적절한 하위 조합으로도 복수의 실시형태에서 구현 가능하다. 나아가, 특징들이 특정한 조합으로 동작하고 초기에 그와 같이 청구된 바와 같이 묘사될 수 있지만, 청구된 조합으로부터의 하나 이상의 특징들은 일부 경우에 그 조합으로부터 배제될 수 있으며, 그 청구된 조합은 하위 조합이나 하위 조합의 변형물로 변경될 수 있다.Although this specification contains many specific implementation details, they should not be construed as limiting on the scope of any invention or what is claimed, but rather as a description of features that may be unique to a particular embodiment of a particular invention. It should be understood. Certain features that are described in this specification in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable subcombination. Further, while features may operate in particular combinations and are initially depicted as such claimed, one or more features from a claimed combination may in some cases be excluded from that combination, and the claimed combination is a subcombination. or sub-combination variations.
마찬가지로, 특정한 순서로 도면에서 동작들을 묘사하고 있지만, 이는 바람직한 결과를 얻기 위하여 도시된 그 특정한 순서나 순차적인 순서대로 그러한 동작들을 수행하여야 한다거나 모든 도시된 동작들이 수행되어야 하는 것으로 이해되어서는 안 된다. 특정한 경우, 멀티태스킹과 병렬 프로세싱이 유리할 수 있다. 또한, 상술한 실시형태의 다양한 장치 컴포넌트의 분리는 그러한 분리를 모든 실시형태에서 요구하는 것으로 이해되어서는 안되며, 설명한 프로그램 컴포넌트와 장치들은 일반적으로 단일의 소프트웨어 제품으로 함께 통합되거나 다중 소프트웨어 제품에 패키징 될 수 있다는 점을 이해하여야 한다.Similarly, while actions are depicted in the drawings in a particular order, it should not be construed as requiring that those actions be performed in the specific order shown or in the sequential order, or that all depicted actions must be performed to obtain desired results. In certain cases, multitasking and parallel processing can be advantageous. Further, the separation of various device components in the embodiments described above should not be understood as requiring such separation in all embodiments, and the program components and devices described may generally be integrated together into a single software product or packaged into multiple software products. You have to understand that you can.
한편, 본 명세서와 도면에 개시된 본 발명의 실시 예들은 이해를 돕기 위해 특정 예를 제시한 것에 지나지 않으며, 본 발명의 범위를 한정하고자 하는 것은 아니다. 여기에 개시된 실시 예들 이외에도 본 발명의 기술적 사상에 바탕을 둔 다른 변형 예들이 실시 가능하다는 것은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 자명한 것이다.On the other hand, the embodiments of the present invention disclosed in this specification and drawings are only presented as specific examples to aid understanding, and are not intended to limit the scope of the present invention. In addition to the embodiments disclosed herein, it is obvious to those skilled in the art that other modified examples based on the technical idea of the present invention can be implemented.
100 : 메모리 제어 시스템
110 : 메모리 제어 장치
120 : 예측 버퍼
130 : 캐시 메모리100: memory control system
110: memory control unit
120: prediction buffer
130: cache memory
Claims (20)
특정 시점까지의 참조 블록들로 구성된 제1 길이의 입력 시퀀스를 참조 블록 예측 모델에 입력하는 단계;
상기 참조 블록 예측 모델로부터 상기 특정 시점 이후의 참조 블록들을 예측하기 위한 델타들로 구성된 제2 길이의 출력 시퀀스를 식별하는 단계;
상기 식별된 출력 시퀀스와 직전 시점의 참조 블록을 이용하여 상기 특정 시점 이후에 참조될 가능성이 있는 참조 블록을 예측하는 단계; 및
상기 특정 시점 이후에 참조될 가능성이 있는 것으로 예측된 참조 블록을 예측 버퍼에 저장하는 단계
를 포함하는 메모리 제어 방법.In the memory control method performed by the processor,
inputting an input sequence of a first length composed of reference blocks up to a specific point in time into a reference block prediction model;
identifying an output sequence of a second length consisting of deltas for predicting reference blocks after the specific point in time from the reference block prediction model;
predicting a reference block that is likely to be referenced after the specific point in time using the identified output sequence and a reference block of an immediately preceding point in time; and
Storing a reference block predicted to be likely to be referenced after the specific point in time in a prediction buffer
Memory control method comprising a.
상기 출력 시퀀스는,
상기 입력 시퀀스를 구성하는 인접한 참조 블록들 사이의 차이를 이용하여 결정되는 메모리 제어 방법.According to claim 1,
The output sequence is
A memory control method determined using a difference between adjacent reference blocks constituting the input sequence.
상기 예측하는 단계는,
상기 식별된 출력 시퀀스의 델타와 상기 델타의 직전 시점에 대한 참조 블록을 합산함으로써 상기 델타에 대응하는 시점에서 참조될 가능성이 있는 참조 블록을 예측하는 메모리 제어 방법.According to claim 1,
The predicting step is
A memory control method of predicting a reference block that is likely to be referred to at a point in time corresponding to the delta by adding a delta of the identified output sequence and a reference block for a point in time immediately before the delta.
상기 제1 길이의 입력 시퀀스는,
상기 예측 버퍼가 비어 있는 경우, 실제 참조가 수행된 참조 블록에 대한 정보를 저장하고 있는 히스토리 블록(History block)의 리스트를 이용하여 결정되는 메모리 제어 방법.According to claim 1,
The input sequence of the first length,
When the prediction buffer is empty, the memory control method determined using a list of history blocks storing information on a reference block in which an actual reference is performed.
상기 제1 길이의 입력 시퀀스는,
상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이 보다 짧은 경우, 상기 예측 버퍼에 저장된 참조 블록 및 상기 히스토리 블록에 포함된 참조 블록을 연결하여 결정되는 메모리 제어 방법.According to claim 4,
The input sequence of the first length,
When the number of reference blocks stored in the prediction buffer is shorter than the first length of the input sequence, the memory control method determined by connecting the reference blocks stored in the prediction buffer and the reference blocks included in the history block.
상기 제1 길이의 입력 시퀀스는,
상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이를 충족하는 경우, 상기 예측 버퍼에 저장된 참조 블록을 이용하여 결정되는 메모리 제어 방법.According to claim 4,
The input sequence of the first length,
When the number of reference blocks stored in the prediction buffer satisfies the first length of the input sequence, the memory control method is determined using the reference blocks stored in the prediction buffer.
상기 제1 길이의 입력 시퀀스는,
특정 시점까지의 참조 블록들이 시간 순서대로 정렬되는 메모리 제어 방법.According to claim 1,
The input sequence of the first length,
A memory control method in which reference blocks up to a specific point in time are arranged in chronological order.
캐시 내 여유 공간이 없는 상황에서 신규 참조 블록이 상기 캐시 내에 존재하지 않는 경우, 상기 캐시 내에 존재하는 참조 블록들 중 가장 오랫동안 참조되지 않은 참조 블록을 교체 후보 블록으로 선택하는 단계;
상기 선택된 교체 후보 블록이 예측 버퍼 내에 존재하는 지 여부에 따라 상기 선택된 교체 후보 블록의 제거 여부를 판단하는 단계; 및
상기 선택된 교체 후보 블록을 제거하는 것으로 판단된 경우, 상기 선택된 교체 후보 블록을 제거하고, 상기 신규 참조 블록을 상기 캐시에 추가하는 단계
를 포함하는 메모리 제어 방법.In the memory control method performed by the processor,
selecting a reference block that has not been referenced for the longest time among reference blocks existing in the cache as a replacement candidate block when a new reference block does not exist in the cache in a situation where there is no free space in the cache;
determining whether to remove the selected replacement candidate block according to whether the selected replacement candidate block exists in a prediction buffer; and
removing the selected replacement candidate block and adding the new reference block to the cache when it is determined that the selected replacement candidate block is to be removed;
Memory control method comprising a.
상기 판단하는 단계는,
상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하지 않는 경우, 상기 선택된 교체 후보 블록을 제거하는 것으로 판단하고,
상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하는 경우, 상기 선택된 교체 후보 블록을 제거하지 않는 것으로 판단하는 메모리 제어 방법.According to claim 8,
The determining step is
When the selected replacement candidate block does not exist in the prediction buffer, determining to remove the selected replacement candidate block;
and determining that the selected replacement candidate block is not removed when the selected replacement candidate block exists in the prediction buffer.
상기 판단하는 단계는,
상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하여 제거하지 않는 것으로 판단된 경우, 상기 캐시 내에 존재하는 참조 블록들 중 다음으로 우선 순위를 가지는 참조 블록에 대해 제거 여부를 판단하는 메모리 제어 방법.According to claim 9,
The determining step is
When it is determined that the selected replacement candidate block exists in the prediction buffer and is not to be removed, determining whether to delete a reference block having a next priority among reference blocks existing in the cache.
상기 캐시 내에 존재하는 참조 블록들은,
LRU(Least Recently Used) 방식에 따라 저장되고,
상기 캐시에 추가하는 단계는,
상기 신규 참조 블록을 상기 캐시의 MRU(Most Recently Used) 위치에 저장하는 메모리 제어 방법.According to claim 8,
Reference blocks existing in the cache,
It is stored according to the LRU (Least Recently Used) method,
The step of adding to the cache is,
A memory control method of storing the new reference block in a most recently used (MRU) location of the cache.
상기 예측 버퍼의 크기는,
상기 캐시의 크기와 동일한 메모리 제어 방법.According to claim 8,
The size of the prediction buffer is
Memory control method equal to the size of the cache.
상기 메모리 제어 장치는, 프로세서를 포함하고,
상기 프로세서는,
특정 시점까지의 참조 블록들로 구성된 제1 길이의 입력 시퀀스를 참조 블록 예측 모델에 입력하고, 상기 참조 블록 예측 모델로부터 상기 특정 시점 이후의 참조 블록들을 예측하기 위한 델타들로 구성된 제2 길이의 출력 시퀀스를 식별하며, 상기 식별된 출력 시퀀스와 직전 시점의 참조 블록을 이용하여 상기 특정 시점 이후에 참조될 가능성이 있는 참조 블록을 예측하고, 상기 특정 시점 이후에 참조될 가능성이 있는 것으로 예측된 참조 블록을 예측 버퍼에 저장하는 메모리 제어 장치.In the memory control device,
The memory control device includes a processor,
the processor,
An input sequence of a first length composed of reference blocks up to a specific point in time is input to a reference block prediction model, and an output of a second length composed of deltas for predicting reference blocks after the specific point in time from the reference block prediction model A sequence is identified, a reference block that is likely to be referenced after the specific point in time is predicted using the identified output sequence and a reference block of the previous point in time, and a reference block that is predicted to be referred to after the specific point in time is predicted. A memory control unit that stores in a prediction buffer.
상기 출력 시퀀스는,
상기 입력 시퀀스를 구성하는 인접한 참조 블록들의 차이를 이용하여 결정되는 메모리 제어 장치.According to claim 13,
The output sequence is
A memory control device determined by using a difference between adjacent reference blocks constituting the input sequence.
상기 프로세서는,
상기 식별된 출력 시퀀스의 델타와 상기 델타의 직전 시점에 대한 참조 블록을 합산함으로써 상기 델타에 대응하는 시점에서 참조될 가능성이 있는 참조 블록을 예측하는 메모리 제어 장치.According to claim 13,
the processor,
A memory control device that predicts a reference block that is likely to be referred to at a point in time corresponding to the delta by summing the delta of the identified output sequence and a reference block for a point in time immediately before the delta.
상기 제1 길이의 입력 시퀀스는,
상기 예측 버퍼가 비어 있는 경우, 실제 참조가 수행된 참조 블록에 대한 정보를 저장하고 있는 히스토리 블록(History block)의 리스트를 이용하여 결정되고,
상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이 보다 짧은 경우, 상기 예측 버퍼에 저장된 참조 블록 및 상기 히스토리 블록에 포함된 참조 블록을 연결하여 결정되며,
상기 예측 버퍼에 저장된 참조 블록의 개수가 상기 입력 시퀀스의 제1 길이를 충족하는 경우, 상기 예측 버퍼에 저장된 참조 블록을 이용하여 결정되는 메모리 제어 장치.According to claim 13,
The input sequence of the first length,
When the prediction buffer is empty, it is determined using a list of history blocks storing information on a reference block in which actual reference is performed,
When the number of reference blocks stored in the prediction buffer is shorter than the first length of the input sequence, it is determined by connecting the reference blocks stored in the prediction buffer and the reference blocks included in the history block,
When the number of reference blocks stored in the prediction buffer satisfies the first length of the input sequence, the memory control device is determined using the reference blocks stored in the prediction buffer.
상기 메모리 제어 장치는, 프로세서를 포함하고,
상기 프로세서는,
캐시 내 여유 공간이 없는 상황에서 신규 참조 블록이 상기 캐시 내에 존재하지 않는 경우, 상기 캐시 내에 존재하는 참조 블록들 중 가장 오랫동안 참조되지 않은 참조 블록을 교체 후보 블록으로 선택하고, 상기 선택된 교체 후보 블록이 예측 버퍼 내에 존재하는 지 여부에 따라 상기 선택된 교체 후보 블록의 제거 여부를 판단하며, 상기 선택된 교체 후보 블록을 제거하는 것으로 판단된 경우, 상기 선택된 교체 후보 블록을 제거하고, 상기 신규 참조 블록을 상기 캐시에 추가하는 메모리 제어 장치.In the memory control device,
The memory control device includes a processor,
the processor,
When a new reference block does not exist in the cache in a situation where there is no free space in the cache, a reference block that has not been referenced for the longest time among the reference blocks existing in the cache is selected as a replacement candidate block, and the selected replacement candidate block is It is determined whether the selected replacement candidate block is removed according to whether it exists in the prediction buffer, and if it is determined that the selected replacement candidate block is to be removed, the selected replacement candidate block is removed and the new reference block is transferred to the cache. Added to the memory control unit.
상기 프로세서는,
상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하지 않는 경우, 상기 선택된 교체 후보 블록을 제거하는 것으로 판단하고, 상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하는 경우, 상기 선택된 교체 후보 블록을 제거하지 않는 것으로 판단하는 메모리 제어 장치.According to claim 17,
the processor,
If the selected replacement candidate block does not exist in the prediction buffer, it is determined that the selected replacement candidate block is removed, and if the selected replacement candidate block exists in the prediction buffer, the selected replacement candidate block is not removed. A memory control device that determines that
상기 프로세서는,
상기 선택된 교체 후보 블록이 상기 예측 버퍼 내에 존재하여 제거하지 않는 것으로 판단된 경우, 상기 캐시 내에 존재하는 참조 블록들 중 다음으로 우선 순위를 가지는 참조 블록에 대해 제거 여부를 판단하는 메모리 제어 장치.According to claim 18,
the processor,
When it is determined that the selected replacement candidate block exists in the prediction buffer and is not to be removed, the memory control device determines whether to delete a reference block having a next priority among reference blocks existing in the cache.
상기 캐시 내에 존재하는 참조 블록들은,
LRU(Least Recently Used) 방식에 따라 저장되고,
상기 프로세서는,
상기 신규 참조 블록을 상기 캐시의 MRU(Most Recently Used) 위치에 저장하는 메모리 제어 장치.According to claim 17,
Reference blocks existing in the cache,
It is stored according to the LRU (Least Recently Used) method,
the processor,
A memory control device that stores the new reference block in a most recently used (MRU) location of the cache.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210048625A KR102575380B1 (en) | 2021-04-14 | 2021-04-14 | Memory control method and apparatus for efficient cache replacement |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020210048625A KR102575380B1 (en) | 2021-04-14 | 2021-04-14 | Memory control method and apparatus for efficient cache replacement |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20220142190A KR20220142190A (en) | 2022-10-21 |
KR102575380B1 true KR102575380B1 (en) | 2023-09-06 |
Family
ID=83805433
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020210048625A KR102575380B1 (en) | 2021-04-14 | 2021-04-14 | Memory control method and apparatus for efficient cache replacement |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102575380B1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190370632A1 (en) | 2018-05-31 | 2019-12-05 | Google Llc | Computer system prediction machine learning models |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100851298B1 (en) * | 2005-12-28 | 2008-08-08 | 엠텍비젼 주식회사 | Cache memory controller and method for managing cache memory using the same |
KR101358407B1 (en) * | 2012-01-10 | 2014-02-05 | 고려대학교 산학협력단 | Hierarchical cache system and method |
-
2021
- 2021-04-14 KR KR1020210048625A patent/KR102575380B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190370632A1 (en) | 2018-05-31 | 2019-12-05 | Google Llc | Computer system prediction machine learning models |
Non-Patent Citations (2)
Title |
---|
논문1(2017.10.05) |
논문2(2019.03.31) |
Also Published As
Publication number | Publication date |
---|---|
KR20220142190A (en) | 2022-10-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
RU2479013C2 (en) | Method of optimising solid-state drive and optimiser | |
CN107102819B (en) | Method and equipment for writing data into solid state disk | |
CN101673192B (en) | Method for time-sequence data processing, device and system therefor | |
CN108874309B (en) | Method and device for managing physical blocks in solid state disk | |
CN102884502A (en) | Managing write operations to an extent of tracks migrated between storage devices | |
JP2009205254A (en) | Computer, dumping program, and dumping method | |
CN112368677B (en) | Selectively performing early branch prediction based on type of branch instruction | |
KR20190078836A (en) | Multi-level caching method for improving graph processing performance, and multi-level caching system | |
CN112114753B (en) | Data writing method, device and equipment | |
US10176065B2 (en) | Intelligent failure prediction and redundancy management in a data storage system | |
US20090182957A1 (en) | Data storage apparatus | |
JP6885193B2 (en) | Parallel processing device, job management method, and job management program | |
CN104317731A (en) | Hierarchical storage management method, device and storage system | |
CN107798063B (en) | Snapshot processing method and snapshot processing device | |
CN109343796B (en) | Data processing method and device | |
KR102575380B1 (en) | Memory control method and apparatus for efficient cache replacement | |
US11934696B2 (en) | Machine learning assisted quality of service (QoS) for solid state drives | |
CN106020717B (en) | Data processing method and electronic equipment | |
KR101945117B1 (en) | A smart device and method for managing memory thereof | |
CN113778964A (en) | Recording device for storing multiple temporary storage files and management method of temporary storage files | |
CN109658985B (en) | Redundancy removal optimization method and system for gene reference sequence | |
KR100847021B1 (en) | Data storage apparatus, method for data storage and computer readable record medium on which the method is recorded | |
KR20040076313A (en) | Method of Seperated Buffer cache Management | |
EP2642379A2 (en) | Information processing apparatus, program, and data allocation method | |
JP4932749B2 (en) | Resource state prediction apparatus, resource state prediction method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right |