Logical Address->Linear Address->Physical Address

时间:2022-01-03 00:34:00

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.

Logical Address->Linear Address->Physical Address

Logical Address->Linear Address->Physical Address

Logical Address->Linear Address->Physical Address

Logical Address->Linear Address->Physical Address

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的更多相关文章

  1. Linear to physical address translation with support for page attributes

    Embodiments of the invention are generally directed to systems, methods, and apparatuses for linear ...

  2. logical vs physical address

    Logical vs physical address  1) An address generated by the CPU is a logical address. Whereas, an ad ...

  3. [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都是随机分配的. ...

  4. &lbrack;New Portal&rsqb;Windows Azure Virtual Machine &lpar;20&rpar; 关闭Azure Virtual Machine与VIP Address,Internal IP Address的关系&lpar;2&rpar;

    <Windows Azure Platform 系列文章目录> 默认情况下,通过Azure Management Portal创建的Public IP和Private IP都是随机分配的. ...

  5. &lbrack;置顶&rsqb; operator overloading&lpar;操作符重载,运算符重载&rpar;运算符重载&comma;浅拷贝&lpar;logical copy&rpar; &comma;vs&comma; 深拷贝&lpar;physical copy&rpar;

    operator overloading(操作符重载,运算符重载) 所谓重载就是重新赋予新的意义,之前我们已经学过函数重载,函数重载的要求是函数名相同,函数的参数列表不同(个数或者参数类型).操作符重 ...

  6. Access Violation at address 00000000&period;Read of address 00000000 解决办法

    是数组越标或没有初始化某个对象之类的问题,搂住细细检查一下代码, 使用指针前未做检查,而这个指针未初始化. 可能是new后没有delete,这样出现溢出的可能性比较大     检查代码或者跟踪试试 使 ...

  7. &lbrack;置顶&rsqb; 运算符重载&comma;浅拷贝&lpar;logical copy&rpar; &comma;vs&comma; 深拷贝&lpar;physical copy&rpar;,三大件(bigthree problem)

    一般的我们喜欢这样对对象赋值: Person p1;Person p2=p1; classT object(another_object), or    A a(b); classT object = ...

  8. 运算符重载&comma;浅拷贝&lpar;logical copy&rpar; &comma;vs&comma; 深拷贝&lpar;physical copy&rpar;,三大件(bigthree problem)

    一般的我们喜欢这样对对象赋值: Person p1;Person p2=p1; classT object(another_object), or    A a(b); classT object = ...

  9. PatentTips - Supporting address translation in a virtual machine environment

    BACKGROUND A conventional virtual-machine monitor (VMM) typically runs on a computer and presents to ...

随机推荐

  1. ServiceStack&period;Redis 中关系操作的局限与bug

    redis是文档型的,nosql中难处理的是关系. 比如人可以发博客,博客可以有分类.按照传统sql中,用户表和分类表都是主表,博客表是从表,有用户的外键和分类的外键 如果使用文档型的思考方式. 为用 ...

  2. JAVA基础拾遗-论线程池的线程粒度划分与深浅放置

    摘要:多线程任务处理对提高性能很有帮助,在Java中提供的线程池也方便了对多线程任务的实现.使用它很简单,而如果进行了不正确的使用,那么代码将陷入一团乱麻.因此如何正确地使用它,如以下分享,这个技能你 ...

  3. 电脑上安装的android虚拟机,能进行基站定位和GPS定位吗?要怎么做才能定位?(转)

    基站定位是通过电信运营商的服务来实现的,至少你得有SIM卡吧,一般电脑是不会有电话功能的吧,所以,通过基站定位不可能. GPS是需要有相应的硬件来支持的,类似于手机需要有GPS模块才可以,电脑一般没有 ...

  4. 华为OJ:火车进站

    火车进站 给定一个正整数N代表火车数量,0<N<10,接下来输入火车入站的序列,一共N辆火车,每辆火车以数字1-9编号.要求以字典序排序输出火车出站的序列号. 输入描述: 有多组测试用例, ...

  5. AJAX原理及优缺点

    1.ajax技术的背景 不可否认,ajax技术的流行得益于google的大力推广,正是由于google earth.google suggest以及gmail等对ajax技术的广泛应用,催生了ajax ...

  6. &lbrack;Swift&rsqb;LeetCode244&period;最短单词距离 II &dollar; Shortest Word Distance II

    This is a follow up of Shortest Word Distance. The only difference is now you are given the list of ...

  7. Java https ssl证书导入删除

    下载并命名 例如命名github.cer 放进jre的lib\security下 keytool -delete [OPTION]... 选项: -alias <alias> 要处理的条目 ...

  8. Numpy 系列(七)- 常用函数

    在了解了 Numpy 的基本运算操作,下面来看下 Numpy常用的函数.     数学运算函数 add(x1,x2 [,out]) 按元素添加参数,等效于 x1 + x2 subtract(x1,x2 ...

  9. &lbrack;物理学与PDEs&rsqb;第1章第6节 电磁场的标势与矢势 6&period;3 例 --- 电偶极辐射

    1. 偶极子: 相距为 $l$, 带电量分别为 $\pm q$ 的一对电荷组成的系统. 称 $$\bex {\bf m}=q{\bf l} \eex$$ 为电偶极矩, 其中 ${\bf l}$ 为 $ ...

  10. 八大排序算法——归并排序(动图演示 思路分析 实例代码java 复杂度分析)

    一.动图演示 二.思路分析 归并排序就是递归得将原始数组递归对半分隔,直到不能再分(只剩下一个元素)后,开始从最小的数组向上归并排序 1.  向上归并排序的时候,需要一个暂存数组用来排序, 2.  将 ...