KR20020042077A - A method for snooping and fetching for cache coherency - Google Patents
A method for snooping and fetching for cache coherency Download PDFInfo
- Publication number
- KR20020042077A KR20020042077A KR1020000071811A KR20000071811A KR20020042077A KR 20020042077 A KR20020042077 A KR 20020042077A KR 1020000071811 A KR1020000071811 A KR 1020000071811A KR 20000071811 A KR20000071811 A KR 20000071811A KR 20020042077 A KR20020042077 A KR 20020042077A
- Authority
- KR
- South Korea
- Prior art keywords
- data
- cpu2
- cpu1
- bus
- cpu
- Prior art date
Links
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/0804—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches with main memory updating
-
- 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/0815—Cache consistency protocols
- G06F12/0831—Cache consistency protocols using a bus scheme, e.g. with bus monitoring or watching means
-
- 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/62—Details of cache specific to multiprocessor cache arrangements
- G06F2212/621—Coherency control relating to peripheral accessing, e.g. from DMA or I/O device
Abstract
Description
본 발명은 멀티 프로세서 보드에서 라이트 백(write back) 캐쉬 모드에서의 캐쉬 코히어런시(cache coherency)에 관한 것으로서, 특히 캐쉬 히트(cache hit)가 발생하였을 때의 다른 씨피유(CPU)의 데이타 읽기 시간을 단축할수 있도록 하는 캐쉬 코히어런시를 위한 스누핑(snooping)과 페칭(fetching) 방법에 관한 것이다.The present invention relates to cache coherency in write back cache mode in a multi-processor board. In particular, the present invention reads data of another CPU when a cache hit occurs. A snooping and fetching method for cache coherency that can save time.
일반적으로, 임베디드(embeded) 시스템(embeded system)에서 성능 향상을 위해 하나의 보드에 2개 이상의 CPU를 사용하는 멀티프로세서 방식을 쓰기도 한다.In general, embedded systems use a multiprocessor approach that uses two or more CPUs on a board to improve performance.
즉, 상기와 같은 멀티프로세서 방식은 도 1에 도시된 바와같이, 2개의 CPU1(1), CPU2(2)가 있고 각각 캐쉬1(3), 캐쉬2(4)가 있으며, 하나의 메모리(5)를 공유하게 된다.That is, as shown in FIG. 1, the multiprocessor method includes two CPU1 (1) and CPU2 (2), each having a cache 1 (3) and a cache 2 (4), and one memory (5). ) Will be shared.
이 경우 CPU1(1), CPU2(2)와 메모리(5)는 어드레스, 데이타 버스 등으로 연결되어 있는 버스 아비터(6)가 이 버스의 사용권을 조정한다(bus grant).In this case, the bus arbiter 6, which is connected to the CPU 1 (1), the CPU 2 (2) and the memory 5 by an address, a data bus, or the like, adjusts the use right of the bus (bus grant).
이때, 버스의 사용권을 받은 CPU(CPU1 또는 CPU2)가 버스 마스터가 된다.At this time, the CPU (CPU1 or CPU2) that has received the bus right becomes the bus master.
그런데, 각 CPU(CPU1 또는 CPU2)는 데이타 처리속도를 높이기 위해 메모리(5)로 부터 데이타를 읽어와서 캐쉬에 넣어두고 작업한다.By the way, each CPU (CPU1 or CPU2) reads data from the memory 5 and puts it in the cache to increase the data processing speed.
CPU(CPU1 또는 CPU2)는 캐쉬1,2(3)(4)에 있는 데이타를 읽기도 하고 쓰기도 하므로, 캐쉬1,2(3)(4)에 있는 값과 메모리(5)에 있는 값이 다를수 있다.The CPU (CPU1 or CPU2) reads and writes data in caches 1, 2 (3) (4), so the value in caches 1,2 (3) (4) and the value in memory (5) may be different. have.
따라서, 만일 다른 CPU(CPU1 또는 CPU2)가 버스 마스터가 되어 메모리(5)로 부터 읽어 가려는 데이타가 이미 이전에 CPU(CPU1 또는 CPU2)가 바꾼값이라면 연산 오류가 일어날수 있는데 이러한 일이 발생하지 않도록 하는 것이 캐쉬 코히어런시 이다.Therefore, if another CPU (CPU1 or CPU2) becomes the bus master and the data to be read from the memory (5) has already been changed by the CPU (CPU1 or CPU2) previously, an operation error may occur. It is cache coherency.
상기 캐쉬1,2(3)(4)를 사용하는 방법에는 크게 write-through의 라이트백이 있는데, 상기 write-through는 캐쉬1,2(3)(4)에 데이타를 쓸 때 동시에 메모리(5)에도 데이타를 쓰는 방법이고,The method of using the cache 1, 2 (3) (4) has a large write-through writeback, the write-through is a memory (5) at the same time when writing data to the cache 1, 2 (3) (4) Is to write data to
라이트백은 캐쉬1,2(3)(4)에 데이타를 쓸 때 메모리(5)에 데이타를 쓰지 않으므로서 쓰기 시간을 단축시키다가 필요시 캐쉬1,2(3)(4)의 데이타를 메모리(5)에 쓰는 방법이다.When writing back data to cache 1, 2 (3) (4), the writeback does not write data to memory (5), thereby shortening the writing time and storing the data of cache 1, 2 (3) (4) if necessary. This is how to write in (5).
따라서, 캐쉬 코히어런시는 라이트백 모드에서 중요하며, 캐쉬 코히어런시를 위해 여러가지 방법을 사용하는데 그 대표적인 것이 스누핑(snooping)이다.Therefore, cache coherency is important in the writeback mode, and various methods are used for cache coherency, a representative of which is snooping.
상기 스누핑(snooping)은 도 1 및 도 2에 도시된 바와같이, 먼저 CPU1(1)이 버스마스터이고, 메모리(5)의 0x10번지에 0x00이라는 데이타가 있다고 가정하자.1 and 2, first, suppose that CPU1 1 is a bus master and that there is data of 0x00 at address 0x10 of the memory 5.
그리고, 상기 CPU1(1)이 이를 읽어서 캐쉬1(3)에 저장한 후 이를 다시 0xFF로 바꾸었다고 하자.The CPU 1 reads it, stores it in the Cache 1 3, and then changes it back to 0xFF.
그러면, 참값 0xFF는 캐쉬1(3)에만 있고 메모리(5)의 0x10번지에는 0x00이라는 가비지값(garbage value)만 있게 된다.Then, the true value 0xFF is in the cache 1 (3) only and there is only a garbage value of 0x00 in the address 0x10 of the memory 5.
이후, 버스 아비터(6)에 의해 버스 마스터가 CPU1(1)에서 CPU2(2)로 바뀌면, 상기 CPU2(2)가 메모리(5)에서 데이타를 읽거나 쓰면서 여러처리를 하는데, 상기 CPU2(2) 또한 데이타 처리속도를 위해 캐쉬2(4)를 사용하기도 한다.Subsequently, when the bus master is changed from CPU 1 (1) to CPU 2 (2) by the bus arbiter 6, the CPU 2 (2) performs various processing while reading or writing data in the memory (5), the CPU 2 (2). It also uses cache 2 (4) for data throughput.
이때, 상기 CPU2(2)가 메모리(5)에서 읽으려는 번지가 0x00이라면 여기에는 가비지값만 들어 있으므로 캐쉬 코히어런시(coherency)가 깨지게 된다.At this time, if the address that the CPU2 2 attempts to read from the memory 5 is 0x00, the cache coherency is broken because only the garbage value is included in the address.
이때에는 CPU1(1)이 CPU2(2)에 신호(ARTRY*)를 보내어 데이타의 읽기 동작을 중지시키고, 버스 아비터(6)에 신호(BR*)를 보내어 버스 사용권을 획득한 후 CPU1(1)의 캐쉬1(3)에 들어 있던 참값을 메모리(5)에 다시 써 넣는다.At this time, CPU1 (1) sends a signal (ARTRY *) to CPU2 (2) to stop the data read operation, sends a signal (BR *) to bus arbiter 6 to acquire a bus license, and then CPU1 (1). Writes the true value in cache 1 (3) into memory (5).
이때 다른 CPU(CPU1 또는 CPU2)가 잘못된 값을 읽어 가지 않도록 어드레스를 감시하는 것을 스누핑(snooping)이라 하고, 어드레스가 가리키는 번지가 CPU(CPU1 또는 CPU2)의 캐쉬(3 또는 4)에만 참값이 있고 메모리(5)는 가비지값을 가질 때를 스누핑 히트(snooping hit)라 하며, 이때 참값을 메모리(5)에 다시 써 넣는 것을스누핑 푸쉬(snooping push)라 한다.At this time, monitoring the address so that other CPUs (CPU1 or CPU2) do not read the wrong value is called snooping, and the address indicated by the address has a true value only in the cache (3 or 4) of the CPU (CPU1 or CPU2) and memory. (5) is called a snooping hit when it has a garbage value, and writing a true value back into the memory 5 is called a snooping push.
그러나, 종래의 기술에서는 데이타를 가져 가려는 CPU(CPU1 또는 CPU2)는 참 데이타를 가지고 있던 CPU(CPU1 또는 CPU2)가 메모리(5)에 데이타를 써넣을 때까지 기다려야 한다는 단점이 있다.However, the conventional technique has a disadvantage in that the CPU (CPU1 or CPU2) to take data has to wait until the CPU (CPU1 or CPU2) having true data writes the data to the memory 5.
즉, CPU1(1)이 스누핑(snooping) 푸쉬를 할때에는 CPU2(2)가 가져 가려는 데이타가 이미 CPU버스 상에 실린 상태이지만, 상기 CPU2(2)는 이 값을 이용하지 못하고 버스 아비터(6)로 부터 버스 사용권을 할당 받은 뒤에 그 데이타를 메모리(5)에 요청해야 하므로 처리속도를 향상시키려고 여러개의 CPU를 사용하는 상황에서 이러한 지체시간을 통해 시스템의 성능이 오히려 저하되는 문제점이 따랐다.That is, when CPU1 (1) is snooping push, the data to be taken by CPU2 (2) is already loaded on the CPU bus, but the CPU2 (2) cannot use this value and the bus arbiter 6 Since the data must be requested to the memory (5) after the bus license is allocated from the system, the performance of the system decreases due to such a delay time in the case of using multiple CPUs to improve the processing speed.
본 발명은 CPU가 읽어 가려는 데이타가 이미 다른 CPU가 스누핑(snooping) 푸쉬할 때 데이타버스에 실린다는 점을 이용하여 데이타를 쓰는 CPU가 데이타를 읽어가려는 CPU한테 데이타 버스에 유효한 데이타가 실렸음을 알리는 신호(Valid data)를 전송하므로서, 캐쉬 히트(cache hit)가 발생하였을때 다른 CPU의 데이타 읽기 시간을 단축할수 있도록 하는 캐쉬 코히어런시를 위한 스누핑(snooping)과 페칭(fetching) 방법을 제공한다.The present invention utilizes the fact that the data to be read by the CPU is already loaded on the data bus when another CPU is snooping and pushes the CPU to write the data to the CPU to read the data. It provides a snooping and fetching method for cache coherency that transmits signals to reduce the data read time of other CPUs when a cache hit occurs. .
도 1은 종래에 적용되는 캐쉬 코히어런시의 관련 블럭회로도.1 is a related block circuit diagram of a cache coherency applied in the related art.
도 2는 종래 캐쉬 코히어런시를 위한 스누핑(snooping)과 페칭(fetching) 방법을 보인 순서도.2 is a flow chart illustrating a snooping and fetching method for conventional cache coherency.
도 3은 본 발명에 적용되는 캐쉬 코히어런시의 관련 블럭회로도.3 is a related block circuit diagram of cache coherency applied to the present invention.
도 4는 본 발명 캐쉬 코히어런시를 위한 스누핑(snooping)과 페칭(fetching) 방법을 보인 순서도.4 is a flow chart illustrating a snooping and fetching method for the present invention cache coherency.
본 발명의 캐쉬 코히어런시를 위한 스누핑(snooping)과 페칭(fetching) 방법을 도3 및 도4를 참조하여 설명한다.A snooping and fetching method for the cache coherency of the present invention will be described with reference to FIGS. 3 and 4.
참고로 이하에 참조되는 도면에 대하여는 설명의 편의상 종래와 동일한 부분에 대해서는 동일한 참조 번호를 부여하여 설명하고, 중복되는 설명은 생략한다.For reference, the drawings referred to below will be described with the same reference numerals for the same parts as in the prior art for convenience of description, and redundant descriptions are omitted.
도 3 및 도 4에 도시된 바와같이, CPU1(1)이 버스아비터(6)와 CPU2(2)에 신호를 보내어 데이타 읽기 동작을 중지시키고 CPU1(1)의 캐쉬1(3)에 들어있던 참값을 메모리(5)에 다시 써 넣는 멀티프로세서에 있어서,As shown in Figs. 3 and 4, CPU1 (1) sends a signal to bus arbiter (6) and CPU2 (2) to stop the data read operation and the true value contained in cache 1 (3) of CPU1 (1). In a multiprocessor that writes data back into memory 5,
상기 데이타를 쓰는 CPU1(1)이 스누핑(snooping) 푸쉬를 하는 블록중 CPU2(2)가 읽기 요청을 하여 캐쉬 히트가 발생한 어드레스에 해당하는 데이타를 메모리(5)에 쓸때 CPU2(2)에게 유효신호(valid data)를 전송하여 원하는 데이타가 데이타 버스에 실렸음을 알리고,A valid signal is sent to CPU2 (2) when CPU2 (2) writing the data writes data corresponding to the address where the cache hit occurred to CPU 2 (2) when CPU 2 (2) makes a read request in a block where snooping pushes. send valid data to indicate that the desired data is on the data bus,
상기 CPU2(2)는 CPU(1)에서 출력하는 유효신호를 통해 데이타 버스에 실린 데이타를 읽어서 사용할수 있도록 하려는데 그 특징이 있는 것이다.The CPU2 (2) is characterized in that the data carried on the data bus can be used to read through the valid signal output from the CPU (1).
이와같은 본 발명 캐쉬 코히어런시를 위한 스누핑(snooping)과 페칭(fetching) 방법을 첨부된 도면을 참고하여 보다 구체적으로 살펴보면 다음과 같다.The snooping and fetching methods for the present invention cache coherency are described in detail with reference to the accompanying drawings.
먼저, 버스 아비터(6)에 의해 버스 마스터가 CPU1(1)에서 CPU2(2)로 바뀌면서, 상기 CPU2(2)가 가비지 값이 들어있는 메모리(5)를 읽고자 하는 경우,First, when the bus master changes from CPU 1 (1) to CPU 2 (2) by the bus arbiter 6, and the CPU 2 (2) wants to read the memory 5 containing the garbage value,
상기 CPU1(1)은 스누핑(snooping)을 하다가 CPU2(2)에 신호(ARTRY*)를 보내어 데이타의 읽기 동작을 중지시킨다.The CPU1 (1) snoops and sends a signal (ARTRY *) to the CPU2 (2) to stop the data read operation.
더불어, 상기 버스 아비터(6)에 신호(BR*)를 보내어 버스 사용권을 요청한 후, 상기 버스아비터(6)로 부터 신호(BG*)를 받아 버스사용권을 획득하면서 CPU1(1)의 캐쉬1(3)에 들어 있던 블록단위의 참값을 메모리(5)에 다시 쓴다.In addition, after requesting the bus license by sending a signal BR * to the bus arbiter 6, the bus 1 receives the signal BG * from the bus arbiter 6 and acquires a bus license. The true value of the block unit contained in 3) is written back into the memory (5).
이때, 상기 데이타를 쓰는 CPU1(1)이 스누핑(snooping) 푸쉬를 하는 블록중 CPU2(2)가 읽기 요청을 하여 캐쉬 히트가 발생한 어드레스에 해당하는 데이타를 메모리(5)에 쓸때, 상기 CPU1(1)은 CPU2(2)에게 유효신호(valid data)를 전송하여 CPU2(2)가 원하는 데이타가 데이타 버스에 실렸음을 CPU2(2)에게 알린다.At this time, when the CPU1 (1) that writes the data writes the data corresponding to the address at which the cache hit occurred to the memory 5 by the CPU2 (2) read request among the blocks that snooping push, the CPU1 (1) Transmits valid data to CPU2 (2) to inform CPU2 (2) that desired data has been loaded on the data bus.
그러면, 상기 CPU2(2)는 CPU(1)에서 출력하는 유효신호를 통해 데이타 버스에 실린 데이타를 읽어 사용할수 있게 되는 것이다.Then, the CPU 2 (2) can read and use the data on the data bus through the valid signal output from the CPU (1).
여기서, 상기 CPU2(2)가 데이타 이외에도 다른 데이타를 읽어 와야 할 경우, 상기 CPU1(1)의 스누핑(snooping) 푸쉬가 끝단 후 버스 아비터(6)로 부터 버스사용권을 얻어 읽기 동작을 수행할수도 있다.In this case, when the CPU 2 (2) needs to read other data in addition to the data, after the snooping push of the CPU 1 (1) is finished, the bus usage rights may be obtained from the bus arbiter 6 to perform a read operation. .
더불어, 상기 CPU1(1)의 스누핑(snooping) 푸쉬가 블럭단위로 이루어지므로, 상기 블럭안에 CPU2(2)가 원하는 데이타가 있으면 상기 CPU2(2)는 어드레스와 데이타를 확인한 후, 상기 CPU1(1)의 스누핑(snooping) 푸쉬 중에 필요한 데이타를 가져올수도 있다.In addition, since the snooping push of the CPU1 (1) is performed in units of blocks, if there is data desired by the CPU2 (2) in the block, the CPU2 (2) checks the address and data, and then the CPU1 (1). You can also get the data you need during your snooping push.
이상에서 설명한 바와같이 본 발명은 CPU가 읽어 가려는 데이타가 이미 다른 CPU가 스누핑(snooping) 푸쉬할 때 데이타버스에 실린다는 점을 이용하여 데이타를 쓰는 CPU가 데이타를 읽어가려는 CPU한테 데이타 버스에 유효한 데이타가 실렸음을 알리는 신호(Valid data)를 전송하므로서, 캐쉬 히트(cache hit)가 발생하였을때 다른 CPU의 데이타 읽기 시간을 단축하는 효과를 제공한다.As described above, the present invention utilizes the fact that the data to be read by the CPU is loaded onto the data bus when another CPU is snooping. By sending a signal (Valid data) indicating that the is loaded, it provides an effect of reducing the data read time of the other CPU when the cache hit (cache hit) occurs.
본 발명은 상술한 특정의 바람직한 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형 실시가 가능한 것은 물론이고, 그와같은 변경은 청구범위 기재의 범위내에 있게 된다.The present invention is not limited to the above-described specific preferred embodiments, and various modifications can be made by any person having ordinary skill in the art without departing from the gist of the present invention claimed in the claims. Of course, such changes will fall within the scope of the claims.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020000071811A KR20020042077A (en) | 2000-11-30 | 2000-11-30 | A method for snooping and fetching for cache coherency |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020000071811A KR20020042077A (en) | 2000-11-30 | 2000-11-30 | A method for snooping and fetching for cache coherency |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20020042077A true KR20020042077A (en) | 2002-06-05 |
Family
ID=19702379
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020000071811A KR20020042077A (en) | 2000-11-30 | 2000-11-30 | A method for snooping and fetching for cache coherency |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20020042077A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8200905B2 (en) | 2008-08-14 | 2012-06-12 | International Business Machines Corporation | Effective prefetching with multiple processors and threads |
-
2000
- 2000-11-30 KR KR1020000071811A patent/KR20020042077A/en not_active Application Discontinuation
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8200905B2 (en) | 2008-08-14 | 2012-06-12 | International Business Machines Corporation | Effective prefetching with multiple processors and threads |
US8543767B2 (en) | 2008-08-14 | 2013-09-24 | International Business Machines Corporation | Prefetching with multiple processors and threads via a coherency bus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100194253B1 (en) | How to Use Mesh Data Coherency Protocol and Multiprocessor System | |
US5490279A (en) | Method and apparatus for operating a single CPU computer system as a multiprocessor system | |
US6470429B1 (en) | System for identifying memory requests as noncacheable or reduce cache coherence directory lookups and bus snoops | |
US6463510B1 (en) | Apparatus for identifying memory requests originating on remote I/O devices as noncacheable | |
KR100371844B1 (en) | Queue-based predictive flow control mechanism | |
US7502895B2 (en) | Techniques for reducing castouts in a snoop filter | |
US20060236039A1 (en) | Method and apparatus for synchronizing shared data between components in a group | |
US5918069A (en) | System for simultaneously writing back cached data via first bus and transferring cached data to second bus when read request is cached and dirty | |
JPH0247756A (en) | Reading common cash circuit for multiple processor system | |
US5537640A (en) | Asynchronous modular bus architecture with cache consistency | |
JPH10154100A (en) | Information processing system, device and its controlling method | |
JP3723700B2 (en) | Method and apparatus for transferring data over a processor interface bus | |
EP0738977B1 (en) | Method and apparatus for quickly initiating memory accesses in a multiprocessor cache coherent computer system | |
US5471637A (en) | Method and apparatus for conducting bus transactions between two clock independent bus agents of a computer system using a transaction by transaction deterministic request/response protocol and burst transfer | |
KR100322223B1 (en) | Memory controller with oueue and snoop tables | |
US6976132B2 (en) | Reducing latency of a snoop tenure | |
US6336169B1 (en) | Background kill system bus transaction to optimize coherency transactions on a multiprocessor system bus | |
US6601145B2 (en) | Multiprocessor system snoop scheduling mechanism for limited bandwidth snoopers that uses dynamic hardware/software controls | |
US6076147A (en) | Non-inclusive cache system using pipelined snoop bus | |
US6862646B2 (en) | Method and apparatus for eliminating the software generated ready-signal to hardware devices that are not part of the memory coherency domain | |
KR101695845B1 (en) | Apparatus and method for maintaining cache coherency, and multiprocessor apparatus using the method | |
US6622216B1 (en) | Bus snooping for cache coherency for a bus without built-in bus snooping capabilities | |
US9183149B2 (en) | Multiprocessor system and method for managing cache memory thereof | |
US6021466A (en) | Transferring data between caches in a multiple processor environment | |
US6061766A (en) | Non-inclusive cache method using pipelined snoop bus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WITN | Withdrawal due to no request for examination |