Difference between Cache and Translation LookAside Buffer[TLB]
Asked Answered
M

4

29

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

Monatomic answered 29/12, 2009 at 7:58 Comment(0)
Z
22

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.

Zephan answered 29/12, 2009 at 8:14 Comment(0)
B
28

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.

Bobwhite answered 16/11, 2012 at 4:12 Comment(0)
Z
22

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.

Zephan answered 29/12, 2009 at 8:14 Comment(0)
P
14

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.

Pole answered 29/12, 2009 at 8:5 Comment(0)
P
10

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

Pity answered 2/7, 2015 at 1:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.