OperatingSystem_第1页
OperatingSystem_第2页
OperatingSystem_第3页
OperatingSystem_第4页
OperatingSystem_第5页
已阅读5页,还剩30页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、1.1Operating System ConceptsOperating SystemOperating System College of Computer ScienceZhejiang UniversityEmail:http:/ System Concepts教学目的与任务教学目的与任务n操作系统是计算机应用专业和计算机操作系统是计算机应用专业和计算机软件专业的专业基础课。软件专业的专业基础课。n通过本课程的学习,要求学生理解操作系通过本课程的学习,要求学生理解操作系统在计算机系统中的作用、地位和特点,统在计算机系统中的作用、地位和特点,熟练掌握和运用操作系统在进行计算机软熟练掌握和

2、运用操作系统在进行计算机软硬件资源管理和调度时常用的概念、方法硬件资源管理和调度时常用的概念、方法、策略、算法、手段等。、策略、算法、手段等。n通过外文教材的讲授和学习,使学生在专通过外文教材的讲授和学习,使学生在专业英语资料的阅读和理解上达到应有的水业英语资料的阅读和理解上达到应有的水平。平。1.3Operating System Concepts教材、参考书、网址教材、参考书、网址n教材:教材: Operating System Concepts 6th, Abrraham Silberschatz、Peter Galvin,Greg Gagne,2001.6n实验:边干边学实验:边干边学

3、Linux内核指导,李善平等,浙江大学出版社内核指导,李善平等,浙江大学出版社n中文参考书:中文参考书:1. 操作系统学习指导与考试指导操作系统学习指导与考试指导,李善平等,浙江大,李善平等,浙江大学出版社。学出版社。2.计算机操作系统计算机操作系统,汤子瀛等,西安电子科技大学出,汤子瀛等,西安电子科技大学出版社。版社。3.现代操作系统现代操作系统,Aadrew S.T著著,陈向群等译,机械工陈向群等译,机械工业出版社。业出版社。n参考网址:参考网址:www.bell- System Concepts操作系统资源网站操作系统资源网站nhttp:/n 论坛n 答疑n 习题布置、解答、提交、批阅n

4、 考试n 参考资料1.5Operating System Concepts目录目录nPart 1 OverviewnChapter 1: Introduction引论引论nChapter 2: Computer-System Structures计算机系统结构计算机系统结构nChapter 3: Operating-System Structures操作系统结构操作系统结构nPart 2 Process ManagementnChapter 4: Processes 进程进程nChapter 5: Threads 线程线程nChapter 6: CPU Scheduling CPU调度调度nC

5、hapter 7: Process Synchronization 进程同步进程同步nChapter 8: Deadlocks 死锁死锁nPart 3 Storage ManagementnChapter 9: Memory Management 存储器管理存储器管理nChapter 10: Virtual Memory虚拟虚拟存储器存储器nChapter 11: File-System Interface文件系统接口文件系统接口1.6Operating System Concepts目录目录1nPart 4 I/O ManagementnChapter 12: File System Imp

6、lementation文件系统实现文件系统实现nChapter 13: I/O SystemsI/O系统系统nChapter 14: Mass-Storage Systems 海量存储系统海量存储系统nPart 5 Distributed SystemsnChapter 15: Network Structures网络网络结构结构nChapter 16: Distributed-File Systems分布式分布式文件系统文件系统nChapter 17: Distributed Coordination分布式协同分布式协同nPart 6 Protection and SecuritynChap

7、ter 18: Protection保护保护nChapter 19: Security安全安全nPart 7 Case StudynChapter 20: The Linux System Linux系统系统nChapter 21: Windows 20001.7Operating System ConceptsChapter 1: Introduction引论引论n1.1 What is an Operating System?什么是操作系统什么是操作系统?n1.2 Mainframe Systems主机主机系统系统n1.3 Desktop Systems台式系统台式系统n1.4 Multi

8、processor Systems多处理多处理机机系统系统n1.5 Distributed Systems分布式系统分布式系统n1.6 Clustered System集群系统集群系统n1.7 Real -Time Systems实时系统实时系统n1.8 Handheld Systems手持系统手持系统n1.9 Feature Migration特征特征变迁变迁n1.10 Computing Environments计算环境计算环境1.8Operating System Concepts1.1 What is an Operating System?什么是操作系统?什么是操作系统?nA pro

