操作系统原理课件ch03.ppt

上传人(卖家):晟晟文业 文档编号:4950518 上传时间:2023-01-27 格式:PPT 页数:41 大小:397.50KB
下载 相关 举报
操作系统原理课件ch03.ppt_第1页
第1页 / 共41页
操作系统原理课件ch03.ppt_第2页
第2页 / 共41页
操作系统原理课件ch03.ppt_第3页
第3页 / 共41页
操作系统原理课件ch03.ppt_第4页
第4页 / 共41页
操作系统原理课件ch03.ppt_第5页
第5页 / 共41页
点击查看更多>>
资源描述

1、3.1Operating SystemChapter 3:Operating-System StructuresnSystem ComponentsnOperating System ServicesnSystem CallsnSystem ProgramsnSystem Structure nVirtual MachinesnSystem Design and ImplementationnSystem Generation3.2Operating SystemCommon System ComponentsnProcess Management nMain Memory Managemen

2、tnFile ManagementnI/O System ManagementnSecondary ManagementnNetworkingnProtection SystemnCommand-Interpreter System3.3Operating SystemProcess ManagementnA process is a program in execution.A process needs certain resources,including CPU time,memory,files,and I/O devices,to accomplish its task.nThe

3、operating system is responsible for the following activities in connection with process management.FProcess creation and deletion.Fprocess suspension and resumption.FProvision of mechanisms for:4process synchronization4process communication3.4Operating SystemMain-Memory ManagementnMemory is a large

4、array of words or bytes,each with its own address.It is a repository of quickly accessible data shared by the CPU and I/O devices.nMain memory is a volatile storage device.It loses its contents in the case of system failure.3.5Operating SystemnThe operating system is responsible for the following ac

5、tivities in connections with memory management:FKeep track of which parts of memory are currently being used and by whom.FDecide which processes to load when memory space becomes available.FAllocate and deallocate memory space as needed.3.6Operating SystemFile ManagementnA file is a collection of re

6、lated information defined by its creator.Commonly,files represent programs(both source and object forms)and data.nThe operating system is responsible for the following activities in connections with file management:FFile creation and deletion.FDirectory creation and deletion.FSupport of primitives f

7、or manipulating files and directories.FMapping files onto secondary storage.FFile backup on stable(nonvolatile)storage media.3.7Operating SystemI/O System ManagementnThe I/O system consists of:FA buffer-caching system FA general device-driver interfaceFDrivers for specific hardware devices3.8Operati

8、ng SystemSecondary-Storage ManagementnSince main memory(primary storage)is volatile and too small to accommodate all data and programs permanently,the computer system must provide secondary storage to back up main memory.3.9Operating SystemnMost modern computer systems use disks as the principle on-

9、line storage medium,for both programs and data.nThe operating system is responsible for the following activities in connection with disk management:FFree space managementFStorage allocationFDisk scheduling3.10Operating SystemCommand-Interpreter SystemnMany commands are given to the operating system

10、by control statements which deal with:Fprocess creation and managementFI/O handlingFsecondary-storage managementFmain-memory managementFfile-system access Fprotection Fnetworking3.11Operating SystemCommand-Interpreter System(Cont.)nThe program that reads and interprets control statements is called v

11、ariously:Fcommand-line interpreterFshell(in UNIX)Its function is to get and execute the next command statement.3.12Operating SystemOperating System ServicesnProgram execution system capability to load a program into memory and to run it.nI/O operations since user programs cannot execute I/O operatio

12、ns directly,the operating system must provide some means to perform I/O.nFile-system manipulation program capability to read,write,create,and delete files.3.13Operating SystemnCommunications exchange of information between processes executing either on the same computer or on different systems tied

13、together by a network.Implemented via shared memory or message passing.nError detection ensure correct computing by detecting errors in the CPU and memory hardware,in I/O devices,or in user programs.3.14Operating SystemAdditional Operating System FunctionsAdditional functions exist not for helping t

14、he user,but rather for ensuring efficient system operations.Resource allocation allocating resources to multiple users or multiple jobs running at the same time.Accounting keep track of and record which users use how much and what kinds of computer resources for account billing or for accumulating u

15、sage statistics.Protection ensuring that all access to system resources is controlled.3.15Operating SystemSystem CallsnSystem calls provide the interface between a running program and the operating system.FGenerally available as assembly-language instructions.FLanguages defined to replace assembly l

16、anguage for systems programming allow system calls to be made directly(e.g.,C,C+)3.16Operating SystemnThree general methods are used to pass parameters between a running program and the operating system.FPass parameters in registers.FStore the parameters in a table in memory,and the table address is

17、 passed as a parameter in a register.FPush(store)the parameters onto the stack by the program,and pop off the stack by operating system.3.17Operating SystemPassing of Parameters As A Table3.18Operating SystemTypes of System CallsnProcess controlnFile managementnDevice managementnInformation maintena

