1、logical address = segment identifier (16bits) + offset (32bits)

segment selector其实就是GDT或者LDT的索引,其中的TI字段用来确定是选择GDT还是IDT

2、segment identifier is called segment selector, and in order to retrieve it quickly,  the process provides segmentation registers whose only purpose is to hold segment selectors,like cs, ss, ds, es, fs and gs.

3、The cs register has another import function: it includes a 2-bit field that specifies the Current Privilege Level (CPL) of the CPU.

4、Each segment is represented by an 8-byte Segment Descriptor that describes the segment characteristics.

Global Descriptor Table(GDT) or Local Descriptor Table(LDT) is used to store them.

5、There are several types of segments and thus several types of Segment Descriptors:

Code Segment Descriptor, Data Segment Descriptor, Task State Segment Descriptor(TSSD), Local Descriptor Table Descriptor(LDTD)

6、TSSD is a segment used to save contents of the processor registers, it can appear only in the GDT

7、The first entry of the GDT is always 0. This ensures that logical addresses with a null segment selector will be considered invalid, thus causing a processor exception.

8、Whenever the CPL is changed, some segmentation registers must be correspondingly updated.For instance, when the CPL is equal to 3(User Mode), the ds register must contain the segment selector of the user data segment, but when the CPL is equal to 0, the ds register must contain the segment selector of the kernel data segment

9、In uniprocessor systems there is only one GDT, while in multiprocessor systems there is one GDT for every CPU in the system.All GDTs are stored in the cpu_gdt_table array, while the addresses and sizes of the GDTs are stored in the cpu_gdt_descr

10、A Task State Segment (TSS), different for each processor in the system.The linear address space corresponding to a TSS is a small subset of the linear address space corresponding to the kernel data segment.

Process in user mode are not allowed to access TSS segments.

11、When a processor starts executing a process having a custom LDT, the LDT entry in the CPU-specified copy of the GDT is changed accordingly.

《深入理解Linux内核》阅读笔记 --- Chapter 2 Memory Addressing的更多相关文章

  1. 深入理解Linux内核 学习笔记(1)

    1.用户和用户组 每个用户是一个或多个用户组的一名成员,组由唯一的用户组标识符(user group ID)标识.每个文件的相关权限也恰好与一个组相对应. root为超级用户, 2.模块 为了达到微内 ...

  2. 深入理解Linux内核 学习笔记(5)

    第五章  定时测量 内核必须显式地与三种时钟打交道:实时时钟(Real Time Clock, RTC).时间标记计数器(Time Stamp Counter, TSC)及可编程间隔定时器( Prog ...

  3. 深入理解Linux内核 学习笔记(4)

    第四章 中断和异常 中断通常被分为同步中断和异步中断,同步中断是当指令执行时由CPU控制单元产生的,之所以称为同步,是因为只有在一条指令终止执行后CPU才会发出中断异步中断是由其他硬件设备依照CPU时 ...

  4. 深入理解Linux内核 学习笔记(3)

    第三章 进程 可以看到很多熟悉的结构体 进程状态: 可运行状态(TASK_ RUNNING) 进程要么在CPU上执行,要么准备执行. 可巾断的等待状态(TASK_ INTERRUPTIBLE) 进程被 ...

  5. 深入理解Linux内核 学习笔记(2)

    第二章 :内存寻址 略.基本同计算机组成原理中的讲述 内核代码和数据结构会存储在一个保留的页框中. 常规Linux安装在RAM物理地址0x00100000开始的地方.因为:页框0是由BIOS使用,存放 ...

  6. 深入理解Linux内核 学习笔记(8)

    第八章 系统调用 API定义了一个给定的服务:系统调用是通过软中断向内核发出一个明确的请求. API可能不调用系统调用,也可能调用多个系统调用. Linux系统调用必须通过执行int 0x80,系统调 ...

  7. 《深入理解Linux内核》 读书笔记

    深入理解Linux内核 读书笔记 一.概论 操作系统基本概念 多用户系统 允许多个用户登录系统,不同用户之间的有私有的空间 用户和组 每个用于属于一个组,组的权限和其他人的权限,和拥有者的权限不一样. ...

  8. 读书笔记之Linux系统编程与深入理解Linux内核

    前言 本人再看深入理解Linux内核的时候发现比较难懂,看了Linux系统编程一说后,觉得Linux系统编程还是简单易懂些,并且两本书都是讲Linux比较底层的东西,只不过侧重点不同,本文就以Linu ...

  9. 【读书笔记::深入理解linux内核】内存寻址【转】

    转自:http://www.cnblogs.com/likeyiyy/p/3837272.html 我对linux高端内存的错误理解都是从这篇文章得来的,这篇文章里讲的 物理地址 = 逻辑地址 – 0 ...

随机推荐

  1. php用explode,可以提供多个字符作为分割符来进行分割数组吗?

    explode — 使用一个字符串分割另一个字符串, 它的函数原型如下: array explode ( string $delimiter , string $string [, int $limi ...

  2. CodeForces 584D Dima and Lisa

    1e9 以内的判断一个数是否是素数,可以直接朴素的暴力.   这倒题除了考虑1e9以内的素数的判断,还有一个歌德巴赫猜想:任意一个奇数都可一分解为三个素数的和. 第三个结论:素数是密集的,1e9以内, ...

  3. getCanonicalPath getAbsolutePath区别

    1.在winows环境下它们的区别是  getCanonicalPath是标准路径,没有特殊字符,getAbsolutePath是有特殊字符的 2.在AIX系统中它们的区别: 首先编译:javac ...

  4. django 模板报错

    "Requested setting TEMPLATE_DEBUG, but settings are not configured. You must either define the ...

  5. 从git中更新本地需要填写的正则

    <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_FILENA ...

  6. FireFox插件FirePHP调试PHP

    如果你和我一样,你会在开发网页项目时候完全无法离开FireBug.这个小巧的"臭虫"是一个神奇而有用的HTML/CSS/JavaScript/Ajax调试器.但是你也许不知道这个还 ...

  7. 说明Oracle数据库逻辑备份和物理备份的方式。

    说明Oracle数据库逻辑备份和物理备份的方式. 解答:Oracle备份包括逻辑备份和物理备份. 1).逻辑备份 数据库的逻辑备份包含读一个数据库记录集和将记录集写入文件. a.输出(Export)输 ...

  8. 关于JSON日期格式显示及My97日期控件

    1.My97日期控件.显示不同的日期格式,可以调整"dateFmt“的参数来配置: 详细DEMO:http://www.my97.net/demo/index.htm <p>日期 ...

  9. 8148 add spi driver

    http://blog.csdn.net/zouwen198317/article/details/8452209 http://e2e.ti.com/support/dsp/davinci_digi ...

  10. 【C++自我精讲】基础系列五 隐式转换和显示转换

    [C++自我精讲]基础系列五 隐式转换和显示转换 0 前言 1)C++的类型转换分为两种,一种为隐式转换,另一种为显式转换. 2)C++中应该尽量不要使用转换,尽量使用显式转换来代替隐式转换. 1 隐 ...