1 张惠娟 副教授 实用操作系统概念. 2 内容框架 概述 体系结构 进程管理 内存管理 文件管理 外设管理.

Slides:



Advertisements
Similar presentations
Computer-System Structures Er.Harsimran Singh
Advertisements

Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures
数控机床结构及维修 主编:于万成 王桂莲 副主编:李昊 人民邮电出版社 北京 ◎ 了解数控系统的组成和常见数控系统 的特点 ◎ 熟悉常见数控系统的参数设置 ◎ 掌握数控系统的常见故障诊断及维修 方法 调试与维修数控 机床的数控系统.
计算机 在分析化学的应用 ( 简介 ) 陈辉宏. 一. 概述 信息时代的来临, 各门学科的研究方法都 有了新的发展. 计算机的介入, 为分析化学的进展提供了 一种更方便的研究方法.
编译程序 构造原理和实现技术 授课教师:吕江花. 第一章 编译程序概述 主要内容: 几个基本概念 编译器的工作过程概述 编译器各个阶段的功能描述 编译程序的实现途径.
OS2-1 Chapter 2 Computer System Structures. OS2-2 Outlines Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
嵌入式操作系统 陈香兰 Fall 系统调用 10/27/09 嵌入式 OS 3/12 系统调用的意义  操作系统为用户态进程与硬件设备进行交互提供 了一组接口 —— 系统调用  把用户从底层的硬件编程中解放出来  极大的提高了系统的安全性  使用户程序具有可移植性.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Abhinav Kamra Computer Science, Columbia University 2.1 Operating System Concepts Silberschatz, Galvin and Gagne  2002 Chapter 2: Computer-System Structures.
兰州理工大学 1 第九章 CAD/CAM 系统集成 9.1 概述 9.2 3C 内部集成存在的问题和解决的办法 9.3 CAD/CAM 集成方法 9.4 3C/PDM 集成方法 9.5CIM 与 CIMS.
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
大亚湾 PMT 读出电子学介绍 王铮 中科院 “ 核探测技术与核电子学重点实验室 ” 年会.
1 自动化立体仓库模型研究 —— 苗晓翠. 2 自动化仓库 概念 优点 结构及入库工作流程 出库.
外文文献检索示例. 实验目的: 掌握利用计算机网络检索外文文献的基本方法; 了解熟悉下列数据库的结构、内容并掌握其检索方 法 ; 掌握检索的主要途径:出版物( Publication )、关键 词( Keyword )、作者( Author )等。
1 第 7 章 专家控制系统 概述 专家系统的起源与发展 专家系统的一般结构 专家系统的知识表示和获取 专家系统的特点及分类.
流态化 概述 一、固体流态化:颗粒物料与流动的流体接触,使颗粒物料呈类 似于流体的状态。 二、流态化技术的应用:流化催化裂化、吸附、干燥、冷凝等。 三、流态化技术的优点:连续化操作;温度均匀,易调节和维持; 气、固间传质、传热速率高等。 四、本章基本内容: 1. 流态化基本概念 2. 流体力学特性 3.
Computer-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures 1/31/03 Computer System Operation I/O Structure.
第七章 半导体存储器 半导体存储器是能存储大量二值信息的半导体器件。 存储器性能指标:存储容量( 10 9 位 / 片)、存取速度( 10ns ) 半导体存储器分类 从存取功能分:只读存储器 ROM 、随机存储器 RAM 只读存储器:掩模 ROM 、 PROM 可编程只读存储器、 EPROM 可擦除可编程只读存储器.
A. Frank - P. Weisberg Operating Systems Functional View of Operating System.
第二章 处理器管理 南通大学电子信息学院 2010 年 9 月. 第二章 处理器管理 2.1 中央处理器 2.2 中断技术 2.3 进程及其实现 2.4 线程及其实现 2.5 Linux 进程和线程 2.6 Windows 2003 进程和线程 2.7 处理器调度 2.8 作业的管理与调度 2.9.
1/21/2010CSCI 315 Operating Systems Design1 Computer System Structures Notice: The slides for this lecture have been largely based on those accompanying.
编译原理总结. 基本概念  编译器 、解释器  编译过程 、各过程的功能  编译器在程序执行过程中的作用  编译器的实现途径.
1.2 地理信息技术在区域 地理环境研究中的应用. 地理信息技术: 指获取、管理、分析和 应用地理空间信息的现 代技术的总称。 应用:资源调查、环境监测、自然灾害防御监测、国 土资源管理、国土开规划等。 地理信息 : 遥感 (RS) 、全球定位系统 (GPS) 和地理信息系统 (GIS)
Chapter 2: Computer-System Structures
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Chapter 1. Introduction What is an Operating System? Mainframe Systems
《 UML 分析与设计》 交互概述图 授课人:唐一韬. 知 识 图 谱知 识 图 谱知 识 图 谱知 识 图 谱.
2.1 Silberschatz, Galvin and Gagne ©2003 Operating System Concepts with Java Chapter 2: Computer-System Structures Computer System Operation I/O Structure.
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 2: Computer-System Structures Computer System Operation I/O Structure.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures
Thanks to Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2 Computer-System Structures n Computer System Operation n I/O Structure.
1 CSE Department MAITSandeep Tayal Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection.
2: Computer-System Structures
Chapter 2: Computer-System Structures 2.1 Computer System Operation 2.5 Hardware Protection 2.6 Network Structure.
1 Chapter 2: Computer-System Structures  Computer System Operation  I/O Structure  Storage Structure  Storage Hierarchy  Hardware Protection  General.
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
第四章 计算机数控( CNC )系统  本章重点:  1 计算机数控系统构成及其结构特点  2 运动轨迹插补原理  3 刀具补偿.
表单自定义 “ 表单自定义 ” 功能是用于制作表单的 工具,用数飞 OA 提供的表单自定义 功能能够快速制作出内容丰富、格 式规范、美观的表单。
力的合成 力的合成 一、力的合成 二、力的平行四边形 上一页下一页 目 录 退 出. 一、力的合成 O. O. 1. 合力与分力 我们常常用 一个力来代替几个力。如果这个 力单独作用在物体上的效果与原 来几个力共同作用在物体上的效 果完全一样,那么,这一个力就 叫做那几个力的合力,而那几个 力就是这个力的分力。
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 CS.217 Operating System By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 2 Computer-System Structures Slide 1 Chapter 2 Computer-System Structures.
Silberschatz, Galvin and Gagne  Applied Operating System Concepts Chapter 2: Computer-System Structures Computer System Architecture and Operation.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Review of Computer System Organization. Computer Startup For a computer to start running when it is first powered up, it needs to execute an initial program.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
U niversity of S cience and T echnology of C hina VxWorks 及其应用开发 陈香兰 年 7 月.
Chapter 2: Computer-System Structures(Hardware) or Architecture or Organization Computer System Operation I/O Structure Storage Structure Storage Hierarchy.
1 张惠娟 副教授 实用操作系统概念. 2 内容框架 概述 体系结构 进程管理 内存管理 文件管理 外设管理.
Chapter 2. Computer-System Structure Device controllers: synchronize and manage access to devices.
2. MCS-51 单片机的组成及结构分析 2.1 MCS-51 单片机的内部结构及结构特点 1 )在 RAM 区有一个寄存器工作区( 4×8 个工作寄存器), 专门功能寄存器 SFR (完成定时器、串行口、中断逻辑等 控制)。 2 )程序存储器与数据存储器在空间上分开。 有不同的地址指针 PC 、
单元四 电动后视镜控制电路. 汽车辅助装置汽车辅助装置 一、教学目的要求: 掌握电动后视镜的组成、功用、工作过程以 及控制电路 二、主要教学内容: ( 1 )电动后视镜的组成 ( 2 )电动后视镜控制电路 ( 3 )电动后视镜工作过程 三、教学重点、难点: 电动后视镜工作过程.
上机任务 认真查看课件内容,理解: ① ① I/O 接口的含义 ② ② I/O 端口与编址 上网查阅资料,至少找一篇 “I/O 接口 ” 有关的技术 资料(比如显卡、或声卡、网卡、磁盘控制器等 ) 的工作原理)并仔细阅读,扩展知识面。
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Computer-System Architecture
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Module 2: Computer-System Structures
Presentation transcript:

1 张惠娟 副教授 实用操作系统概念

2 内容框架 概述 体系结构 进程管理 内存管理 文件管理 外设管理

3 内容 Ch2: 计算机体系结构 Ch3: 操作系统体系结构

4 Modern computer system structure 中断机制 CPU I/O Structure Storage Structure Hardware Protection General System Architecture Ch2 :体系结构

5 现代计算机体系结构 Modern computer system structure

6  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device type.  Each device controller has a local buffer.  CPU moves data from/to main memory to/from local buffers  I/O is from the device to local buffer of controller.  Device controller informs CPU that it has finished its operation by causing an interrupt. Modern computer system structure

7 中断机制  An operating system is interrupt driven  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.  Incoming interrupts are disabled while another interrupt is being processed to prevent a lost interrupt..

8  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 中断机制

9 I/O Structure Two I/O methods I/O technology

10 Two I/O methods SynchronousAsynchronous

11 Two I/O methods  Synchronous After I/O starts, control returns to user program only upon I/O completion. wait instruction idles the CPU until the next interrupt wait loop (contention for memory access). At most one I/O request is outstanding at a time, no simultaneous I/O processing.

12  Asynchronous After I/O starts, control returns to user program without waiting for I/O completion. System call – request to the operating system to allow user to wait for I/O completion. Device-status table contains entry for each I/O device indicating its type, address, and state. Operating system indexes into I/O device table to determine device status and to modify table entry to include interrupt. Two I/O methods

