Logical Address->Linear Address->Physical Address
3 registers for starting pos:
LDTR, GDTR( register for starting addr of DT)
---段描述符
每个段由一个8字节(64位)的段描述符来描述,他表示段的各项属性。段描述符放在叫全局描述符表(Global Descriptor Table:GDT )或局部描述符表(Local Descriptor Table:LDT)中。GDT和LDT可以理解为数组。而段选择符里的索引是用于选择在这个数组当中的元素。
如:GDT[index],表示GDT中第index个段描述符。
CPU当中有两个特殊控制器gdtr和ldtr分别存储GDT和LDT的地址
CR3(control register for starting addr of Page directory)
内核先将当前任务的页目录表的物理地址填入cr3寄存器。
Descriptor table structure:
Base address: A 32-bit integer that defines the starting location of the segment in the 4 GByte
linear address space.
Privilege level: Each segment can be assigned a privilege level between 0 and 3, where 0 is the
most privileged, usually for operating system kernel code. If a program with a higher-numbered
privilege level tries to access a segment having a lower-numbered privilege level, a processor fault
is generated.
Segment type: Indicates the type of segment and specifies the type of access that can be made
to the segment and the direction the segment can grow (up or down). Data (including Stack) segments
can be read-only or read/write and can grow either up or down. Code segments can be
execute-only or execute/read-only.
Segment present flag: This bit indicates whether the segment is currently present in physical
memory.
Granularity flag: Determines the interpretation of the Segment limit field. If the bit is clear,
the segment limit is interpreted in byte units. If the bit is set, the segment limit is interpreted in
4096-byte units.
Segment limit: This 20-bit integer specifies the size of the segment. It is interpreted in one of
the following two ways, depending on the Granularity flag:
• The number of bytes in the segment, ranging from 1 to 1 MByte.
• The number of 4096-byte units, permitting the segment size to range from 4 KByte to 4 GByte.




