Computer Systems A Programmer's Perspective Second Edition

The main memory of a computer system is organized as an array of
M
contiguous
byte-sized cells. Each byte has a unique physical address (PA). The first byte has
an address of 0, the next byte an address of 1, the next byte an address of 2,
and so on. Given this simple organization, the most natural way for a CPU to
access memory would be to use physical addresses. We call this approach physical
addressing. Figure 9.1 shows an example of physical addressing in the context of
a load instruction that reads the word starting at physical address 4.
When the CPU executes the load instruction, it generates an effective physical
address and passes it to main memory over the memory bus. The main memory
fetches the 4-byte word starting at physical address 4 and returns it to the CPU,
which stores it in a register.
Early PCs used physical addressing, and systems such as digital signal pro-
cessors, embedded microcontrollers, and Cray supercomputers continue to do so.
However, modern processors use a form of addressing known as virtual address-
ing, as shown in Figure 9.2.
With virtual addressing, the CPU accesses main memory by generating a vir-
tual address (VA), which is converted to the appropriate physical address before
being sent to the memory. The task of converting a virtual address to a physical
one is known as address translation. Like exception handling, address translation

requires close cooperation between the CPU hardware and the operating sys-
tem. Dedicated hardware on the CPU chip called the memory management unit
(MMU) translates virtual addresses on the fly, using a look-up table stored in main
memory whose contents are managed by the operating system.

主存

存储器管理单元

physical addressing virtual addressing 物理寻址 虚拟寻址的更多相关文章

  1. linux physical and virtual addressing modes

    example 1: 特理地址和虚拟地址一致 Physical addressing mode requires no page tables and the CPU does not attempt ...

  2. 《CS:APP》 chapter 9 Vitrual Memory 笔记

    Vitrual Memory In order to manage memory more efficiently and with fewer errors, modern systems prov ...

  3. Linux第14周学习笔记

    虚拟存储器 虚拟存储器是硬件异常.硬件地址翻译.主存.磁盘文件和内核软件的完美交互. 虚拟存储器的特点: 中心的 强大的 危险的 物理和虚拟寻址 计算机系统的主存被组织成一个由M个连续的字节大小的单元 ...

  4. 深入理解计算机系统 第九章 虚拟内存 Part1 第二遍

    这次花了4小时40分钟,看了第 559~575 页,共 17 页 第一遍对应地址 https://www.cnblogs.com/stone94/p/10264044.html 注意:本章的练习题一定 ...

  5. Virtualizing physical memory in a virtual machine system

    A processor including a virtualization system of the processor with a memory virtualization support ...

  6. 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 ...

  7. Secondary IP Addressing

    Secondary IP Addressing secondary IP addressing. Secondary addressing uses multiple networks or subn ...

  8. [转]Part1: Understanding !PTE , Part 1: Let’s get physical

    http://blogs.msdn.com/b/ntdebugging/archive/2010/02/05/understanding-pte-part-1-let-s-get-physical.a ...

  9. Separate code and data contexts: an architectural approach to virtual text sharing

    The present invention provides a processor including a core unit for processing requests from at lea ...

随机推荐

  1. Visual Studio 2015和ASP.NET 5中可用的前端开发工具集

    最近微软发布了一本白皮书,谈到了一些可以和Visual Studio 2015和ASP.NET 5配合使用的JS/前端Web开发工具(比如:函数库.任务执行器.框架等). 由于现在前端开发的生态系统在 ...

  2. zxing实现二维码生成和解析

    转自:http://kesun-shy.iteye.com/blog/2154169 二维码的生成与解析.有多种途径.我选择用大品牌,google老大的zxing. gitHub链接是(我用的3.0. ...

  3. 构造 hihocoder 1257 Snake Carpet (15北京I)

    题目传送门 题意:贪吃蛇,要求长度奇数的蛇转弯次数为正奇数,长度偶数转弯次数为正偶数,且组成矩形.(北大出的题咋都和矩形相关!!!) 分析:构造找规律,想到就简单了.可以构造 宽:(n + 1) / ...

  4. 简单几何(相对运动距离最值) UVA 11796 Dog Distance

    题目传送门 题意:两只狗在折线上跑,速度未知,同时出发,同时达到.问跑的过程中,两狗的最大距离和最小距离的差 分析:训练指南P261,考虑相对运动,设A静止不动,B相对A运动,相对的运动向量:Vb - ...

  5. 贪心 Codeforces Round #301 (Div. 2) A. Combination Lock

    题目传送门 /* 贪心水题:累加到目标数字的距离,两头找取最小值 */ #include <cstdio> #include <iostream> #include <a ...

  6. BZOJ2674 : Attack

    整体二分+树状数组套Treap,时间复杂度$O(n\log^3n)$. #include<cstdio> #include<cstdlib> #include<algor ...

  7. BZOJ3748 : [POI2015]Kwadraty

    打表可得结论: 1.只有2,3,6,7,8,11,12,15,18,19,...,108,112,128这31个数的k值是无穷大 2.当n足够大的时候,即当n>506时,设$f(x)=1^2+2 ...

  8. BZOJ1665 : [Usaco2006 Open]The Climbing Wall 攀岩

    直接BFS貌似复杂度飞起来了,于是我们用k-d tree优化找点的过程即可.时间复杂度$O(n\sqrt{n})$. #include<cstdio> #include<algori ...

  9. 【wikioi】1010 过河卒

    题目链接 算法:DFS+剪枝 14.01.02 PS: 递推应该也可以的,改天看看 刚开始最容易想到的是朴素搜索 #include <iostream> using namespace s ...

  10. 【wikioi】1217 借教室

    题目链接http://www.wikioi.com/problem/1217/ 算法:二分答案(线段树可过wikioi数据) 二分:http://www.wikioi.com/solution/lis ...