9、gram that acts as an intermediary between a user of a computer and the computer hardware. 在计算机用户和计算机硬件之间起媒介作用的一种程序。在计算机用户和计算机硬件之间起媒介作用的一种程序。 nOperating system goals:操作系统目标操作系统目标FExecute user programs and make solving user problems easier. 执行用户程序并使用户问题更易解决。执行用户程序并使用户问题更易解决。FMake the computer system c

10、onvenient to use. 使计算机系统更易使用。使计算机系统更易使用。nUse the computer hardware in an efficient manner. 以一种效率的方式使用硬件。以一种效率的方式使用硬件。1.9Operating System ConceptsComputer System Components计算机系统部件计算机系统部件1. Hardware硬件硬件 provides basic computing resources (CPU, memory, I/O devices).提供基本的计算资源提供基本的计算资源2. Operating system

11、操作系统操作系统 controls and coordinates the use of the hardware among the various application programs for the various users.在各种应用程序和用户之间控制与协调对硬件的使用在各种应用程序和用户之间控制与协调对硬件的使用3. Applications programs应用程序应用程序 define the ways in which the system resources are used to solve the computing problems of the users (c

12、ompilers, database systems, video games, business programs).定义解决用户问题的资源使用方式(编译、定义解决用户问题的资源使用方式(编译、数据库、视频游戏、事务程序等)数据库、视频游戏、事务程序等)4. Users用户用户(people, machines, other computers). 1.10Operating System ConceptsFig 1.1 Abstract View of System Components系统部件的简要视图系统部件的简要视图1.11Operating System ConceptsOpera

13、ting System Definitions操作系统定义操作系统定义nResource allocator资源分配者资源分配者 manages and allocates resources.管理和分配资源管理和分配资源nControl program控制程序控制程序 controls the execution of user programs and operations of I/O devices . 控制用户程序的运行和控制用户程序的运行和I/O设备的操作设备的操作nKernel内核内核 the one program running at all times (all else

14、being application programs). 在全时运行的一在全时运行的一个程序(其他的是应用)个程序(其他的是应用)nCommon definitions: operating system is the one program running at all times on the computer (usually called the kernel), with all else being application programs.n操作系统是管理和控制计算机各种硬件和软件资源,合操作系统是管理和控制计算机各种硬件和软件资源,合理的组织计算机的工作流程理的组织计算机的工作

15、流程 ,以及方便用户的程序的集,以及方便用户的程序的集合合1.12Operating System Concepts1.2 Mainframe Systems主机主机系统系统nReduce setup time by batching similar jobs批量处理同批量处理同类作业减少了设置时间类作业减少了设置时间nAutomatic job sequencing自动作业调度自动作业调度 automatically transfers control from one job to another. First rudimentary operating system.自动把控制从一个作业

16、转自动把控制从一个作业转到另一个作业。第一个基本操作系统。到另一个作业。第一个基本操作系统。nResident monitor常驻管理程序常驻管理程序Finitial control in monitor初始化初始化管理程序管理程序Fcontrol transfers to job把控制权移交给作业把控制权移交给作业Fwhen job completes control transfers pack to monitor作业完成后把控制权移交还给管理程序作业完成后把控制权移交还给管理程序1.13Operating System ConceptsFig 1.2 Memory Layout for

17、 a Simple Batch System简单批处理系统的内存布局简单批处理系统的内存布局Low CPU utilization1.14Operating System Concepts 1.2.2 Multiprogrammed Systems多道程序系统Several jobs are kept in main memory at the same time, and the CPU is multiplexed among them.在主存中同时有若干个作业,在主存中同时有若干个作业, CPU在其中多重切换在其中多重切换(共享共享CPU)。Increase CPU utilizatio

18、n1.15Operating System ConceptsOS Features Needed for Multiprogramming多道程序对多道程序对OS特点的要求特点的要求nI/O routine supplied by the system.系统提供系统提供I/O例程例程nMemory management存储管理存储管理 the system must allocate the memory to several jobs. 系统必须为若干作业分派空间系统必须为若干作业分派空间nCPU scheduling CPUCPU调度调度 the system must choose am

19、ong several jobs ready to run. 系统必须在就绪作业中选择准备运行系统必须在就绪作业中选择准备运行nAllocation of devices.设备分配设备分配1.16Operating System Concepts1.2.3Time-Sharing SystemsInteractive Computing分时系统分时系统-交互式计算交互式计算nThe CPU is multiplexed among several jobs that are kept in memory and on disk (the CPU is allocated to a job on

20、ly if the job is in memory). 对保存在内存和磁盘上的若干作业之间共享对保存在内存和磁盘上的若干作业之间共享CPU( CPU被被分配给某个作业仅当该作业在内存)分配给某个作业仅当该作业在内存)nA job swapped in and out of memory to the disk. 作业作业在内存和磁盘之间被对换在内存和磁盘之间被对换n所谓所谓“分时分时”是指多个用户分时共享使用同一台计算机,也就是说把是指多个用户分时共享使用同一台计算机,也就是说把计算机的系统资源(尤其是计算机的系统资源(尤其是CPUCPU时间)进行时间上分割,即将整个工作时间)进行时间上分割

