下载此文档

OS复习笔记by李嘉良.docx


文档分类:IT计算机 | 页数:约18页 举报非法文档有奖
1/18
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/18 下载此文档
文档列表 文档介绍
操作系统复李嘉良共 17页 9K 多字,大家复习愉快第一章 1. 操作系统的目录 Operating system Controls and coordinates use of hardware among various applications and users Structure 硬件,操作系统,应用软件,用户 puter-System Operation 计算机系统运行* I/O 设备与 CPU 可并行运行 I/O devices and the CPU can execute concurrently * 每一设备控制器负责一个设备类型 Each device controller is in charge ofa particular device type * 每一设备控制器有一局部缓存 Each device controller has a local buffer * CPU 通过局部缓存与主存交换数据 CPU moves data from/to main memory to/from local buffers * I/O 从设备到设备控制器的局部缓存 I/O is from the device to local buffer of controller * 设备控制器通过引起中断通知 CPU 操作已完成 Device controller informs CPU that it has finished its operation by causing an interrupt mon Functions of Interrupts 中断的常见功能* 通常中断通过中断矢量把控制传送给中断服务程序,该中断矢量包含了所有服务程序的地址 Interrupts transfers control to the interrupt service routine generally, through the interrupt vector , which contains the addresses of all the service routines * 中断体系结构必须保护被中断指令的地址 Interrupt architecture must save the address of the interrupted instruction * 当另一个中断正在处理时,刚进入的中断不能作用, 以免丢失中断 ing interrupts are disabled while another interrupt is being processed to prevent a lost interrupt * 陷阱是由于出错或用户请求引起的软件生成的中断 A trap isa software-generated interrupt caused either by an error ora user request * 操作系统是中断驱动的 An operating system is interrupt driven Interrupt Handling 中断处理* 操作系统通过存储寄存器和程序计数器而保留了 CPU 的状态 The operating system preserves the state of the CPU by storing registers and the program counter * 确定哪一种中断发生了 Determines which type of interrupt has occurred: *- 轮询 polling *- 矢量化中断系统 vectored interrupt system * 对每一类中断分离代码段,以确定应该采取什么反应 Separate segments of code determine what action should be taken for each type of interrupt 2.* 中断的概念中断:指当出现需要时, CPU 暂时停止当前程序的执行转而执行处理新情况的程序和执行过程。为什么需要中断? 处理器的速度跟外围硬件设备的速度往往不在一个数量级上,因此,如果内核采取让处理器向硬件发出一个请求,然后专门等待回应的办法,显然降低内核效率。现代操作系统是由中断驱动( interrupt driven )的,中断分为硬件中断和软件中断。 Event 是由 interrupt (硬件中断)或者 trap/exception (软件中断:陷阱/ 异常)引起, 发生时,处理器捕捉到一个执行线程,并且将控制权转移到操作系统中某一个固定地址的机制。如果计算机没有进程要执行,没有用户响应请求,操作系统将等待某个事件的发

OS复习笔记by李嘉良 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数18
  • 收藏数0 收藏
  • 顶次数0
  • 上传人wangzhidaol
  • 文件大小0 KB
  • 时间2016-07-14