Descriptor table structure:
Page directory: An array of up to 1024 32-bit page-directory entries.
• Page table: An array of up to 1024 32-bit page-table entries.
• Page: A 4 KByte or 4 MByte address space.
To simplify the following discussion, we will assume that 4 KByte pages are used:
A linear address is divided into three fields: a pointer to a page-directory entry, a pointer to a
page-table entry, and an offset into a page frame. Control register (CR3) contains the starting
address of the page directory. The following steps are carried out by the processor when translating
a linear address to a physical address, as shown in Figure 11–9:
1. The linear address references a location in the linear address space.
2. The 10-bit directory field in the linear address is an index to a page-directory entry. The pagedirectory
entry contains the base address of a page table.
3. The 10-bit table field in the linear address is an index into the page table identified by the
page-directory entry. The page-table entry at that position contains the base location of a page
in physical memory.
4. The 12-bit offset field in the linear address is added
下面来源:
Linear adress and physical address
Linear address is generated after page table mapping. Physical addres is generated before page table mapping(ie paging).
Linear Adress,created by adding logical address to the base of segment, CS,DS,ES,SS,FSor GS.
When Paging is enabled, the page tables are used to translate linear address to physical address.
On the Other Hand, Physical Address is nothing but, the address value that appears on pins of processor during a memory read/memory write operations.
InShort, we can say if paging is disabled linear address = physical address
Logical Address->Linear Address->Physical Address的更多相关文章
- Linear to physical address translation with support for page attributes
Embodiments of the invention are generally directed to systems, methods, and apparatuses for linear ...
- logical vs physical address
Logical vs physical address 1) An address generated by the CPU is a logical address. Whereas, an ad ...
- [New Portal]Windows Azure Virtual Machine (19) 关闭Azure Virtual Machine与VIP Address,Internal IP Address的关系(1)
<Windows Azure Platform 系列文章目录> 默认情况下,通过Azure Management Portal创建的Public IP和Private IP都是随机分配的. ...
- [New Portal]Windows Azure Virtual Machine (20) 关闭Azure Virtual Machine与VIP Address,Internal IP Address的关系(2)
<Windows Azure Platform 系列文章目录> 默认情况下,通过Azure Management Portal创建的Public IP和Private IP都是随机分配的. ...
- [置顶] operator overloading(操作符重载,运算符重载)运算符重载,浅拷贝(logical copy) ,vs, 深拷贝(physical copy)
operator overloading(操作符重载,运算符重载) 所谓重载就是重新赋予新的意义,之前我们已经学过函数重载,函数重载的要求是函数名相同,函数的参数列表不同(个数或者参数类型).操作符重 ...
- Access Violation at address 00000000.Read of address 00000000 解决办法
是数组越标或没有初始化某个对象之类的问题,搂住细细检查一下代码, 使用指针前未做检查,而这个指针未初始化. 可能是new后没有delete,这样出现溢出的可能性比较大 检查代码或者跟踪试试 使 ...
- [置顶] 运算符重载,浅拷贝(logical copy) ,vs, 深拷贝(physical copy),三大件(bigthree problem)
一般的我们喜欢这样对对象赋值: Person p1;Person p2=p1; classT object(another_object), or A a(b); classT object = ...
- 运算符重载,浅拷贝(logical copy) ,vs, 深拷贝(physical copy),三大件(bigthree problem)
一般的我们喜欢这样对对象赋值: Person p1;Person p2=p1; classT object(another_object), or A a(b); classT object = ...
- PatentTips - Supporting address translation in a virtual machine environment
BACKGROUND A conventional virtual-machine monitor (VMM) typically runs on a computer and presents to ...
随机推荐
- 关于CentOS 7.1后期维护的问题
1.问题描述:在使用ssh服务远程登录的时候,当显示输入密码,特别特别的慢,刚刚搭建 服务器的时候还很正常,经过一个假期我实在忍不了它了,故决定解决此问题.服务器系统:CentOS 7.1 解决方式: ...
- Android 二维码扫描框 加四个角及中间横线自动下滑
红色为加四个角 黄色为扫描线自动下滑 /* * Copyright (C) 2008 ZXing authors * * Licensed under the Apache License, Ver ...
- 原生js轮播以及setTimeout和setInterval的理解
下面这个代码是从一个群下载下来的,为了帮助自己理解和学习现在贴出来,与初学者共勉. <!DOCTYPE html> <html> <head> <meta c ...
- django ORM model filter 条件过滤,及多表连接查询、反向查询,某字段的distinct
版权归作者所有,任何形式转载请联系作者.作者:petanne(来自豆瓣)来源:https://www.douban.com/note/301166150/ 1.多表连接查询:感觉django太NX了. ...
- python paramiko ssh.exec_command()启动tomcat服务器应用进程失败问题解决方法- Neither the JAVA_HOME nor the JRE_HOME environment variable is defined At least one of these environment variable is needed to run this progr
问题说明:
- oracle 存储过程发邮件
CREATE OR REPLACE PROCEDURE PROCSENDEMAIL(P_TXT VARCHAR2, ...
- Oracle之虚拟索引
一.引言 DBA在日常维护管理数据库进行低性能SQL分析时,有时候需要通过创建索引对SQL进行优化,但有些时候我们创建的索引是否能用到?这个只能创建以后才能看出效果,但是在实际工作中,特别是对大表创建 ...
- awk 手册--【转载】
1. 前言 有关本手册 : 这是一本awk学习指引, 其重点着重于 : l awk 适于解决哪些问题 ? l awk 常见的解题模式为何 ? 为使读者快速掌握awk解 ...
- java面试每日一题9
题目:判断一个数是否是2的方次幂 public class Power { public static void main(String [] args) throws NumberFormatExc ...
- ACM题目————图的广度优先搜索
题目描述 图的广度优先搜索类似于树的按层次遍历,即从某个结点开始,先访问该结点,然后访问该结点的所有邻接点,再依次访问各邻接 点的邻接点.如此进行下去,直到所有的结点都访问为止.在该题中,假定所有的结 ...