13 I/O technology  Program I/O  Interrupt  DMA  Channel

14 I/O technology  Program I/O 处理器提供 I/O 相关指令实现 处理器定期轮询 I/O 单元的状态,直到处 理完毕 Problem 占用 cpu 时间

15 I/O technology  Interrupt 解决 PIO 技术中的问题,让处理器从轮询任务中 解放出来,使 I/O 操作和指令执行并行起来。 具体作法 当 I/O 处理单元准备好与设备交互的时候,通过物理 信号通知处理器,即中断处理器。

16 I/O technology  DMA 中断的引入大大地提高了处理器处理 I/O 的效率, 但是效率仍旧不高。 解决方法: 直接存储器( DMA )访问 通过系统总线中一独立控制单元 —— DMA 控制器, 自动控制成块数据在内存和 I/O 单元间的传送,大大 提高处理 I/O 的效能。

17 程序 I/O 中断 I/O DMA

18  Channel 独立于中央处理器,专门负责数据 I/O 传输 的处理机,又称为 I/O 处理机 引入通道的目的 使 CPU 从 I/O 事务中解脱出来 同时为了提高 CPU 与设备、设备与设备之间的 并行度 I/O technology

19 Main memory Secondary storage Storage Hierarchy Caching Storage Structure

20 Storage Structure  Main memory only large storage media that the CPU can access directly. 两类存储器: 读写型存储器( RAM )、只读型存储器( ROM )

21  Secondary storage Magnetic disks rigid metal or glass platters covered with magnetic recording material Disk surface is logically divided into tracks, which are subdivided into sectors. The disk controller determines the logical interaction between the device and the computer. Storage Structure

22

23 Storage Hierarchy  Storage systems organized in hierarchy. Speed cost volatility

24 Storage-Device Hierarchy

25

26 Caching  Caching copying information into faster storage system; main memory can be viewed as a last cache for secondary storage.

27 Caching  缓冲三种位置 处理器与主存储器之间 处理器和其它外部设备之间 设备与设备之间的通信  目的 解决部件之间速度不匹配的问题

28 Hardware Protection Dual-Mode Operation I/O Protection Memory Protection CPU Protection

29 Hardware Protection  Dual-Mode Operation Sharing system resources requires operating system to ensure that an incorrect program cannot cause other programs to execute incorrectly.

30 Hardware Protection Provide hardware support to differentiate between at least two modes of operations. 1.User mode – execution done on behalf of a user. 2.Monitor mode (also supervisor mode or system mode) – execution done on behalf of operating system.

31 Hardware Protection Mode bit added to computer hardware to indicate the current mode: monitor (0) or user (1). monitoruser Interrupt/fault set user mode

32 Hardware Protection Privileged instructions can be issued only in monitor mode. When an interrupt or fault occurs hardware switches to monitor mode.

33 Hardware Protection  I/O Protection All I/O instructions are privileged instructions. Must ensure that a user program could never gain control of the computer in monitor mode (I.e., a user program that, as part of its execution, stores a new address in the interrupt vector).

34 Hardware Protection  Memory Protection Must provide memory protection at least for the interrupt vector and the interrupt service routines. In order to have memory protection, add two registers that determine the range of legal addresses a program may access: base register – holds the smallest legal physical memory address. Limit register – contains the size of the range Memory outside the defined range is protected.

35

36 Hardware Protection  CPU Protection Timer – interrupts computer after specified period to ensure operating system maintains control.  Timer is decremented every clock tick.  When timer reaches the value 0, an interrupt occurs. Timer commonly used to implement time sharing. Time also used to compute the current time. Load-timer is a privileged instruction.

37 Use of A System Call to Perform I/O

38 小节 了解计算机体系结构 I/O 方式 存储机制 保护机制

39 Exercises 阅读 P19 - P41 P41