版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Principles of Operating System操作系统原理,胡志刚 中南大学软件学院,国家精品课程,Textbook & References,SilberschatzOperating System Concepts(V7) 北京:高等教育出版社, 2007,3 汤小丹现代操作系统 北京:电子工业出版社, 2009,9 胡志刚计算机操作系统 长沙:中南大学出版社,2005,8,What is an Operating System,A manager: One program running at all times. CPU/Memory/File/I/O Devices M
2、anagement Operating system goals convenient to use. Use the computer in an efficient manner.,Types of Operating Systems,Real-time Operating System Multi/Single-user Operating Systems Multi/Single-tasking Operating Systems Distributed Operating System,3 Years, 2000 Persons 25 functional Teams,Time-Sh
3、aring,Mobile Operating System,4 Components of a Computer System,Computer VS Person,Operating System?,Monitor Simple Batch Modern OS 40s 50s (DOS/Windows/Unix),Why should study?,Help you understand important and hard OS concepts The Concepts/Architectures/Algorithms are very traditional and classical
4、,How to study?,Lectures do not cover everything Not all questions in homework or exams are from lectures Students responsibility Attend lectures Read textbooks Homework, Experiments,Chapter 1: Introduction,Computer-System Organization Operating-System Operations Batched OS Multiprogrammed OS Time-sh
5、aring OS Real-Time Systems,Computer System Organization,One or more CPUs, device controllers connect through common bus providing access to shared memory,Computer-System Operation,I/O devices and CPU execute concurrently Each device controller is in charge of a particular device type Each device con
6、troller 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,Concepts of Interrupts,Trap: A software-generated interrupt caused by an e
7、rror or a user request,BP,RP,Current,Interrupt service routine,Interrupt source Interrupt Interrupt system Interrupt register Break Point & Recovery Point Interrupt service routine Interrupt vector: contains the addresses of all the service routines,Common Functions of Interrupts,through the interru
8、pt vector, transfers control to interrupt service routine Save the address of the interrupted instruction Incoming interrupts are disabled,BP,RP,Current,Interrupt service routine,Interrupt Handling,OS preserves the state of the CPU Determines which type of interrupt has occurred: polling vectored in
9、terrupt system Separate segments of code determine what action should be taken for each type of interrupt,I/O Structure,After I/O starts, control returns to program, two ways: Synchronous: Only upon I/O completion Wait instruction idles the CPU Wait loop Asynchronous: Without waiting for I/O complet
10、ion System call Device-status table,Two I/O Methods,Synchronous,Asynchronous,Device-Status Table,Direct Memory Access Structure,Used for high-speed I/O devices able to transmit information at close to memory speeds Device controller transfers blocks of data from buffer storage directly to main memor
11、y without CPU intervention Only one interrupt is generated per block, rather than the one interrupt per byte,Mainframe Systems,Batch OS Multiprogrammed OS Time-sharing OS,Batch OS,Batching Programmers submitted jobs in a job control languages (shell) Operators batched together jobs with similar need
12、s and ran them as a group Drawbacks Fast CPU and slow I/O devices Not interactive,Multiprogrammed OS,Multiprogrammed OS Keeping many jobs in memory Job scheduling for selecting a job to load into memory CPU scheduling for selecting which job to run Memory management Protection,State Switch of Job,Re
13、served,Submited,CPU,P1 P2 P3,Running,I/O,Terminated,Swap Area,Mediumterm Scheduling,Ready,Waiting,Simple/Multiprogramming System,Job Monitor I/O Job A Job B Scheduling Type I/O Disk I/O,(1) Improve CPU utilization (2) Improve memory and I/O devices utilization (3) Increase system throughput,Characte
14、ristics of Multiprogrammed Systems: Multiprogramming UnOrdered Scheduling,Advantages of Multiprogramming,CPU,Mem,Job1,Job2,Jobn,User1,User2,Usern,Time-sharing OS,Memory sharing + time sharing multiprogramming + interaction,Real-Time Systems,Used in a dedicated application scientific experiments medi
15、cal imaging systems industrial control systems some display systems Well-defined fixed-time constraints Real-Time systems may be either hard or soft real-time,Real-Time Systems,Hard real-time Secondary storage limited or absent Data stored in memory, or read-only memory (ROM) Soft real-time Limited
16、utility in industrial control of robotics Useful in multimedia, virtual reality,etc,Operating-System Operations,Dual-mode operation allows OS to protect itself and other system components User mode and kernel mode Mode bit provided by hardware to distinguish when system is running user code or kerne
17、l code Some instructions designated as privileged System call changes mode to kernel, return from call resets it to user,Transition from User to Kernel Mode,Storage ManagementCaching,Performed at many levels in a computer (in hardware, operating system, software) Information in use copied from slower to faster storage temporarily Faster storage (cache) checked first to determine if information is there If it is, information used directly from the cache If not, data copied to cache and used there Cache smaller than storage being cached Cache size and replacement policy,P
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 环保工程安全责任合同书
- 安全器具采购验收制度
- 医用耗材应急采购制度
- 工厂采购内控管理制度
- 公司采购小组成立制度
- 小企业材料采购制度
- 正版软件采购管理制度
- 办公室用品采购领用制度
- 数字化转型下W证券公司核心业务流程再造:策略、实践与成效
- 数字化转型下H银行信用风险管理的困境与突破:理论、实践与创新路径
- 喝酒划拳活动方案
- 日语数字考试题目及答案
- CJ/T 83-2016水处理用斜管
- T/CI 467-2024复合集流体(铜箔)
- 《赤壁之战》课本剧剧本:感受三国英雄的壮志豪情
- 《平顶山平煤神马集团公司成本管理现状、问题及完善对策》7100字
- 电梯年度维修保养项目及要求
- 《经络与腧穴》课件-腧穴
- 2017-2021年安徽专升本考试英语真题卷
- 《百威啤酒定位分析》课件
- 号道路穿越天然气管道施工组织方案
评论
0/150
提交评论