cache memory

cache memory

Learn how cache memory works on your pc



The cache memory is a kind of buffer that is inserted between the ultra fast processor and the slower main memory (in fact the memory is so slow compared to other parts of a computer, only the processor is very fast) and significantly improves the performance of main memory and hence the whole system. The use of caches in a system leads to decrease the total time during which the epexergstis is inactivated, waiting to meet a request from the main memory. There are several levels of cache memory used in modern computers as intermediate memory for data to which reference was made recently. When you mention the word cache, ennoume usually secondary cache, otherwise it refers to the specific characteristics of the cache. Communication between processor, cache and main memory -------------------------------------------------- ------------------------------ The role of cache memory on the computer In the first PCs the various parties had a common trait: they were all too late. For example, an editor who "ran" to 8 MHz or less, require several clock pulses to perform even the simplest operation. Also, because the main computer memory was much slower than the processor, often the processor was forced to remain idle perimenontas to satisfy a request from the memory. But there were some cases where the main system memory speed had been comparable to the CPU. Today (15 years or so after the presentation of PCs) INGREDIENTS all parts of a computer is clearly faster than the corresponding parts of the first personal computers. However, the rate of increase of speed was the same for all parts of a computer. For example, while the main computer memory was 10 times faster processors is 1000 times faster, than the processor used in the original IBM PC. This uneven improvement in the speed (efficiency) between the processor and other parts of the computer causes the processor to be by far the earliest part of any computer. The designers of computers, taking into account the above remark, try to minimize the delay in the operation of the processor caused by the fact that other parts of the computer can not serve the request immediately processor. For example, when the processor requests some information from the main memory should be inactivated by the availability of this information. This delay has resulted in significant reduction of overall system performance. To minimise time idle processor can not create memories, channels, hard drives, drivers CD-ROM ..., with speeds similar to that of the processor. Although this solution is feasible, the total cost of such a system would be very high, so this solution is rejected at least for general purpose systems. The only solution is to use architectures to exploit the full potential of current technology and keeping the cost of buying a personal computer within acceptable levels. This is exactly the approach based on the idea of using cache memory in computers. So rather than build a fast but expensive main memory of 64 MB, we use a fast but not so expensive (due to size) cache of 256 KB in conjunction with a slower main memory. The relatively slow main memory using the rapid cache and use an algorithm of data transfer between the two, attitude is much faster memory than it is in reality. What is it about this? When a reference to a memory location is very likely that the next report to be in a neighboring position memory. This phenomenon is known as locality (locality) references to the memory and displayed in two ways: Temporal locality: The contents of that address is likely to be requested in the near future. Spatial locality: If the contents of a requested address in the main memory is likely to be required and the contents of neighboring addresses. Temporal and spatial locality in references to main memory For example, the existence of a vrochgou (loop) into the code of a program causes temporal locality, while the phenomenon of spatial locality seen in the performance of mikroentolon steps which are sequentially stored in memory. Spatial locality also appears to store data in a table in memory. The fast cache is used to store information that has been recently reported. The phenomenon of locality has led to greater the likelihood of a service request by the fast processor cache rather than from the slower main memory. When the request can be satisfied from the cache, then the requested information is sought in the main memory and transferred as found in the cache for possible future use. Since the cache is much smaller than the main memory using an algorithm that manages the transfer of data from the cache to main memory and vice versa. In essence, the cache is inserted between the processor and main memory and is designed to balance, if possible, their speeds.