Chapter 7 Multitasking 多任务

To provide efficient, protected multitasking, the 80386 employs several special data structures. It does not, however, use special instructions to control multitasking; instead, it interprets ordinary control-transfer instructions differently when they refer to the special data structures. The registers and data structures that support multitasking are:

为提供高效的、保护的多任务,80386实现了几个数据结构。然而,不能使用特殊的指令来控制多任务;相反,它当普通的控制转移指令引用特定的数据结构时,以不同的方式来解释。这些用来支撑多任务的寄存器和数据结构是:

  • Task state segment 任务状态段
  • Task state segment descriptor 任务状态描述符
  • Task register 任务寄存器
  • Task gate descriptor 任务门描述符

With these structures the 80386 can rapidly switch execution from one task to another, saving the context of the original task so that the task can be restarted later. In addition to the simple task switch, the 80386 offers two other task-management features:

利用这些特性,80386可以迅速地从一个任务切换到另一个任务执行,保存原始任务的上下文环境以便任务可以在随后继续执行。对于简单的任务切换,80386额外提供了两个任务管理特性:

  1. Interrupts and exceptions can cause task switches (if needed in the system design). The processor not only switches automatically to the task that handles the interrupt or exception, but it automatically switches back to the interrupted task when the interrupt or exception has been serviced. Interrupt tasks may interrupt lower-priority interrupt tasks to any depth.

中断的异常可以导致任务切换(视系统设计需求)。处理器不仅自动切换到一个处理中断或异常的任务,而且当中断或异常结束服务后会自动切换回被中断的任务。中断任务可以中断低优先级的中断任务到任何深度。

  1. With each switch to another task, the 80386 can also switch to another LDT and to another page directory. Thus each task can have a different logical-to-linear mapping and a different linear-to-physical mapping. This is yet another protection feature, because tasks can be isolated and prevented from interfering with one another.

当每次切换到另一个任务时,80386也可以切换到另一个LDT和另一个页目录。这样,每个任务都可以有不同的逻辑到线性地址的映射和不同的线性地址到物理地址的映射。这也是另一个保护特性,因为任务可以被隔离并阻止任务间相互干扰。

【译】x86程序员手册24-第7章 多任务的更多相关文章

  1. 【译】x86程序员手册10 - 第4章系统架构

    1.1.2 Part II -- Systems Programming 系统编程 This part presents those aspects of the architecture that ...

  2. 【译】x86程序员手册01

    Intel 80386 Reference Programmer's Manual 80386程序员参考手册 Chapter 1 -- Introduction to the 80386 第1章 - ...

  3. 【译】x86程序员手册03 - 2.1内存组织和分段

    2.1 Memory Organization and Segmentation 内存组织和分段 The physical memory of an 80386 system is organized ...

  4. 【译】x86程序员手册00 - 翻译起因

    从上一次学习MIT的操作系统课程又过去了一年.上次学习并没有坚持下去.想来虽有种种原因,其还在自身无法坚持罢了.故此次再鼓起勇气重新学习,发现课程都已由2014改版为2016了.但大部分内容并没有改变 ...

  5. 【译】x86程序员手册40-10.5初始化的例子

    10.5 Initialization Example初始化的例子 译注:本来想把这个例子全部注释完,但由于对intel汇编实不熟悉,有太多的伪指令,本人也是免强看懂,所以就不再做翻译了. $TITL ...

  6. 【译】x86程序员手册38-10.2实在址模式下的软件初始化

    10.2 Software Initialization for Real-Address Mode   实地址模式的软件初始化 In real-address mode a few structur ...

  7. 【译】x86程序员手册09-第3章程序指令集

    注:觉得本章内容与理解操作系统不直接相关,所以本章并未看完,也就没有翻译完,放在这里中是为了保证手册的完整.有兴趣的人可以去原址查看. https://pdos.csail.mit.edu/6.828 ...

  8. 【译】x86程序员手册02 - 基本的程序模式

    Chapter 2 -- Basic Programming Model: 基本的程序模式 Introduces the models of memory organization. Defines ...

  9. 【译】x86程序员手册39-10.3切换到保护模式

    10.3 Switching to Protected Mode  切换到保护模式 Setting the PE bit of the MSW in CR0 causes the 80386 to b ...

  10. 【译】x86程序员手册37-第10章 初始化

    Chapter 10 Initialization 第10章 初始化 After a signal on the RESET pin, certain registers of the 80386 a ...

随机推荐

  1. 008 frame relay

    Router>en Router#config t Enter configuration commands, one per line.  End with CNTL/Z. Router(co ...

  2. openstack-wsgi的route中添加api流程具体解释(os-networks)添加

    感谢朋友支持本博客.欢迎共同探讨交流,因为能力和时间有限,错误之处在所难免.欢迎指正! 如有转载,请保留源作者博客信息. Better Me的博客:blog.csdn.net/tantexian 如需 ...

  3. .net的程序的逆向分析。

    背景:碰到一个由c#写的exe,由于之前没有分析过.net的程序,记录下分析流程. 1)peid加载判断类型,可以看出没有加壳. 2)搜索c#的反编译以及调试工具. 1.NET.Reflector以及 ...

  4. Oculus Rift DK2 驱动安装教程

    第一次安装oculus rift硬件驱动的教程: 1.   执行驱动的下载网址:https://developer.oculusvr.com/ 下载驱动首先须要拥有一个oculus的帐号.点击Regi ...

  5. doGet() throws NamingException报错

    做一个通过JNDI查找资源的小练习,Context = new InitialContext(),发现NamingException异常,eclipse编辑器只有catch的提示,没有throws的提 ...

  6. 【转】React 常用面试题目与分析

    作者:王下邀月熊链接:https://zhuanlan.zhihu.com/p/24856035来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. 本文有一定概率为水文,怕 ...

  7. HDU 5753Permutation Bo

    Permutation Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) ...

  8. http访问方式

    package com.m.billingplug.util; import java.io.IOException; import java.net.UnknownHostException; im ...

  9. 洛谷 P1236 算24点

    题目描述 几十年前全世界就流行一种数字游戏,至今仍有人乐此不疲.在中国我们把这种游戏称为"算24点".您作为游戏者将得到4个1~9之间的自然数作为操作数,而您的任务是对这4个操作数 ...

  10. DTV_SI 汇总 & 兼谈LCN

    前言 本章主要对数字广播DVB做一个系统的概况的描述,以及一些spc的相关的内容,虽然流程分析的不多,但是做为后续 章节资料的源泉,也是不可或缺的. 一. ATSC和DVB数字电视系统的比较 本文的主 ...