码迷,mamicode.com
首页 > 其他好文 > 详细

Translation Lookaside Buffer

时间:2016-12-24 13:51:00      阅读:281      评论:0      收藏:0      [点我收藏+]

标签:sch   rem   png   img   general   bin   compute   die   form   

COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

 

In principle, then, every virtual memory reference can cause two physical mem-
ory accesses: one to fetch the appropriate page table entry, and one to fetch the
desired data. Thus, a straightforward virtual memory scheme would have the effect
of doubling the memory access time. To overcome this problem, most virtual
memory schemes make use of a special cache for page table entries, usually called
a translation lookaside buffer (TLB). This cache functions in the same way as a
memory cache and contains those page table entries that have been most recently
used. Figure 8.18 is a flowchart that shows the use of the TLB. By the principle of
locality, most virtual memory references will be to locations in recently used pages.
Therefore, most references will involve page table entries in the cache. Studies of
the VAX TLB have shown that this scheme can significantly improve performance
[CLAR85, SATY81].

技术分享

Note that the virtual memory mechanism must interact with the cache system
(not the TLB cache, but the main memory cache). This is illustrated in Figure 8.19.
A virtual address will generally be in the form of a page number, offset. First, the
memory system consults the TLB to see if the matching page table entry is present.
If it is, the real (physical) address is generated by combining the frame number with
the offset. If not, the entry is accessed from a page table. Once the real address is
generated, which is in the form of a tag and a remainder, the cache is consulted to
see if the block containing that word is present (see Figure 4.5). If so, it is returned
to the processor. If not, the word is retrieved from main memory.

技术分享

 

The reader should be able to appreciate the complexity of the processor hard-
ware involved in a single memory reference. The virtual address is translated into
a real address. This involves reference to a page table, which may be in the TLB, in

main memory, or on disk. The referenced word may be in cache, in main memory,
or on disk. In the latter case, the page containing the word must be loaded into main
memory and its block loaded into the cache. In addition, the page table entry for
that page must be updated.

 

Translation Lookaside Buffer

标签:sch   rem   png   img   general   bin   compute   die   form   

原文地址:http://www.cnblogs.com/yuanjiangw/p/6216984.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!