缓存和转换 LookAside 缓冲区之间的区别[TLB]

发布于 08-15 19:20 字数 41 浏览 11 评论 0原文

缓存和转换 LookAside 缓冲区 [TLB] 之间有什么区别?

What is the difference between Cache and Translation LookAside Buffer [TLB] ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

卷耳2024-08-22 19:20:02

Cache存储内存的实际内容。

另一方面,TLB 仅存储映射。 TLB 加快了在内存中定位操作数的过程。

Cache 通过将这些操作数复制到更快的物理内存来加速读取这些操作数的过程。

Cache stores the actual contents of the memory.

TLB on the other hand, stores only mapping. TLB speeds up the process of locating the operands in the memory.

Cache speeds up the process of reading those operands by copying them to a faster physical memory.

紫南2024-08-22 19:20:02

来自维基:

在计算机科学中,缓存(发音为 /kæʃ/,kash)是一组数据复制存储在其他地方或之前计算的原始值,与读取缓存的成本相比,获取原始数据(由于访问时间较长)或计算成本昂贵。换句话说,高速缓存充当临时存储区域,可以存储频繁访问的数据以进行快速访问。一旦数据存储在缓存中,将来就可以通过访问缓存副本来使用它,而不是重新获取或重新计算原始数据。

然而

翻译后备缓冲区(TLB) 是内存管理硬件用来改进的 CPU 缓存虚拟地址转换速度。这是处理器中引入的第一个缓存。当前所有桌面和服务器处理器(例如 x86)都使用 TLB。 TLB 具有固定数量的槽,其中包含页表条目,将虚拟地址映射到物理地址。它通常是内容寻址存储器(CAM),其中搜索关键字是虚拟地址,搜索结果是物理地址。

另请查看这个。

From Wiki:

In computer science, a cache (pronounced /kæʃ/, kash) is a collection of data duplicating original values stored elsewhere or computed earlier, where the original data is expensive to fetch (owing to longer access time) or to compute, compared to the cost of reading the cache. In other words, a cache operates as a temporary storage area where frequently accessed data can be stored for rapid access. Once the data is stored in the cache, it can be used in the future by accessing the cached copy rather than re-fetching or recomputing the original data.

whereas

A Translation lookaside buffer(TLB) is a CPU cache that memory management hardware uses to improve virtual address translation speed. It was the first cache introduced in processors. All current desktop and server processors (such as x86) use a TLB. A TLB has a fixed number of slots that contain page table entries, which map virtual addresses to physical addresses. It is typically a content-addressable memory (CAM), in which the search key is the virtual address and the search result is a physical address.

Also have a look at this.

别把无礼当个性2024-08-22 19:20:02

高速缓存用于缓冲内存访问——对内存的实际读取和写入。 TLA缓冲区是缓冲从进程地址空间中的虚拟地址到内存中的物理地址的映射——伴随内存访问的服务操作。

Cache is to buffer memory accesses - actual reads and writes to memory. TLA buffer is to buffer mappings from virtual addresses in the address space of the process to physical addresses in memory - the service operations accompanying memory accesses.

超可爱的懒熊2024-08-22 19:20:02

TLB 是一种与 CPU 相关的特殊缓存。当我们使用虚拟内存时,我们需要 TLB 来更快地将虚拟地址转换为物理地址。 TLB只存储page_no、offset、frame_no和一些控制位。而Cache则用于存储经常使用的数据块。从 TLB/page_table 获取物理地址后,我们在缓存中查找该地址(如果在缓存中找不到该地址),然后再查找主内存。(图 8.10 williamstalling 6e)

在此处输入图像描述

TLB is a special kind of cache which is associated with CPU.When We are Using Virtual Memory we need TLB for faster translation of virtual address to physical address. TLB only store page_no , offset, frame_no and some control bits. While Cache is for storing block of data which are used frequently. After getting physical address from the TLB/page_table we look for that address in cache if it is not found there,than we look for main memory.(fig 8.10 william stalling 6e)

enter image description here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文