21、,即将整个工作时间分成一个个的时间片,每个时间片分给一个用户使用,这样将时间分成一个个的时间片,每个时间片分给一个用户使用,这样将CPUCPU工作时间分别提供给多个用户使用,每个用户依次地轮流且使用一个工作时间分别提供给多个用户使用,每个用户依次地轮流且使用一个时间片。时间片。1.17Operating System ConceptsTime-Sharing SystemsInteractive Computing (Cont.)nOn-line communication between the user and the system is provided; when the operat

22、ing system finishes the execution of one command, it seeks the next “control statement” from the users keyboard. 提供用户和系统之间的在线通信;操作系统完成了一条命提供用户和系统之间的在线通信;操作系统完成了一条命令的执行后,它从用户键盘上寻找下一条控制语句令的执行后,它从用户键盘上寻找下一条控制语句nOn-line system must be available for users to access data and code. 在线系统必须使用户能够访问数据和代码在线系统必须

23、使用户能够访问数据和代码1.18Operating System Concepts1.3 Desktop Systems台式系统台式系统nPersonal computers个人计算机个人计算机 computer system dedicated to a single user.供个人使用的计算机系统供个人使用的计算机系统nI/O devices keyboards, mice, display screens, small printers. I/O设备设备键盘、鼠标、显示器、小型打印机键盘、鼠标、显示器、小型打印机nUser convenience and responsiveness.

24、方便用户和响应方便用户和响应nCan adopt technology developed for larger operating system often individuals have sole use of computer and do not need advanced CPU utilization of protection features.可采用大型操作系统研发的技术,个可采用大型操作系统研发的技术,个人独占计算机不需要高级人独占计算机不需要高级CPU使用的保护技术使用的保护技术nMay run several different types of operating s

25、ystems (Windows, MacOS, UNIX, Linux)可以运行不同的操作系可以运行不同的操作系统统1.19Operating System Concepts1.4 Multiprocessor Systems多处理多处理机机系统系统nMultiprocessor systems (knows as parallel systems or tightly coupled systems)nMultiprocessor systems with more than on CPU in close communication. 有紧密通信的、多于一个有紧密通信的、多于一个CPU的多

26、处理器系统的多处理器系统nTightly coupled system 紧密偶合系统紧密偶合系统 processors share memory and a clock; communication usually takes place through the shared memory. 处理器共享内存和时钟;一般通过共享内存进行通信处理器共享内存和时钟;一般通过共享内存进行通信nAdvantages of Multiprocessor system:优点优点FIncreased throughput增大吞吐量增大吞吐量FEconomical经济经济1.20Operating System

27、 ConceptsMultiprocessor Systems(Cont.)FIncreased reliability提高可靠性提高可靠性4graceful degradation (fail-soft )故障弱化故障弱化:ability to continue providing service proportional to the level of surviving hardware4fault tolerant 容错容错nSymmetric multiprocessing (SMP)对称多处理对称多处理 器器FEach processor runs and identical co

28、py of the operating system. 每个处理器运行操作系统的相同副本每个处理器运行操作系统的相同副本FMany processes can run at once without performance deterioration. 许多进程可以立即运行不会降低性能许多进程可以立即运行不会降低性能1.21Operating System ConceptsMultiprocessor Systems(Cont.)FMost modern operating systems support SMP 多数现代操作系统支持多数现代操作系统支持SMPnAsymmetric multi

29、processing非对称多处理器非对称多处理器FEach processor is assigned a specific task; master processor schedules and allocated work to slave processors. 每个处理器赋予一个特定任务;主处理器为从处理器调每个处理器赋予一个特定任务;主处理器为从处理器调度和分配作业度和分配作业FMore common in extremely large systems 常用在非常大的系统中常用在非常大的系统中1.22Operating System ConceptsFig 1.4 Symmetr

30、ic Multiprocessing Architecture对称多处理器体系结构对称多处理器体系结构1.23Operating System Concepts1.5 Distributed Systems分布式系统分布式系统nDistribute the computation among several physical processors.计算分布在若干物理处理器上计算分布在若干物理处理器上nLoosely coupled system each processor has its own local memory; processors communicate with one an