18、ncenCommunications3.19Operating SystemMS-DOS ExecutionAt System Start-upRunning a Program3.20Operating SystemUNIX Running Multiple Programs3.21Operating SystemCommunication ModelsMsg PassingShared MemorynCommunication may take place using either message passing or shared memory.3.22Operating SystemS

19、ystem ProgramsnSystem programs provide a convenient environment for program development and execution.The can be divided into:FFile manipulation FStatus informationFFile modificationFProgramming language supportFProgram loading and executionFCommunicationsFApplication programsnMost users view of the

20、 operation system is defined by system programs,not the actual system calls.3.23Operating SystemMS-DOS System Structure nMS-DOS written to provide the most functionality in the least spaceFnot divided into modulesFAlthough MS-DOS has some structure,its interfaces and levels of functionality are not

21、well separated3.24Operating SystemMS-DOS Layer Structure3.25Operating SystemUNIX System Structure nUNIX limited by hardware functionality,the original UNIX operating system had limited structuring.The UNIX OS consists of two separable parts.FSystems programsFThe kernel4Consists of everything below t

22、he system-call interface and above the physical hardware4Provides the file system,CPU scheduling,memory management,and other operating-system functions;a large number of functions for one level.3.26Operating SystemUNIX System Structure3.27Operating SystemLayered ApproachnThe operating system is divi

23、ded into a number of layers(levels),each built on top of lower layers.The bottom layer(layer 0),is the hardware;the highest(layer N)is the user interface.nWith modularity,layers are selected such that each uses functions(operations)and services of only lower-level layers.3.28Operating SystemAn Opera

24、ting System Layer3.29Operating SystemMicrokernel System Structure nMoves as much from the kernel into“user”space.nCommunication takes place between user modules using message passing.nBenefits:-easier to extend a microkernel(微内核)-easier to port the operating system to new architectures-more reliable

25、(less code is running in kernel mode)-more secure3.30Operating SystemVirtual MachinesnA virtual machine takes the layered approach to its logical conclusion.It treats hardware and the operating system kernel as though they were all hardware.nA virtual machine provides an interface identical to the u

26、nderlying bare hardware.nThe operating system creates the illusion of multiple processes,each executing on its own processor with its own(virtual)memory.3.31Operating SystemVirtual Machines(Cont.)nThe resources of the physical computer are shared to create the virtual machines.FCPU scheduling can cr

27、eate the appearance that users have their own processor.FSpooling and a file system can provide virtual card readers and virtual line printers.FA normal user time-sharing terminal serves as the virtual machine operators console.3.32Operating SystemSystem ModelsNon-virtual MachineVirtual Machine3.33O

28、perating SystemAdvantages/Disadvantages of Virtual Machines nThe virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines.This isolation,however,permits no direct sharing of resources.3.34Operating SystemnA virtua

29、l-machine system is a perfect vehicle for operating-systems research and development.System development is done on the virtual machine,instead of on a physical machine and so does not disrupt normal system operation.nThe virtual machine concept is difficult to implement due to the effort required to

30、 provide an exact duplicate to the underlying machine.3.35Operating SystemJava Virtual MachinenCompiled Java programs are platform-neutral bytecodes executed by a Java Virtual Machine(JVM).nJVM consists of-class loader-class verifier-runtime interpreternJust-In-Time(JIT)compilers increase performanc

31、e3.36Operating SystemJava Virtual Machine3.37Operating SystemSystem Design GoalsnUser goals operating system should be convenient to use,easy to learn,reliable,safe,and fast.nSystem goals operating system should be easy to design,implement,and maintain,as well as flexible,reliable,error-free,and eff

32、icient.3.38Operating SystemMechanisms and PoliciesnMechanisms determine how to do something,policies decide what will be done.nThe separation of policy from mechanism is a very important principle,it allows maximum flexibility if policy decisions are to be changed later.3.39Operating SystemSystem Im

33、plementationnTraditionally written in assembly language,operating systems can now be written in higher-level languages.nCode written in a high-level language:Fcan be written faster.Fis more compact.Fis easier to understand and debug.nAn operating system is far easier to port(move to some other hardw

34、are)if it is written in a high-level language.3.40Operating SystemSystem Generation(SYSGEN)nOperating systems are designed to run on any of a class of machines;the system must be configured for each specific computer site.nSYSGEN program obtains information concerning the specific configuration of the hardware system.nBooting starting a computer by loading the kernel.nBootstrap program code stored in ROM that is able to locate the kernel,load it into memory,and start its execution.3.41Operating System3.73.83.113.13

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 办公、行业 > 各类PPT课件(模板)
版权提示 | 免责声明

1,本文(操作系统原理课件ch03.ppt)为本站会员(晟晟文业)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|