Virtual Memory PAGE TABLE STRUCTURE
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION
The basic mechanism for reading a word from memory 
involves  the  translation  of  a  virtual,  or  logical,  address,  consisting  of  page  number 
and  offset,  into  a  physical  address,  consisting  of  frame  number  and  offset,  using  a 
page table. Because the page table is of variable length, depending on the size of the 
process, we cannot expect to hold it in registers. Instead, it must be in main memory 
to  be  accessed.  Figure  8.16  suggests  a  hardware  implementation  of  this  scheme. 
When  a  particular  process  is  running,  a  register  holds  the  starting  address  of  the 
page  table  for  that  process.  The  page  number  of  a  virtual  address  is  used  to  index 
that table and look up the corresponding frame number. This is combined with the 
offset portion of the virtual address to produce the desired real address.
In most systems, there is one page table per process. But each process can 
occupy  huge  amounts  of  virtual  memory.  For  example,  in  the  VAX  architecture, 
each process can have up to 2
31
= 2 Gbytes of virtual memory. Using 2
9
= 512@byte 
pages,  that  means  that  as  many  as  2
22
  page  table  entries  are  required  per  process. 
Clearly, the amount of memory devoted to page tables alone could be unacceptably 
high. To overcome this problem, most virtual memory schemes store page tables in 
virtual memory rather than real memory. This means that page tables are subject to 
paging just as other pages are. When a process is running, at least a part of its page 
table must be in main memory, including the page table entry of the currently execut-
ing  page.  Some  processors  make  use  of  a  two-level  scheme  to  organize  large  page 
tables. In this scheme, there is a page directory, in which each entry points to a page 
table. Thus, if the length of the page directory is X, and if the maximum length of a 
page table is Y, then a process can consist of up to X 
* 
Y  pages. Typically, the maxi-
mum length of a page table is restricted to be equal to one page. We will see an exam-
ple of this two-level approach when we consider the Pentium II later in this chapter.
An alternative approach to the use of one- or two-level page tables is the use 
of  an  inverted  page  table  structure  (Figure  8.17).  Variations  on  this  approach  are 
used  on  the  Power PC,  Ultra SPARC,  and  the  IA-64  architecture.  An  implementa-
tion of the Mach OS on the RT-PC also uses this technique.

In this approach, the page number portion of a virtual address is mapped into 
a  hash  value  using  a  simple  hashing  function.
2
  The  hash  value  is  a  pointer  to  the 
inverted page table, which contains the page table entries. There is one entry in the
2
A hash function maps numbers in the range 0 through M into numbers in the range 0 through N, where 
M > N . The output of the hash function is used as an index into the hash table. Since more than one input 
maps  into  the  same  output,  it  is  possible  for  an  input  item  to  map  to  a  hash  table  entry  that  is  already 
 occupied.  In  that  case,  the  new  item  must  overflow  into  another  hash  table  location. Typically,  the  new 
item is placed in the first succeeding empty space, and a pointer from the original location is provided to 
chain the entries together. See Appendix C for more information on hash functions.
inverted page table for each real memory page frame rather than one per virtual 
page. Thus a fixed proportion of real memory is required for the tables regardless of 
the number of processes or virtual pages supported. Because more than one virtual 
address  may  map  into  the  same  hash  table  entry,  a  chaining  technique  is  used  for 
managing  the  overflow.  The  hashing  technique  results  in  chains  that  are  typically 
short—between  one  and  two  entries.  The  page  table’s  structure  is  called  inverted 
because it indexes page table entries by frame number rather than by virtual page 
number.
Virtual Memory PAGE TABLE STRUCTURE的更多相关文章
- Extended paging tables to map guest physical memory addresses from virtual memory page tables to host physical memory addresses in a virtual machine system
		
A processor including a virtualization system of the processor with a memory virtualization support ...
 - System and method to prioritize large memory page allocation in virtualized systems
		
The prioritization of large memory page mapping is a function of the access bits in the L1 page tabl ...
 - Page (computer memory)  Memory segmentation Page table  虚拟地址到物理地址的转换
		
A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described ...
 - reds Virtual Memory
		
Virtual Memory technical specification This document details the internals of the Redis Virtual Memo ...
 - Linux Process Virtual Memory
		
目录 . 简介 . 进程虚拟地址空间 . 内存映射的原理 . 数据结构 . 对区域的操作 . 地址空间 . 内存映射 . 反向映射 .堆的管理 . 缺页异常的处理 . 用户空间缺页异常的校正 . 内核 ...
 - 初识virtual memory
		
一.先谈几个重要的东西 virtual memory是一个抽象概念,书上的原文是"an abstraction of main memory known as virtual memory& ...
 - Virtual Memory  DEMAND    PAGING  - The avoidance of thrashing was a major research area in the 1970s and led to a vari- ety of complex but effective algorithms.
		
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION With the use of pagin ...
 - Understanding Virtual Memory
		
Understanding Virtual Memory by Norm Murray and Neil Horman Introduction Definitions The Life of a P ...
 - 深入虚拟内存(Virtual Memory,VM)
		
我们应该知道物理内存(Physical Memory)指的是硬件上的内存,即 RAM.它通常指的是插在主板上的内存条,给进程提供临时数据存储的设备.因为 CPU 可以直接从物理内存中读取数据和指令,所 ...
 
随机推荐
- git merge 合并分支
			
git merge 用来做分支合并,将其他分支中的内容合并到当前分支中.比如分支结构如下: master / C0 ---- C1 ---- C2 ---- C4 \ C3 ---- C5 \ iss ...
 - 【现代程序设计】homework-10
			
作业地址:http://www.cnblogs.com/xinz/p/3441537.html 进行中...
 - Gym 100463A Crossings 逆序对
			
Crossings Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100463 Description ...
 - loj 1063(求割点个数)
			
题目链接:http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=26780 思路:判断一个点是否是割点的两个条件:1.如果一个点v是根 ...
 - Distinct和Group by去除重复字段记录
			
重复记录 有两个意义,一是完全重复的记录,也即所有字段均重复的记录 二是部分关键字段重复的记录,比如Name字段重复,而其他字段不一定重复或都重复可以忽略. 1.对于第一种重复,比较容易解决,使用 s ...
 - Centos升级内核 --已验证
			
Docekr 对内核由要求,3.10以上 Centos 6.5内核达不到要求 [linux@localhost Desktop]$ sudo service docker statusdocker d ...
 - POJ1699 Best Sequence(AC自动机+状压DP)
			
题目,求包含所有的给定的n个DNA片段的序列的最短长度. AC自动机上的DP题. dp[S][u]表示已经包含的DNA片段集合为S,且当前后缀状态是自动机第u个结点的最短长度 dp[0][0]=0 我 ...
 - 错误3 error C3859: 超过了 PCH 的虚拟内存范围;请使用“-Zm120”
			
在工程上单击右键,属性,C/C++,最后一项,命令行,在里面/Zm200或者编译器提示的大小解决.
 - Splay 伸展树
			
废话不说,有篇论文可供参考:杨思雨:<伸展树的基本操作与应用> Splay的好处可以快速分裂和合并. ===============================14.07.26更新== ...
 - BZOJ4026: dC Loves Number Theory
			
Description dC 在秒了BZOJ 上所有的数论题后,感觉萌萌哒,想出了这么一道水题,来拯救日益枯 竭的水题资源. 给定一个长度为 n的正整数序列A,有q次询问,每次询问一段区间内所 ...