31、other through various communications lines, such as high-speed buses or telephone lines.松散偶合系统松散偶合系统每个处理器有自身的本地存储器;通过各种通信设施,如每个处理器有自身的本地存储器;通过各种通信设施,如高速总线、电话线等进行处理器之间的通信高速总线、电话线等进行处理器之间的通信nAdvantages of distributed systems.分布式系统优点分布式系统优点FResources Sharing资源共享资源共享FComputation speed up load sharing 加快

32、计算加快计算 - 共享装载共享装载1.24Operating System ConceptsDistributed Systems (cont.)FReliability可靠可靠FCommunications通信通信nRequires networking infrastructure.需要网络需要网络构架构架nLocal area networks (LAN) or Wide area networks (WAN)nMay be either client-server客户服务器客户服务器or peer-to-peer systems.对等系统对等系统1.25Operating System

33、 ConceptsFig 1.5 General Structure of Client-Server客户服务器一般客户服务器一般结构结构1.26Operating System Concepts1.6 Clustered Systems集群系统集群系统nClustering allows two or more systems to share storage.集群集群允许两个或多个系统共享存储器允许两个或多个系统共享存储器nProvides high reliability.提供高可靠性提供高可靠性nAsymmetric clustering(非对称集群)非对称集群)F one serve

34、r runs the application while other servers standby. 一个服务器运行应用程序时其他服务器备用一个服务器运行应用程序时其他服务器备用Fone host is hot standby mode while the other is running the application . The hot standby host does nothing but monitor the active server .当另一个服务器正在运行应用程序时,一个主机处在激当另一个服务器正在运行应用程序时,一个主机处在激活等待状态。该机不做任何工作,但监控运行的服

35、务器活等待状态。该机不做任何工作,但监控运行的服务器nSymmetric clustering: all N hosts are running the application , and they are monitoring each other .当所有的主机都运行应用程序时,他们相互监控。当所有的主机都运行应用程序时,他们相互监控。1.27Operating System Concepts1.7 Real-Time Systems实时系统实时系统nOften used as a control device in a dedicated application such as cont

36、rolling scientific experiments, medical imaging systems, industrial control systems, and some display systems. 通常作为控制设备在诸如控制科学实验、医学影象系统、工业控制系通常作为控制设备在诸如控制科学实验、医学影象系统、工业控制系统以及一些显示系统中应用统以及一些显示系统中应用nWell-defined fixed-time constraints. 严格确定的时间限制严格确定的时间限制nReal-Time systems may be either hard or soft rea

37、l-time.实时系统可以是硬实时或实时系统可以是硬实时或软软实时实时nHard real-time硬实时硬实时 :FSecondary storage limited or absent, data stored in short term memory, or read-only memory (ROM) 有限的或没有次级存储器,数据存在短期存储器或只读存储器中有限的或没有次级存储器,数据存在短期存储器或只读存储器中1.28Operating System ConceptsReal-Time Systems (Cont.)Conflicts with time-sharing system

38、s, not supported by general-purpose operating systems.与分时系统不同,通用操作系统一般不支持实时系统与分时系统不同,通用操作系统一般不支持实时系统nSoft real-time软实时软实时FLimited utility in industrial control of robotics在工业控制或机器人中有部分应用在工业控制或机器人中有部分应用FUseful in applications (multimedia, virtual reality) requiring advanced operating-system features.

39、在需要高级操作系统功能的应用软件(多媒体、虚拟现在需要高级操作系统功能的应用软件(多媒体、虚拟现实)中使用实)中使用1.29Operating System Concepts1.8Handheld Systems手持系统手持系统nPersonal Digital Assistants (PDAs)个人数字助理个人数字助理 : such as PalmPilots or Cellular telephones with connectivity to network such as the Internet .nIssues:问题问题FLimited memory 内存限制内存限制FSlow p

40、rocessors 处理器速度慢处理器速度慢FSmall display screens 显示屏小显示屏小1.30Operating System Concepts1.9 Fig 1.6 Migration of Operating-System Concepts and Features操作系统概念和特性的变迁操作系统概念和特性的变迁1.31Operating System Concepts1.10 Computing Environments计算环境计算环境n1.10.1 Traditional computing传统的计算传统的计算n1.10.2 Web-Based Computing基于基于Web计算计算n1.10.3 Embedded Computing嵌入计算嵌入计算1.32Operating System Concepts1.11 SummarynConcept of t

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论