KR20150108148A - Cache management apparatus and method of using partial reconfiguration - Google Patents
Cache management apparatus and method of using partial reconfiguration Download PDFInfo
- Publication number
- KR20150108148A KR20150108148A KR1020140030971A KR20140030971A KR20150108148A KR 20150108148 A KR20150108148 A KR 20150108148A KR 1020140030971 A KR1020140030971 A KR 1020140030971A KR 20140030971 A KR20140030971 A KR 20140030971A KR 20150108148 A KR20150108148 A KR 20150108148A
- Authority
- KR
- South Korea
- Prior art keywords
- cache
- sets
- access area
- main memory
- data
- 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/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0893—Caches characterised by their organisation or structure
- G06F12/0895—Caches characterised by their organisation or structure of parts of caches, e.g. directory or tag array
-
- 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/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0806—Multiuser, multiprocessor or multiprocessing cache systems
- G06F12/0842—Multiuser, multiprocessor or multiprocessing cache systems for multiprocessing or multitasking
Abstract
Description
본 발명은 캐시 제어 장치 및 그 방법에 관한 것으로 구체적으로, 멀티코어 마이크플랫폼에서 이용되는 캐시 제어 장치 및 그 방법에 관한 것이다.
The present invention relates to a cache control apparatus and a method thereof, and more particularly, to a cache control apparatus and method used in a multi-core microphone platform.
캐시(CACHE)는 컴퓨터의 프로세서 및 메인 메모리 사이에 위치하여, 프로세서에 대응하는 속도로 동작하는 고속의 메모리이다. 캐시는 메인 메모리 내에 저장된 데이터의 일부를 저장할 수 있고, 캐시 내에 저장된 데이터는 메인 메모리 내에 저장된 데이터에 비해 더 빠르게 접근될 수 있다. 이러한 캐시를 이용하면 빠른 속도의 프로세서 및 느린 속도의 메인 메모리 간의 속도 차이에 의해 발생하는 병목 현상을 완화시킬 수 있다.The cache (CACHE) is a high-speed memory located between the processor of the computer and the main memory, operating at a speed corresponding to the processor. The cache may store a portion of the data stored in the main memory, and the data stored in the cache may be accessed more quickly than the data stored in the main memory. This cache can mitigate bottlenecks caused by speed differences between fast processors and slower main memory.
캐시는 컴퓨터 시스템의 성능에 큰 영향을 준다. 최근 공정 기술의 발달로 TSV(Through Silicon Via)를 이용하여 DRAM, PCRAM 등 여러 종류의 메모리를 캐시로 사용하려는 연구가 활발히 진행되고 있어, 추후 캐시의 크기는 계속 증가할 전망이다. 여러 가지 어플리케이션의 메모리 접근 패턴을 수용하기 위해서는 크기가 큰 캐시가 필요하지만 캐시 크기의 증가는 회로 면적과 소비 전력의 증가를 야기하기 때문에 적절한 크기로 설계를 하여야 한다. Cache has a big impact on the performance of computer systems. Recently, as the development of process technology has been actively pursued to use various kinds of memories such as DRAM and PCRAM as caches by using TSV (Through Silicon Via), it is expected that the size of caches will continue to increase in the future. Large caches are required to accommodate the memory access patterns of various applications, but the increase in cache size causes an increase in circuit area and power consumption.
크기가 큰 캐시의 엔트리 활용도를 관찰하여 보면 모든 영역의 세트가 고루 사용되지 않고 특정 영역의 세트들이 집중적으로 사용되어 데이터 미스가 발생하는 것을 알 수 있다. 또한 특정 영역의 세트는 데이터의 공간적 지역성 (Spatial locality) 때문에 공간적 상관관계를 가진다. Observing the entry utilization of a large-sized cache reveals that a set of all areas is not used uniformly, and a set of specific areas is intensively used and a data miss occurs. Also, the set of specific areas has a spatial correlation due to the spatial locality of the data.
캐시의 데이터 미스가 발생하는 현상을 해결하기 위해서 일반적으로 캐시는 집합 연관(Set Associative)사상 방법을 사용한다. 집합 연관 사상 캐시에는 메인 메모리의 각 블록이 배치될 수 있는 고정된 수만큼의 위치(예컨대, 최소 2개)가 존재한다. 즉, 메모리의 각 블록당 n개의 배치 가능한 위치를 갖는 집합연관 캐시를 n-way 집합연관 캐시라고 부른다. To solve the problem of data misreading in the cache, the cache generally uses a set associative mapping method. The set associative mapping cache has a fixed number of locations (e.g., at least two) in which each block of main memory can be placed. That is, the set associative cache having n possible positions for each block of memory is called an n-way set associative cache.
n-way 집합연관 캐시는 각각 n개의 블록으로 이루어진 다수의 집합들로 구성되어 있다. 메인 메모리상의 각 블록은 인덱스 필드에 의해서 캐시 상의 하나의 집합으로 사상되고, 집합내의 모든 엔트리들은 프로세서로부터 요청 받은 데이터와 일치하는 것을 찾기 위해 비교된다. The n-way set associative cache consists of a number of sets of n blocks each. Each block on the main memory is mapped into a set on the cache by an index field, and all entries in the set are compared to find a match with the requested data from the processor.
하지만, 연관이 많아지면 동시에 일치하는 엔트리를 찾기 위해 접근하는 엔트리 숫자가 늘어나 캐시의 소비 전력이 높아지고, 서칭 레이턴시(Searching Latency)가 늘어나는 문제가 있다. 이 때문에, 높은 캐시 효율을 기대하기는 어려운 실정이다.
However, as the number of associations increases, the number of entries to access matching entries at the same time increases, so the power consumption of the cache increases and the retrieving latency increases. Therefore, it is difficult to expect high cache efficiency.
본 발명의 일실시예 에서는 용량이 큰 캐시 메모리의 특정 엔트리만 집중적으로 사용되어 캐시 메모리의 많은 부분이 쓰이지 않고 낭비되는 현상을 완화시키는 것을 목적으로 한다.In an embodiment of the present invention, only a specific entry of a cache memory having a large capacity is used intensively so as to alleviate a phenomenon that a large portion of the cache memory is not used and wasted.
아울러, 집중 접근되는 캐시의 세트(set) 수와 캐시의 웨이(way)수에 기초하여 캐시를 부분적으로 재구성함으로써 캐시의 미스율(Miss Rate)을 감소시키는 캐시 제어 장치 및 캐시 관리 방법을 제공한다. A cache control apparatus and a cache management method for reducing a miss rate of a cache by partially reconstructing a cache based on the number of sets of caches to be intensively accessed and the number of ways of caches are provided.
본 발명의 목적은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.
The objects of the present invention are not limited to the above-mentioned objects, and other objects not mentioned can be clearly understood by those skilled in the art from the following description.
상술한 본 발명의 목적을 달성하기 위한 본 발명의 일 면에 따른 n-웨이(way) 세트 연관 캐시의 형태를 재구성 캐시 제어 장치는 n-웨이(way)(n은 1이상의 자연수) 세트 연관 캐시의 형태를 재구성 캐시 제어 장치에 있어서, 캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 하는 모니터링부, 상기 집중 접근 영역에 해당되는 세트들의 수와 상기 캐시의 웨이(way) 수에 기초하여 상기 캐시를 부분적으로 재구성하는 재구성부 및 상기 집중 접근 영역에 매핑되는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당하는 할당부를 포함한다.In order to accomplish the above object of the present invention, there is provided a reconfiguration cache control apparatus for reconfiguring a form of an n-way set associative cache according to an aspect of the present invention. The cache control apparatus includes a n-way (n is a natural number of 1 or more) A monitoring unit for monitoring a centralized access region composed of sets used intensively among the sets included in the cache; a monitoring unit for monitoring the number of sets corresponding to the centralized access region, A reconfiguration unit that partially reconfigures the cache based on the number of ways of the cache, and an allocator that allocates the address space of the main memory mapped to the concentrated access area to the reconstructed part of the cache.
재구성부는 상기 캐시의 n-웨이 중 적어도 하나의 웨이를 임의로 선택하여, 선택된 상기 웨이를 상기 집중 접근 영역에 해당되는 세트들의 수에 기초하여 재구성한다.The reconstruction unit arbitrarily selects at least one way of the n-way of the cache, and reconstructs the selected way based on the number of sets corresponding to the concentrated access area.
할당부는 상기 집중 접근 세트의 미스율(miss rate)이 기 설정된 미스율 이상인 경우, 상기 집중 접근 영역에 해당되는 세트에 저장되는 데이터를 프로세서 코어로부터 요청 받은 데이터로 교체한다.The allocating unit replaces data stored in the set corresponding to the concentrated access area with data requested from the processor core when the miss rate of the concentrated access set is equal to or greater than a preset miss rate.
할당부는 상기 집중 접근 영역에 해당되는 세트에 매핑되는 메인 메모리의 어드레스 중 데이터 경합을 야기하는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당한다.The allocator allocates the address space of the main memory causing the data contention among the addresses of the main memory mapped to the set corresponding to the concentrated access area to the reconstructed portion of the cache.
본 발명의 다른 일면에 따른 n-웨이(way) 세트 연관 캐시의 형태를 재구성 캐시 제어 방법에 있어서, 상기 캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 하는 단계, 상기 집중 접근 영역에 해당되는 세트들의 수와 상기 캐시의 웨이(way) 수에 기초하여 상기 캐시를 부분적으로 재구성하는 단계 및 상기 집중 접근 영역에 매핑되는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당하는 단계를 포함한다.In another aspect of the present invention, there is provided a reconfiguration cache control method for reconfiguring a form of an n-way set associative cache, the method comprising: monitoring a concentrated access area, which is a set of intensively used sets, Partially reconstructing the cache based on the number of sets corresponding to the centralized access area and the number of ways of the cache and allocating an address space of the main memory mapped to the centralized access area to the cache To the reconstructed portion.
캐시를 부분적으로 재구성하는 단계는 상기 캐시의 n-웨이 중 적어도 하나 이상의 웨이를 임의로 선택하는 단계 및 선택된 상기 웨이들을 상기 집중 접근 영역에 해당되는 세트들의 수에 기초하여 재구성하는 단계를 포함한다.Partially reconfiguring the cache includes arbitrarily selecting at least one of the n-ways of the cache and reconstructing the selected ways based on the number of sets corresponding to the centralized access area.
메인 메모리의 어드레스 공간에 할당하는 단계는 상기 집중 접근 영역에 해당되는 세트들의 수의 미스율(miss rate)을 획득하는 단계 및 획득된 상기 집중 접근 영역에 해당되는 세트들의 미스율이 기 설정된 미스율 이상인 경우, 상기 집중 접근 영역에 해당되는 세트들에 저장되는 데이터를 프로세서로부터 요청 받은 데이터로 교체하는 단계를 포함한다.
Wherein the step of assigning to the address space of the main memory includes the steps of: obtaining a miss rate of the number of sets corresponding to the concentrated access region; and, when the miss rate of the sets corresponding to the concentrated access region is equal to or greater than a predetermined rate, And replacing the data stored in the sets corresponding to the concentrated access area with data requested from the processor.
이상 상술한 바와 같은 본 발명에 따르면, 캐시를 부분적으로 재구성함으로써 캐시의 미스율을 감소시키는 효과가 있다. According to the present invention as described above, there is an effect of reducing the cache miss ratio by partially reconstructing the cache.
아울러, 재구성된 캐시에 실제 데이터 경합을 야기하는 메인 메모리의 어드레스 공간을 할당함으로써, 오버헤드 및 전력소비를 감소시켜 컴퓨터 시스템의 성능을 향상시키는 이점이 있다.
In addition, there is an advantage in that overhead and power consumption are reduced, thereby improving the performance of the computer system, by allocating an address space in the main memory that causes actual data contention in the reconstructed cache.
도 1은 본 발명의 일면에 따른 캐시 제어 장치를 포함한 멀티 코어 프로세서 시스템을 개략적으로 나타낸 도면이다.
도 2는 캐시의 구성을 나타낸 도면이다.
도 3은 본 발명의 일실시예에 따른 캐시 제어 장치의 구성도 이다.
도 4는 본 발명의 일 실시예에 따른 캐시와 메인 메모리 매핑 예를 나타낸 도면이다.
도 5는 본 발명의 일 실시예에 따라 캐시를 부분적으로 재구성한 것을 나타낸 도면이다.
도 6은 본 발명의 실시예에 따라 캐시의 재구성된 부분에 실제 데이터 경합을 야기 하는 어드레스 공간을 할당하는 예를 나타낸 도면이다.
도 7은 본 발명의 일 실시예에 따른 캐시 관리 방법을 나타낸 순서도이다. FIG. 1 is a schematic diagram of a multicore processor system including a cache control apparatus according to an embodiment of the present invention. Referring to FIG.
2 is a diagram showing a configuration of a cache.
3 is a configuration diagram of a cache control apparatus according to an embodiment of the present invention.
4 is a diagram illustrating an example of a cache and a main memory mapping according to an embodiment of the present invention.
5 is a diagram illustrating a partial reconfiguration of a cache in accordance with one embodiment of the present invention.
FIG. 6 illustrates an example of allocating an address space that causes actual data contention in a reconstructed portion of a cache according to an embodiment of the present invention.
7 is a flowchart illustrating a cache management method according to an embodiment of the present invention.
본 발명에서는 캐시의 활용도를 높이기 위해, 캐시에 집중 접근 영역이 발생 이 발생하면, 상기 집중 접근 영역에 포함된 세트(set)의 수와 상기 캐시의 웨이(way)수에 기초하여 상기 캐시를 부분적으로 재구성함으로써, 캐시의 미스율(Miss Rate)을 감소시키는 캐시 제어 장치 및 캐시 관리 방법에 관한 것이다.In the present invention, in order to increase the utilization of the cache, when an occurrence of a centralized access region in the cache occurs, the cache is partially accessed based on the number of sets included in the centralized access region and the number of ways of the cache. To a cache control apparatus and a cache management method for reducing a miss rate of a cache.
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 용이하게 이해할 수 있도록 제공되는 것이며, 본 발명은 청구항의 기재에 의해 정의된다. 한편, 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자 이외의 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다. 이하, 본 발명의 바람직한 실시예를 첨부된 도면들을 참조하여 상세히 설명한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.BRIEF DESCRIPTION OF THE DRAWINGS The advantages and features of the present invention, and the manner of achieving them, will be apparent from and elucidated with reference to the embodiments described hereinafter in conjunction with the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art. And is intended to enable a person skilled in the art to readily understand the scope of the invention, and the invention is defined by the claims. It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. In the present specification, the singular form includes plural forms unless otherwise specified in the specification. It is noted that " comprises, " or "comprising," as used herein, means the presence or absence of one or more other components, steps, operations, and / Do not exclude the addition. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to designate the same or similar components throughout the drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.
도 1은 본 발명의 일 실시 예에 따른 캐시 제어 장치를 포함한 멀티 코어 프로세서 시스템을 개략적으로 나타낸 도면이다. FIG. 1 is a schematic diagram of a multicore processor system including a cache controller according to an embodiment of the present invention. Referring to FIG.
도 1은 멀티 코어 프로세서(100) 시스템의 예시를 나타낸 도면이고, 도 1에 도시된 블록의 물리적인 위치를 한정하지는 않는다. 설계 선택은 예컨대, 하드웨어 크기 및 복잡성 대 성능, 열 에너지 및 방열, 프로세서 속도, 전체 스루풋 (overall throughput) 등의 고려에 의해 조정될 수 있다. 멀티 코어 프로세서 (100) 는 적합한 컴퓨팅 환경, 이를테면 개인용 컴퓨터 (PC) 에 제공될 수 있음을 당업자는 인식할 수 있다. Figure 1 is an illustration of an example of a
도 1에 도시된 바와 같이, 멀티 코어 프로세서 시스템은 멀티코어 프로세어(100) 및 메인 메모리(140)을 포함하고, 멀티코어 프로세서(100)는 프로세서 코어 어레이 (110), 캐시(120), 캐시 제어 장치(130)를 포함한다. 1, a multicore processor system includes a
멀티 코어 프로세서(100) 시스템은 프로세서 코어 어레이(110)를 갖는 단일 집적 회로를 포함할 수 있다. The
프로세서 코어 어레이 (110) 는 복수의 프로세서 코어(111(1)~111(N))들을 포함한다. 각 프로세서 코어(111(1)~111(N))는 마이크로 프로세서 (μP), 마이크로 제어기 (μC), 디지털 신호 프로세서 (DSP), 또는 이들의 임의의 조합을 비한정적으로 포함하는 임의의 원하는 구성을 가질 수 있다. 따라서, 각각의 프로세서 코어(111(1)~111(N))는, 산술 논리 장치 (ALU), 부동 소수점 장치 (FPU), 디지털 신호 처리 (DSP) 코어, 레지스터, 누산기 (accumulator) 등과 같은 다른 기능 블록뿐만 아니라 프로그램 명령들을 실행하기 위한 로직 (logic) 을 포함할 수 있다. 각각의 프로세서 코어(111(1)~111(N))들의 전부 또는 단지 일부는 캐시 메모리 (미도시) 를 포함할 수 있다.The
캐시(120)는 프로세서 코어(111(1)~111(N))들로부터 요청 받는 명령이나 프로그램들이 저장되는 고속 기억 장치이다. 따라서 프로세서 코어(111(1)~111(N))는 캐시(120)에 접근하여 자주 사용하는 데이터나 프로그램 명령을 검색한다. 캐시(120)에는 프로세서 코어(111(1)~111(N))에서 자주 접근하는 데이터나 프로그램 명령이 저장 되어, 프로세서 코어(111(1)~111(N))들이 필요한 데이터를 즉각적으로 사용 할 수 있도록 한다.The
캐시(120)는 휘발성 또는 비 휘발성의 메모리 디바이스로 구현될 수 있다. 예컨대, 캐시(120)는 예컨대, 동적 랜덤 액세스 메모리("DRAM") 디바이스, 정적 랜덤 액세스 메모리 ("SRAM") 디바이스, 또는 플래시 메모리 디바이스로 구현될 수 있다. 캐시(120)는 프로세서 코어(111(1)~111(N))들 중 일부 또는 전부에 의해 공유될 수 있다. The
프로세서 코어(111(1)~111(N))에 의해서 요구되는 데이터를 캐시(120)에서 찾을 수 있다면, 이를 적중(hit)이라고 부른다. 반면, 프로세서 코어(111(1)~111(N))에 의해서 요구되는 데이터를 캐시(120)에서 찾을 수 없다면 이를 미스 (miss)라고 부른다. 미스가 발생 하면, 프로세서 코어(111(1)~111(N))는 필요한 데이터를 포함하는 블록을 찾기 위해 메인 메모리(140)에 접근한다.If the data requested by the processor cores 111 (1) through 111 (N) can be found in the
캐시(120)의 적중률(hit rate)은 캐시(120)에서 찾을 수 있는 프로세서 코어(111(1)~111(N))의 접근 비율이며, 적중률은 캐시(120)의 성능을 평가하는데 이용된다. 미스율(miss rate)은 캐시(120)에서 찾을 수 없는 프로세서 코어(111(1)~111(N))의 접근 비율을 말한다.The hit rate of the
캐시 제어 장치(130)는 캐시(120)의 미스율(miss rate)을 감소 시키기 위해,
캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 하여, 상기 집중 접근 영역에 할당된 세트들의 수와 상기 캐시의 웨이(way) 수에 기초하여 상기 캐시를 부분적으로 재구성한다. 아울러, 캐시 제어 장치(130)는 상기 집중 접근 영역에 매핑되는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당한다.Monitoring a centralized access region comprised of sets of heavily used ones of the sets contained in the cache to determine the number of sets assigned to the centralized access region and the number of ways of the cache, Partially reconstructed. In addition, the
메인 메모리(140)는 프로세서 코어(111(1)~111(N))구동에 필요한 프로그램 및 각종 데이터 및 명령어를 저장한다. 메인 메모리(140)는 DRAM 디바이스 또는 SRAM 디바이스와 같은 휘발성 메모리, 읽기 전용 메모리 (ROM) 디바이스 또는 플래시 메모리 디바이스와 같은 비휘발성 메모리, 데이터 저장 디바이스 이를테면 자기 디스크 저장 장치 (예컨대, 하드디스크 드라이브 또는 HDD), 테이프 저장 장치, 광학 저장 장치 (예컨대, 컴팩트 디스크 또는 CD, 디지털 다기능 디스크 또는 DVD) 또는 착탈식, 비착탈식, 휘발성 또는 비휘발성일 수 있는 다른 머신 판독가능 저장 매체들을 비한정적으로 포함하는 임의의 적합한 형태의 메모리이다.The
본 발명의 실시예에 대한 이해를 돕기 위해, 도 2를 이용하여 캐시동작에 대해 보다 구체적으로 설명한다. For better understanding of the embodiment of the present invention, the cache operation will be described in more detail with reference to FIG.
도 2는 캐시의 구성을 나타낸 도면이다. 캐시(120)는 인덱스 선택부(210), 캐시 태그 어레이(220), 비교부(230), 캐시 데이터 어레이(240), 데이터 선택부(240) 및 멀티플렉서(MUltipleXer; 이하 MUX)(260)를 포함한다.2 is a diagram showing a configuration of a cache. The
캐시(120)에 대한 프로세서 코어(111(1)~111(N))의 접근은 데이터 블록(block) 단위로 이루어질 수 있다. 구체적으로, 캐시(120) 접근의 단위는 데이터 블록일 수 있고, 캐시(120)는 하나 이상의 데이터 블록들을 저장할 수 있다. 기본적으로 데이터 블록은 메인 메모리(140) 내에 저장된다. 캐시(120)가 특정한 데이터 블록들을 저장함에 있어서, 캐시(120)가 사용하는 전체의 슬롯들 중 특정한 슬롯들에게로만 상기의 특정한 데이터 블록의 저장이 제한될 수 있다. 구체적으로, 데이터 블록을 저장하는 메인 메모리(140)의 어드레스 공간(address space)은 데이터 블록의 어드레스에 기반하여 캐시(120)로 매핑될 수 있다.The accesses of the processor cores 111 (1) to 111 (N) to the
인덱스 선택부(210)는 캐시로의 입력과 캐시의 출력 단위의 크기에 맞춰 프로세서 코어(111(1)~111(N))로부터 접근 요청된 데이터 어드레스(10) 중 인덱스 필드(14)의 위치를 조정한다. 구체적으로, 인덱스 선택부(210)는 입출력 단위의 크기에 따라, 프로세서 코어(111(1)~111(N))로부터 요청 받은 데이터 어드레스(10) 상에서 인덱스(14)로 사용될 비트의 위치를 선택한다. The index selection unit 210 selects the position of the
프로세서 코어(111(1)~111(N))로부터 접근 요청된 데이터 어드레스(10)는 태그 필드(12), 인덱스 필드(14) 및 오프세트 필드(16)를 포함한다.The data address 10 requested from the processor cores 111 (1) to 111 (N) includes a
태그 필드(12)는 인덱스 필드(14)에 의해 사상된 캐시(120) 상의 위치에 저장된 데이터 블록이 현재 접근하려는 어드레스의 데이터 블록과 매칭되는지를 식별하기 위해 사용된다.The
인덱스 필드(14)는 메인 메모리(140)의 데이터 블록이 캐시(120) 상에 사상될 위치를 결정한다. 여기서, 위치는 캐시(120)의 하나 이상의 세트들 중 인덱스 필드(14)에 대응하는 하나의 세트를 나타낼 수 있다. 예컨대, 인덱스 필드(14)가 i 비트(bit)라면, 캐시(120) 상에 데이터 블록이 사상될 수 있는 위치(set)의 개수는 2i개일 수 있다. 구체적으로, 데이터 어드레스(10)의 인덱스 필드(14)의 값이 x 라면, 데이터 블록은 캐시의 x 번째 세트에 사상될 수 있다. 전술한 태그 필드(12) 및 인덱스 필드(14)에 의해 캐시 내에 저장된 데이터 블록들이 메인 메모리의 어드레스 공간 중 어느 어드레스의 데이터 블록인지가 식별될 수 있다.The
오프세트 필드(16)는 인덱스 필드(14) 및 태그 필드(312) 외의 나머지 최하위 비트들일 수 있다. 오프세트 필드(16)는 메인 메모리(140) 어드레스 공간의 위치를 나타내는 어드레스의 비트들 중 데이터 블록 및 캐시 상의 위치 간의 사상에 무관한 비트들 일 수 있다. 오프세트 필드(16)의 크기는 캐시의 접근 단위인 데이터 블록의 크기에 대응할 수 있다. 예컨대, 오프세트 필드(16)가 j 비트라면, 데이터 블록의 크기는 2 j 바이트(byte), n2 j 바이트(byte) 또는 2 j 워드(word) 등일 수 있다. 상기의 설명에서, i, j 및 n은 각각 0 이상의 정수일 수 있다.The offset
데이터 어드레스(10)의 크기, 태그 필드(12)의 크기, 인덱스 필드(14)의 크기 및 오프세트(16)의 크기는 캐시 또는 캐시를 포함하는 컴퓨터 시스템에 의존적으로 결정될 수 있다.The size of the
데이터 어드레스(10) 중 인덱스 필드(14)에 의해 캐시 데이터 어레이(250) 내의 세트들 중 메인 메모리(140)의 데이터 블록에 대응하는 세트가 결정된다. 인덱스 필드(14)에 의해 캐시 데이터 어레이(250) 내의 세트가 결정되면 선택된 세트의 웨이들 중 하나의 웨이가 데이터 블록에 대한 접근을 위해 사용될 수 있다. 여기서, 접근은 데이터 블록의 저장을 포함할 수 있다. 예컨대, 데이터 블록은 인덱스 필드(14)에 의해 결정되는 세트의 웨이들 중 비어있는 웨이 또는 캐시 정책에 의해 선택된 웨이에 저장될 수 있다.A set corresponding to the data block of the
캐시 태그 어레이(220)는 메인 메모리의 데이터 블록에 대한 태그를 저장한다. 캐시 태그 어레이(220)는 M개의 세트들(sets) 및 N개의 웨이(way)로 구분될 수 있다. 구체적으로, 데이터 어드레스(10) 중 인덱스 필드(14)에 의해 캐시 태그 어레이(220) 내의 세트들 중 데이터 블록에 대응하는 세트가 결정된다. 예컨대, 캐시 태그 어레이(220)의 i 번째 행의 j 번째 열에는 캐시 데이터 어레이(220)의 i-세트의 j-웨이에 저장된 데이터 블록에 대한 태그(12)가 저장된다.The
비교부(230)는 캐시 태그 어레이(220)에 저장된 태그들 및 데이터 어드레스(10)의 태그 필드(12) 값들을 비교한다. 예컨대, 데이터 어드레스(10)의 인덱스 필드(14)에 의해 결정된 캐시 태그 어레이(220)의 세트가 제1 세트(221)라고 가정하면, 비교기(230)는 캐시 태그 어레이(220)의 제1 세트(221)의 N 개의 웨이들에 저장된 태그들에 대하여, 저장된 태그들의 각각의 값 및 데이터 블록 어드레스(10)의 태그 필드(12) 값을 비교한다. 상기의 비교는 저장된 태그들에 대하여 동시에 이루어질 수 있다. 만약, 비교결과로 제1 세트(221)의 N 개의 웨이들 중 하나인 제2 웨이에 저장된 태그와 데이터 어드레스(10)의 태그 필드(12)의 값이 동일하다면, 캐시 적중(hit)이 발생한다. 반면, 상기의 비교의 결과로서, 제1 세트(221)의 N 개의 웨이에 저장된 태그들의 값들 중 데이터 블록 어드레스(10)의 태그 필드(12) 값과 동일한 값이 없다면 캐시 미스(miss)가 발생한다.The comparing
데이터 선택부(240)는 비교부(230)로부터 얻은 비교 결과 및 캐시 히트 조건에 대해 논리 곱 연산 AND를 수행하여 얻은 결과를 통해 캐시 적중이 발생하였는지 여부를 결정한다. 데이터 선택부(240)는 캐시 연관에 따라 캐시 데이터 어레이(250)의 출력을 제어한다. 구체적으로, 데이터 선택부(240)에 의해 캐시 데이터 어레이(240)의 선택된 세트의 복수의 웨이들 중 적어도 하나의 웨이를 출력할 수 있고, 상기 적어도 하나의 웨이의 개수는 캐시의 연관수에 의해 결정될 수 있다. The
캐시 데이터 어레이(250) 내의 세트들 중 인덱스 필드(14)에 의해 메인 메모리(140)의 데이터 블록에 대응하는 세트가 결정된다. 캐시 데이터 어레이(250) 내의 세트가 결정되면 선택된 세트의 웨이들 중 하나가 데이터 블록에 대한 접근을 위해 사용된다. 캐시 데이터 어레이(250)는 m개의 행 및 n개의 열로 구분될 수 있다. 일 예에서 캐시 데이터 어레이(250)의 I 번째 행은 I-세트에 대응할 수 있고, J 번째 열은 J-웨이에 대응할 수 있다. The set corresponding to the data block of the
MUX(260)는 데이터 선택부(240)로부터 캐시 적중 신호를 획득하면, 인덱스 선택부(210)에 의해 선택된 세트의 하나 이상의 웨이들 중 데이터 선택부(240)의 신호에 의해 지정된 웨이를 출력하여 프로세서 코어(111(1)~111(N))로 전달한다. 반면, MUX(260)는 데이터 선택부(240)로부터 캐시 미스 신호를 획득하면, MUX(260)는 데이터 어드레스(10)에 대한 메인 메모리(140)로 접근 신호를 출력한다.When a cache hit signal is obtained from the
도 3은 본 발명의 일실시예에 따른 캐시 제어 장치의 구성도이다. 3 is a configuration diagram of a cache control apparatus according to an embodiment of the present invention.
도 3에 도시된 바와 같이, 캐시(120)의 미스율(miss rate)을 감소시키기 위한 캐시 제어 장치(130)는 모니터링부(131), 재구성부(133) 및 할당부(135)를 포함한다.3, the
모니터링부(131)는 캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 한다. 여기서 집중 접근 영역이란, 캐시에 포함된 세트들(sets)의 접근빈도가 기 설정된 접근빈도 이상인 세트를 의미 할 수 있다.The
재구성부(133)는 모니터링부(131)로부터 집중 접근 영역에 해당되는 세트의 수와 캐시의 웨이(way)수에 기초하여 캐시를 부분적으로 재구성한다. 예컨대, 재구성부(133)는 캐시의 n-웨이(n은 1이상의 자연수) 중 하나의 웨이를 임의로 선택하여, 선택된 상기 웨이를 상기 집중 접근 영역에 해당되는 세트의 수로 재구성하거나, 캐시의 n-웨이 중 적어도 하나 이상의 웨이를 임의로 선택하여, 선택된 상기 웨이들을 상기 집중 접근 영역에 해당되는 세트의 수로 재구성한다.The
할당부(135)는 상기 집중 접근 영역에 해당되는 세트에 매핑되는 메인 메모리의 어드레스 공간 중 데이터 경합을 야기하는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 매핑한다.The allocating
도 4는 본 발명의 일 실시예에 따른 캐시와 메인 메모리 매핑 예를 나타낸 도면이다. 4 is a diagram illustrating an example of a cache and a main memory mapping according to an embodiment of the present invention.
도 4에는 일실시예로서, 4-웨이 연관 캐시(4-way associative cache)(410) 및 상기 4-웨이 연관 캐시(410) 에 포함된 세트들(sets)을 메인 메모리(420)의 어드레스 공간으로 매핑한 예가 도시된다. 4, a set of 4-way
실시예에 따라 모니터링부(131)를 통해 캐시(410)에 포함된 세트들로 프로세서 코어(111(1)~111(N))의 접근 빈도를 모니터링 하면, 캐시(410)에 포함된 모든 세트로 프로세서 코어(111(1)~111(N))가 접근 하지 않고 특정 세트들(411)에만 집중적으로 프로세서 코어(111(1)~111(N))의 접근이 이루어 지는 것을 알 수 있다. 모니터링부(131)는 캐시에 포함된 세트들(sets)의 프로세서 코어(111(1)~111(N))로부터의 접근빈도 등을 모니터링 하여, 상기 접근빈도가 기 설정된 접근빈도 이상인 세트로 구성되는 집중 접근 영역(411) 발생여부를 판단한다. 일반적으로, 집중 접근 영역(411)에 할당되는 메인 메모리 데이터의 공간적 지역성(Spatial locality)에 의한 공간적 상관관계 때문에 집중 접근 영역(411)을 구성하는 셋들은 인접하여 위치한다.If monitoring the access frequencies of the processor cores 111 (1) to 111 (N) with the sets included in the
집중 접근 영역(411)들을 메인 메모리(420)의 어드레스 공간에 매핑시켜 보면, 집중 접근 영역(411)을 구성하는 셋의 수에 따라 일정한 간격을 가지고 메인 메모리 어드레스 공간(MAS0(0~128), MAS1(1024+1~1024+128), MAS2(2048+1~2048+128))에 매핑되는 것을 알 수 있다. The central
도 4에 도시된 실시예에 따른 4-웨이 연관 캐시(410)의 경우, 메인 메모리(140)의 각 어드레스 공간은 캐시(410)에 매핑 될 때, 4개의 선택 가능한 캐시의 태그(tag)를 가진다. In the case of the four-way
도 5는 본 발명의 일 실시예에 따라 캐시를 부분적으로 재구성한 것을 나타낸 도면이다. 5 is a diagram illustrating a partial reconfiguration of a cache in accordance with one embodiment of the present invention.
캐시 제어 장치(130)는 캐시의 미스율(miss rate)을 감소 시키기 위해, 집중 접근 영역(510)을 구성하는 세트의 수와 상기 캐시의 웨이(way)수에 기초하여 상기 캐시를 부분적으로 재구성한다. The
이때, 재구성부(133)는 상기 캐시의 n-웨이 중 하나의 웨이를 임의로 선택하여, 선택된 상기 웨이를 상기 집중 접근 영역(510)을 구성하는 세트의 수로 재구성 할 수 있다. 예컨대, 재구성부(133)는 도 5에 도시된 바와 같이 4-웨이 부분연관 캐시에서 4개의 웨이 중 하나의 웨이(예컨대, 4 웨이)를 임의로 선택하여 집중 접근 영역(510)을 구성하는 세트의 개수에 맞추어 선택된 웨이를 재구성 한다. 구체적으로, 도시된 실시예에서 재구성부(133)는 9개의 세트들로 구성된 하나의 웨이를 선택하여, 집중 접근 영역(510)을 구성하는 세트의 수 (예컨대, 3개) 에 따라 3개의 웨이(520)로 재구성한다. At this time, the reconfiguring
재구성 된 캐시의 형태는 집중 접근 영역(510)의 성질에 따라 달라질 수 있다. 여기서, 집중 접근 영역(510)의 성질이란 집중 접근 영역(510)에 해당하는 세트의 수를 의미한다. 도시된 실시예에서는 집중 접근 영역(510)에 해당하는 세트의 수가 3이므로, 재구성된 부분(520)은 하나의 웨이에 3개의 세트를 가지게 구성하여 총 3개의 연관(associativity)을 가진다.The form of the reconstructed cache may vary depending on the nature of the
다른 실시예로서, 8개의 세트로 구성된 웨이 중 집중 접근 영역에 해당하는 세트의 수가 2개인 경우, 재구성부(133)는 임의의 선택된 웨이를 재구성 할 때, 한 개의 웨이에 포함된 8개의 세트를 집중 접근 영역을 구성하는 세트의 수인 2개의 세트로 재구성한다. 그러면, 2개의 세트로 구성된 4개의 웨이로 캐시가 재구성된다. 이때, 캐시의 재구성된 부분은 하나의 웨이에 2개의 세트를 가지게 구성하여 총 2개의 연관을 가진다. 실시예에서, 재구성 되기 위해 선택되는 웨이의 수는 캐시 설계 시 캐시의 연관 수 및 웨이에 포함되는 세트의 수에 따라 임의로 설정 가능하다.As another example, when the number of sets corresponding to the concentrated access region among the eight-way sets is two, the
또한, 재구성부(133)는 상기 캐시의 n-웨이 중 적어도 하나 이상의 웨이를 임의로 선택하여, 선택된 상기 웨이들을 상기 집중 접근 영역에 해당하는 세트의 수로 재구성 할 수 있다. 예컨대, 4웨이 9세트 캐시에서 3개의 세트에 해당하는 집중 접근 영역이 발생하면, 재구성부(133)는 임의의 두 개의 웨이를 선택하여 선택된 웨이 각각을 집중 접근 영역을 구성하는 세트의 수인 3개로 재구성 할 수 있다. 실시예에서, 재구성부(133)에 의해 선택된 2개의 웨이는 총 6개의 웨이로 재구성된다. 따라서, 재구성부(133)에 의한 부분적 재구성 이후, 캐시는 총 9개의 웨이를 가지게 된다.In addition, the
도 6은 본 발명의 실시예에 따라 캐시의 재구성된 부분에 실제 데이터 경합을 야기하는 어드레스 공간을 할당하는 예를 나타낸 도면이다. FIG. 6 illustrates an example of allocating an address space that causes actual data contention in a reconstructed portion of a cache according to an embodiment of the present invention.
도 6에 도시된 바와 같이, 메인 메모리(610)의 어드레스 공간은 집중 접근 영역을 구성하는 세트에 매핑되는 어드레스 공간(MAS0 ~ MAS5)을 포함한다.As shown in FIG. 6, the address space of the
접근 영역을 구성하는 세트에 매핑되는 어드레스 공간(MAS0 ~ MAS5)은 실제로 접근이 많아서 캐시에서 심한 데이터 경합을 야기하는 어드레스 공간(MAS0, MAS3)과 데이터 경합이 심하지 않은 어드레스 공간(MAS1, MAS2, MAS4, MAS5)을 포함한다. The address space MAS0 to MAS5 mapped to the set constituting the access area includes address spaces MAS0 and MAS3 which cause a serious data contention in the cache due to a large number of accesses and addresses spaces MAS1, MAS2, and MAS4 , MAS5).
캐시 메모리(620)의 저장 공간은 심한 데이터 경합을 야기하는 어드레스 공간(MAS0, MAS3)이 매핑되는 부분(621)과 그 외의 어드레스 공간(MAS1, MAS2, MAS4, MAS5)이 매핑되는 부분(623)을 포함한다. 심한 데이터 경합을 야기하는 어드레스 공간(MAS0, MAS3)이 매핑되는 부분(621)은 재구성부(133)에 의해 재구성된 부분(60)을 포함한다.The storage space of the
실시예에서 재구성부(133)는 9개의 세트들이 포함된 한 개의 웨이를 선택하여 접근 영역에 해당하는 세트의 수(3개)에 따라, 한 개의 웨이를 3개의 웨이로 재구성한다. 때문에 재구성된 부분(60)에 도시된 바와 같이, 재구성부(133)에 의해 선택된 하나의 웨이는 3개의 세트를 가진 3개의 웨이로 재구성된다. In the embodiment, the
본 발명의 실시예에 따라, 실제로 데이터 접근이 많아서 경합이 심한 지역의 메인 메모리(610) 어드레스 공간(MAS0, MAS3)이 캐시(620)에 매핑될 때, 데이터 경합이 심한 메인 메모리 어드레스(MAS0, MAS3)는 캐시(620)의 재구성된 부분(60)을 포함하는 캐시(620)의 저장 공간(621)에 매핑된다. 메인 메모리(610) 어드레스 공간(MAS0, MAS3)이 캐시(620)에 매핑될 때, 할당되는 캐시(620)의 웨이 수가 증가한다. According to the embodiment of the present invention, when the
구체적으로, 실시예에서는 메인 메모리(610) 어드레스 공간(MAS0, MAS3)이 캐시(620)에 매핑될 때 4웨이에서 6웨이로 데이터 경합이 심한 메인 메모리 어드레스(MAS0, MAS3)에 매핑되는 태그가 증가한다. 캐시의 재구성으로 인해 증가되는 태그 때문에, 프로세서 코어(111(1)~111(N))로부터 많은 요청을 받는 데이터를 캐시에 저장함으로써, 캐시의 미스율을 감소 시킬 수 있다. More specifically, in the embodiment, when the address space MAS0 and MAS3 of the
또한, 캐시의 미스율을 감소시키기 위해 할당부(135)는 메인 메모리(610) 어드레스 공간을 선별적으로 캐시의 재구성된 부분(60)에 할당한다. 구체적으로, 할당부(135)는 재구성된 부분(60)을 실제 데이터 경합을 야기하는 어드레스 공간(MAS0, MAS3))에 할당한다. 아울러, 할당부(135)는 캐시의 미스율을 감소 시키기 위해 캐시(620)의 교체 정책을 수정하여 집중 접근 세트들 중 특정 세트가 기 설정된 미스율을 초과할 경우 상기 특정 세트에 저장되는 데이터를 교체한다. In addition, in order to reduce the cache miss rate, the
여기서, 캐시(620)의 교체 정책(Replacement Policy)이란 캐시의 모든 세트가 데이터로 채워져 있는 상태에서 프로세서 코어(111(1)~111(N))가 캐시에 접근하여 원하는 데이터를 찾을 수 없는 미스일 때, 캐시의 특정 세트에서 데이터를 제거하고 메인 메모리(140)에서 새로운 데이터 블록을 가져오는 것이다. 캐시 미스가 발생한 경우에, 접근하려는 데이터 블록은 우선 캐시 내에 저장될 수 있다. 캐시 내에 상기의 데이터 블록의 저장을 위해 사용될 수 있는 공간들 중 빈 공간이 없으면, 상기의 데이터 블록은 캐시 내에 이미 저장된 다른 데이터 블록과 교체 되어야 한다. 캐시 미스로 인한 교체를 통해 캐시에서 방출되는 데이터 블록을 희생자(victim)로 칭한다. 희생자는 캐시의 교체 정책(Replacement Policy)에 따라 결정될 수 있다. 캐시의 어느 세트에서 데이터를 제거할지 결정하는 방식이 교체 정책(Replacement Policy)이다. 일반적인 교체정책에는 LRU(Least Recently Used), LFU(Least Frequently Used), FIFO(First in First out), Random 등이 있다. Here, the replacement policy of the
아울러, 할당부(135)는 경합이 심한 지역을 제외한 집중 접근 영역에 해당되는 세트에 매핑되는 메인 메모리의 어드레스 공간 (MAS1, MAS2, MAS4, MAS5)은 캐시의 재구성되지 않은 다른 세트(623)에 매핑할 수 있다. In addition, the allocating
결과적으로, 할당부(135)는 데이터 경합이 심한 지역의 메인 메모리 공간(MAS0, MAS3)을 캐시의 재구성된 부분(60)을 포함하는 영역(621)에 할당 함으로써, 재구성 이전보다 각 메인 메모리 공간에 할당 되는 캐시의 웨이를 증가시킴으로써, 캐시의 미스율을 감소시킨다.As a result, the allocating
도 7은 본 발명의 일 실시예에 따른 캐시 관리 방법을 나타낸 순서도이다. 이하, 도 7을 이용하여 본 발명의 일 실시예에 따른 캐시 관리 방법에 대해 보다 구체적으로 설명한다. 7 is a flowchart illustrating a cache management method according to an embodiment of the present invention. Hereinafter, a cache management method according to an embodiment of the present invention will be described in detail with reference to FIG.
모니터링부(131)는 캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 한다(S710). 예컨대, 단계 S710 에서 모니터링부(131)는 일정 시간 동안 캐시에 포함된 각 세트들에 대한 사용패턴을 모니터링 하기 위해, 모니터링부(131)은 캐시에 포함된 세트들(sets)로의 프로세서 코어(111(1)~111(N))의 접근빈도를 모니터링할 수 있다. The
모니터링부(131)는 상기 집중적으로 사용되는 세트들로 구성된 집중 접근 영역이 발생하는지 판단한다(S720). 예컨대, 단계 S720 에서 모니터링부(131)은 접근빈도가 기 설정된 접근빈도 이상인 집중 접근 영역이 발생하는지 판단한다. The
재구성부(133)는 상기 집중 접근 영역에 해당되는 세트들의 수와 상기 캐시의 웨이(way) 수에 기초하여 상기 캐시를 부분적으로 재구성한다(S730). 예컨대, 단계 S730 에서 재구성부(133)는 상기 집중 접근 영역에 해당되는 세트들의 수와 상기 캐시의 웨이(way)수에 기초하여 상기 캐시를 부분적으로 재구성한다. 이때, 재구성부(133)는 상기 캐시의 n-웨이 중 하나 또는 복수개의 웨이를 임의로 선택하여 선택된 상기 웨이를 상기 집중 접근 영역에 해당되는 세트들의 수로 재구성한다.The
할당부(135)는 상기 집중 접근 영역에 해당되는 세트들에 매핑되는 메인 메모리의 어드레스 중 데이터 경합을 야기하는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당한다(S740). 이때, 단계 S740에서 할당부(135)는 상기 집중 접근 세트의 미스율(miss rate)을 획득하여, 획득된 상기 집중 접근 세트의 미스율이 기 설정된 미스율 이상인 경우, 상기 집중 접근 세트에 저장되는 데이터를 프로세서 코어(111(1)~111(N))로부터 요청 받은 데이터로 교체할 수 있다. The allocating
도 1 내지 도 6을 참조하여 전술된 설명은 도 7의 실시예에서도 적용될 수 있다. 중복되는 설명은 생략한다.The above description with reference to Figs. 1 to 6 can also be applied to the embodiment of Fig. Duplicate description is omitted.
본 발명의 일실시예에 따른 캐시 제어 장치 및 그 방법은 집중 접근 영역에 해당되는 세트의 수와 상기 캐시의 웨이(way)수에 기초하여 상기 캐시를 부분적으로 재구성 함으로써 캐시의 미스율을 감소 시키는 이점을 제공한다.A cache control apparatus and method according to an embodiment of the present invention is characterized by an advantage of reducing the cache miss rate by partially reconstructing the cache based on the number of sets corresponding to the concentrated access area and the number of ways of the cache .
본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 본 발명의 보호범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구의 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.It will be understood by those skilled in the art that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. It is therefore to be understood that the above-described embodiments are illustrative in all aspects and not restrictive. The scope of the present invention is defined by the appended claims rather than the detailed description, and all changes or modifications derived from the scope of the claims and their equivalents should be construed as being included within the scope of the present invention.
Claims (7)
캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 하는 모니터링부;
상기 집중 접근 영역에 해당되는 세트들의 수와 상기 캐시의 웨이(way) 수에 기초하여 상기 캐시를 부분적으로 재구성하는 재구성부 및
상기 집중 접근 영역에 매핑되는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당하는 할당부
를 포함하는 캐시 제어 장치.
(n is a natural number equal to or greater than 1) set associative cache in a cache,
A monitoring unit for monitoring a concentrated access area consisting of sets used intensively among sets included in the cache;
A reconstruction unit that partially reconstructs the cache based on the number of sets corresponding to the centralized access area and the number of ways of the cache,
An allocation unit for allocating an address space of a main memory mapped to the concentrated access area to a reconstructed part of the cache,
And a cache control unit.
상기 캐시의 n-웨이 중 적어도 하나의 웨이를 임의로 선택하여, 선택된 상기 웨이를 상기 집중 접근 영역에 해당되는 세트들의 수에 기초하여 재구성하는 것
인 캐시 제어 장치.
The apparatus of claim 1, wherein the reconstruction unit
Ways of the n-way of the cache, and reconstructs the selected way based on the number of sets corresponding to the concentrated access area
In cache control device.
상기 집중 접근 세트의 미스율(miss rate)이 기 설정된 미스율 이상인 경우, 상기 집중 접근 영역에 해당되는 세트에 저장되는 데이터를 프로세서 코어로부터 요청 받은 데이터로 교체하는 것
인 캐시 제어 장치.
2. The apparatus of claim 1, wherein the allocator
And replacing data stored in the set corresponding to the concentrated access area with data requested from the processor core when the miss rate of the concentrated access set is equal to or greater than a preset miss rate
In cache control device.
상기 집중 접근 영역에 해당되는 세트에 매핑되는 메인 메모리의 어드레스 중 데이터 경합을 야기하는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당하는 것
인 캐시 제어 장치.
2. The apparatus of claim 1, wherein the allocator
Assigning an address space of a main memory that causes data contention among the addresses of the main memory mapped to the set corresponding to the centralized access area to the reconstructed portion of the cache
In cache control device.
상기 캐시에 포함된 세트들(sets) 중 집중적으로 사용되는 세트들로 구성된 집중 접근 영역을 모니터링 하는 단계;
상기 집중 접근 영역에 해당되는 세트들의 수와 상기 캐시의 웨이(way) 수에 기초하여 상기 캐시를 부분적으로 재구성하는 단계 및
상기 집중 접근 영역에 매핑되는 메인 메모리의 어드레스 공간을 상기 캐시의 재구성된 부분으로 할당하는 단계
를 포함하는 캐시 제어 방법.
Method for reconfiguring the form of an n-way set associative cache A method for controlling a cache,
Monitoring a centralized access area comprising sets of heavily used ones of the sets contained in the cache;
Partially reconstructing the cache based on the number of sets corresponding to the centralized access area and the number of ways of the cache,
Assigning an address space of a main memory mapped to the centralized access area to a reconstructed portion of the cache
Lt; / RTI >
상기 캐시의 n-웨이 중 적어도 하나 이상의 웨이를 임의로 선택하는 단계 및
선택된 상기 웨이들을 상기 집중 접근 영역에 해당되는 세트들의 수를 기초로 재구성하는 단계
를 포함하는 것인 캐시 관리 방법.
6. The method of claim 5, wherein partially restructuring the cache further comprises:
Arbitrarily selecting at least one of the n-ways of the cache and
Reconstructing the selected ways based on the number of sets corresponding to the concentrated access area
The cache management method comprising:
상기 집중 접근 영역에 해당되는 세트들의 수의 미스율(miss rate)을 획득하는 단계 및
획득된 상기 집중 접근 영역에 해당되는 세트들의 미스율이 기 설정된 미스율 이상인 경우, 상기 집중 접근 영역에 해당되는 세트들에 저장되는 데이터를 프로세서로부터 요청 받은 데이터로 교체하는 단계
를 포함하는 것인 캐시 관리 방법.
6. The method of claim 5, wherein allocating to the address space of the main memory
Obtaining a miss rate of the number of sets corresponding to the centralized access area and
Replacing the data stored in the sets corresponding to the concentrated access area with data requested from the processor when the miss ratio of the sets corresponding to the acquired concentrated access area is equal to or greater than a preset mis-
The cache management method comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140030971A KR102317248B1 (en) | 2014-03-17 | 2014-03-17 | Cache management apparatus and method of using partial reconfiguration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020140030971A KR102317248B1 (en) | 2014-03-17 | 2014-03-17 | Cache management apparatus and method of using partial reconfiguration |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20150108148A true KR20150108148A (en) | 2015-09-25 |
KR102317248B1 KR102317248B1 (en) | 2021-10-26 |
Family
ID=54246265
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020140030971A KR102317248B1 (en) | 2014-03-17 | 2014-03-17 | Cache management apparatus and method of using partial reconfiguration |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102317248B1 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060271723A1 (en) * | 2005-04-29 | 2006-11-30 | Giuseppe Visalli | Cache memory system |
KR20110080479A (en) * | 2010-01-06 | 2011-07-13 | 주식회사 태진인포텍 | Flash memory storage device according to the multi-level buffer cache management policy and management method using the same |
KR20110127733A (en) * | 2009-03-03 | 2011-11-25 | 콸콤 인코포레이티드 | Configurable cache and method to configure same |
KR20130018412A (en) * | 2010-04-21 | 2013-02-21 | 엠파이어 테크놀로지 디벨롭먼트 엘엘씨 | Storage efficient sectored cache |
WO2013113206A1 (en) * | 2012-02-01 | 2013-08-08 | 中兴通讯股份有限公司 | Smart cache and smart terminal |
KR20140045364A (en) * | 2011-05-10 | 2014-04-16 | 어드밴스드 마이크로 디바이시즈, 인코포레이티드 | Efficient tag storage for large data caches |
KR20140135580A (en) * | 2013-05-16 | 2014-11-26 | 이화여자대학교 산학협력단 | Method for replacing cache memory blocks with for lower amount of write traffic and information processing apparatus having cache subsystem using the same |
-
2014
- 2014-03-17 KR KR1020140030971A patent/KR102317248B1/en active IP Right Grant
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060271723A1 (en) * | 2005-04-29 | 2006-11-30 | Giuseppe Visalli | Cache memory system |
KR20110127733A (en) * | 2009-03-03 | 2011-11-25 | 콸콤 인코포레이티드 | Configurable cache and method to configure same |
KR20110080479A (en) * | 2010-01-06 | 2011-07-13 | 주식회사 태진인포텍 | Flash memory storage device according to the multi-level buffer cache management policy and management method using the same |
KR20130018412A (en) * | 2010-04-21 | 2013-02-21 | 엠파이어 테크놀로지 디벨롭먼트 엘엘씨 | Storage efficient sectored cache |
KR20140045364A (en) * | 2011-05-10 | 2014-04-16 | 어드밴스드 마이크로 디바이시즈, 인코포레이티드 | Efficient tag storage for large data caches |
WO2013113206A1 (en) * | 2012-02-01 | 2013-08-08 | 中兴通讯股份有限公司 | Smart cache and smart terminal |
KR20140135580A (en) * | 2013-05-16 | 2014-11-26 | 이화여자대학교 산학협력단 | Method for replacing cache memory blocks with for lower amount of write traffic and information processing apparatus having cache subsystem using the same |
Also Published As
Publication number | Publication date |
---|---|
KR102317248B1 (en) | 2021-10-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101894132B1 (en) | Apparatuses and methods for adaptive control of memory | |
JP6752292B2 (en) | Scaled set dueling of cache replacement policies | |
EP2992438B1 (en) | Memory network | |
Jevdjic et al. | Unison cache: A scalable and effective die-stacked DRAM cache | |
US10126964B2 (en) | Hardware based map acceleration using forward and reverse cache tables | |
US20160357674A1 (en) | Unified Online Cache Monitoring and Optimization | |
US9311228B2 (en) | Power reduction in server memory system | |
KR102414157B1 (en) | hybrid cache | |
US11294808B2 (en) | Adaptive cache | |
US8838901B2 (en) | Coordinated writeback of dirty cachelines | |
US11507516B2 (en) | Adaptive cache partitioning | |
US20140181402A1 (en) | Selective cache memory write-back and replacement policies | |
Hameed et al. | Simultaneously optimizing DRAM cache hit latency and miss rate via novel set mapping policies | |
US20170083444A1 (en) | Configuring fast memory as cache for slow memory | |
WO2018057129A1 (en) | Multi-level system memory having near memory space capable of behaving as near memory cache or fast addressable system memory depending on system state | |
US20170357596A1 (en) | Dynamically adjustable inclusion bias for inclusive caches | |
KR102317248B1 (en) | Cache management apparatus and method of using partial reconfiguration | |
KR101591583B1 (en) | Method and apparatus for caching | |
Wang et al. | Rethinking the Interactivity of OS and Device Layers in Memory Management | |
Rucker et al. | NVM cache with predictive allocation | |
Xie et al. | Coarse-granularity 3D Processor Design |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E90F | Notification of reason for final refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |