Operating System Concepts–7th Edition,Jan 14,_第1页
Operating System Concepts–7th Edition,Jan 14,_第2页
Operating System Concepts–7th Edition,Jan 14,_第3页
Operating System Concepts–7th Edition,Jan 14,_第4页
Operating System Concepts–7th Edition,Jan 14,_第5页
已阅读5页,还剩46页未读 继续免费阅读

下载本文档

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

文档简介

1、Chapter 2: Operating-System StructuresFact or Fiction?Every non-trivial multiprogramming system is a timesharing system.Every non-trivial timesharing system is a multiprogramming system.Mnemonic DeviceMNMnMeNMn what? Just a mental trick for remembering things.Named after Mnemosyne, the personificati

2、on of memory and the mother of the nine Apollonian muses from Greek MythologySome Impeccable LogicEvery square is a rectangle, but not all rectangles are squares. Square Rectangle (alphabetically)Timesharing Multiprogramming (alphabetically)Every non-trivial timesharing system is a multiprogramming

3、system, but not every multiprogramming system is a timesharing system.Multiprogramming optimizes for throughputMaximizes useful work performed by CPU per unit timePure multiprogramming perhaps best for batch processingTimesharing optimizes for throughput subject to response timeResponse times must b

4、e small (less than 1 second) to create illusion that each user has a dedicated computer. Overhead of context-switching creates a drag on throughputBest for interactive computing environmentsChapter 2: Operating-System StructuresOperating System ServicesUser InterfaceSystem CallsTypes of System Calls

5、System ProgramsOperating System Design and ImplementationOperating System StructureVirtual MachinesOperating System GenerationSystem BootObjectivesTo describe the services an operating system provides to users, processes, and other systemsTo discuss the various ways of structuring an operating syste

6、mTo explain how operating systems are installed and customized and how they bootOS User ServicesOne set of operating-system services provides functions that are helpful to the user:User Interface - Almost all operating systems have a user interface (UI)Varies among Command-Line Interpreters (CLI), G

7、raphical User Interfaces (GUI), and Batch. Program Execution - The system must be able to load a program into memory and to run that program, end execution, either normally or abnormally (indicating error)I/O Operations - A running program may require I/O, which may involve a file or an I/O device.

8、File-System Operations - File system is of particular interest. Obviously, programs need to read and write files and directories, create and delete them, search them, list file Information, permission management.OS User ServicesCommunications Processes may exchange information, on the same computer

9、or between computers over a networkCommunications may be via shared memory or through message passing (packets moved by the OS)Error Detection OS needs to be constantly aware of possible errorsMay occur in the CPU, memory, I/O devices, or user programsFor each type of error, OS should take the appro

10、priate action to ensure correct and consistent computingDebugging facilities can greatly enhance the users and programmers abilities to use the system efficientlyOS System ServicesAnother set of OS functions exists to ensure efficient system operationResource Allocation - When multiple users or mult

11、iple jobs are running concurrently, resources must be allocated to each of themMany types of resources - Some (such as CPU cycles, main memory, and file storage) may have special allocation code (like scheduling or paging), others (such as I/O devices) may have general request and release code. Acco

12、unting - To keep track of which users use how much and what kinds of computer resources (e.g. print quota tracking)Protection and Security - The owners of information stored in a multi-user or networked computer system may want to control use of that information; concurrent processes should not inte

13、rfere with each otherProtection ensures controlled access to system resourcesSecurity from outsiders requires user authentication, extends to defending external I/O devices from invalid access attemptsOS User Interface Command LineCommand-Line Interface (CLI) allows direct command entryImplemented i

14、n the kernel or by a systems programSometimes multiple flavors implemented shellsKorn Shell (ksh), Bourne Shell, Bourne-Again Shell (bash)Primarily fetches and executes commands from userSometimes commands are built-in Shell footprint becomes proportional to functionalitySometimes commands are just

15、delegated (UNIX)Adding new features doesnt require shell modificationOS User Interface GUIUser-friendly desktop metaphor interfaceUsually mouse, keyboard, and monitorIcons represent files, programs, actions, etcVarious mouse buttons over objects in the interface cause various actions (provide inform

16、ation, options, execute function, open directory (known as a folder)First GUI was invented at Xerox PARC Alto (1973)Many systems now include both CLI and GUI interfacesMicrosoft Windows is GUI with CLI “command” shellApple Mac OS X has “Aqua” GUI interface with UNIX kernel underneath and shells avai

17、lableSolaris is CLI with optional GUI interfaces (Java Desktop, KDE)System CallsProgramming interface to the services provided by the OSMostly accessed by programs via a high-level Application Program Interface (API) rather than direct system call useOS frequently executes thousands of system calls

18、per secondThree most common APIsWin32 API for WindowsJava API for the Java Virtual Machine (JVM)POSIX API for POSIX-based systems (including virtually all versions of UNIX, Linux, and Mac OS X)Why use APIs rather than system calls?Portability, convenience, ease-of-use, encapsulationExample of System

19、 CallsSystem call sequence to copy the contents of one file to another fileSystem Call ImplementationTypically, a number associated with each system callSystem-call interface maintains a table indexed according to these numbersSystem call interface invokes the intended system call in OS kernel and r

20、eturns status of the system call and any return valuesThe caller need know nothing about how the system call is implementedJust needs to obey API and understand what OS will do as a result callMost details of OS interface hidden from programmer by API Managed by run-time support library (set of func

21、tions built into libraries included with compiler)API System Call OS RelationshipStandard C Library ExampleC program invoking printf() library call, which calls write() system callSystem Call Parameter PassingInformation is typically passed via parameters to the system callType and amount of informa

22、tion vary according to OS and callThree general methods used to pass parameters to the OSSimplest: pass the parameters in registers In some cases, may be more parameters than registersParameters stored in a table, or memory block, and address of block passed as a parameter in a register This approac

23、h taken by Linux and SolarisParameters placed, or pushed, onto the stack by the program and popped off the stack by the operating systemAdvantages: block and stack methods do not limit the number or length of parameters being passedParameter Passing via TableTypes of System CallsSee Section 2.4 of T

24、extbookProcess controlFile managementDevice managementInformation maintenanceCommunicationsMS-DOS Single Tasking System(a) At system startup, (b) Running a programFreeBSD Multi-tasking SystemSystem ProgramsSystem programs provide a convenient environment for program development and execution. The ca

25、n be divided into:File manipulation Status informationFile modificationProgramming language supportProgram loading and executionCommunicationsApplication programsMost user views of the operation system are defined by system programs, not the actual system callsSolaris 10 dtrace Following System Call

26、System ProgramsProvide a convenient environment for program development and executionSome of them are simply user interfaces to system calls; others are considerably more complexFile management - Create, delete, copy, rename, print, dump, list, and generally manipulate files and directoriesStatus in

27、formationSome ask the system for info - date, time, amount of available memory, disk space, number of usersOthers provide detailed performance, logging, and debugging informationTypically, these programs format and print the output to the terminal or other output devicesSome systems implement a regi

28、stry - used to store and retrieve configuration informationSystem Programs (contd)File modificationText editors to create and modify filesSpecial commands to search contents of files or perform transformations of the textProgramming-language support - Compilers, assemblers, debuggers and interpreter

29、s sometimes providedProgram loading and execution- Absolute loaders, relocatable loaders, linkage editors, and overlay-loaders, debugging systems for higher-level and machine languageCommunications - Provide the mechanism for creating virtual connections among processes, users, and computer systemsA

30、llow users to send messages to one anothers screens, browse web pages, send electronic-mail messages, log in remotely, transfer files from one machine to anotherNational “Talk Like a Pirate” DayLexicon to surviving the dayAhoy!“Hello”Aye!“Why yes, I agree most heartily with everything you just said”

31、Aye aye!“Ill get right on that sir, as soon as my break is over”Thar she blows!Pirate equivalent of “Whoop, there it is!”Operating System Design and ImplementationOS Design and Implementation not “solvable” due to conflicting stakeholders, but some approaches have proven successfulInternal structure

32、 of different Operating Systems can vary widelyStart by defining goals and specifications Affected by choice of hardware, type of systemUser goals and System goalsUser Goals operating system should be convenient to use, easy to learn, reliable, safe, and fastSystem Goals operating system should be e

33、asy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficientOperating System Design and Implementation (Cont.)Important principle to separate WHAT from HOWPolicy: What will be done? Mechanism: How to do it?The separation of policy from mechanism is a very importan

34、t principle, it allows maximum flexibility if policy decisions are to be changed laterExample: I need a searchable set (WHAT)Could be a hash table (HOW)Could be a binary search tree (HOW) Simple Structure MS-DOS Written to provide most functionality using least spaceNot divided into modulesKind of l

35、ike a big ball of mudAlthough MS-DOS has some structure, its interfaces and levels of functionality are not well separatedOriginally designed for the Intel 8088 architecture8088 had no dual-mode bit (kernel versus user modes)MS-DOS had no choice but to leave the base hardware accessible to applicati

36、on programsHuge implications for security and protectionMS-DOS Layer StructureLayered ApproachThe operating system is divided 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.With modularity,

37、 layers are selected such that each uses functions (operations) and services of only lower-level layersMakes testing and validation somewhat easierLayered Operating SystemWhat is the purpose of testing?To verify correctness?Nope. Thats just Americana and apple pie.Answer: To witness the existence of

38、 defects.A successful test case is one that reveals a defectNote: Testing is different than DebuggingSuccessful testing reveals the existence of defectsDebugging identifies and corrects the cause of defectsUNIXUNIX limited by hardware functionality, the original UNIX operating system had limited str

39、ucturing. The UNIX OS consists of two separable partsSystems programsThe kernelConsists of everything below the system-call interface and above the physical hardwareProvides the file system, CPU scheduling, memory management, and other operating-system functions; a large number of functions for one

40、levelUNIX System StructureMicrokernel System Structure Moves as much from the kernel into “user” spaceCommunication takes place between user modules using message passingBenefits:Easier to extend a microkernelEasier to port the operating system to new architecturesMore reliable (less code is running

41、 in kernel mode)More secureDetriments:Performance overhead of user space to kernel space communicationMac OS X StructureModulesMost modern operating systems implement kernel modulesUses object-oriented approachEach core component is separateEach talks to the others over known interfacesEach is loada

42、ble as needed within the kernelOverall, similar to layers but with more flexibleSolaris Modular ApproachVirtual MachinesA virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardwareA virtual machine can pro

43、vide an interface identical to the underlying bare hardwareThe operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memoryGreat for testing new code on different platformsVirtual Machines (Cont.)The resources of the physical computer

44、 are shared to create the virtual machinesCPU scheduling can create the appearance that users have their own processorSpooling and a file system can provide virtual card readers and virtual line printersA normal user time-sharing terminal serves as the virtual machine operators consoleVirtual Machin

45、es (Cont.) (a) Non-virtual machine (b) Virtual machineNon-virtual MachineVirtual MachineVirtual Machines (Cont.)The 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 dir

46、ect sharing of resources.A virtual-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.The virtual machine concept is difficult to imple

47、ment due to the effort required to provide an exact duplicate to the underlying machineVMware ArchitectureThe Java Virtual MachineOperating System GenerationOperating systems are designed to run on any of a class of machines; the system must be configured for each specific computer siteSYSGEN progra

48、m obtains information concerning the specific configuration of the hardware systemBooting starting a computer by loading the kernelBootstrap program code stored in ROM that is able to locate the kernel, load it into memory, and start its executionEnd of Chapter 2PPT(全名:PowerPoint)是美国微软公司出品的办公软件系列重要组

49、件之一(另外还有Excel、Word等);最常用的就是用来制作幻灯片。MicrosoftOfficePowerPoint是一种演示文稿图形程序,该软件是功能强大的演示文稿制作软件;可协助用户独自或联机创建永恒的视觉效果;它增强了多媒体支持功能,利用该软件制作的文稿,可以通过不同的方式播放,也可将演示文稿打印成一页一页的幻灯片,使用幻灯片机或投影仪播放,可以将演示文稿保存到光盘中以进行分发,并可在幻灯片放映过程中播放音频流或视项目列表; 新增项目; 修改项目; 删除项目; 项目授权; 项目任务统计; 项目资源管理; 项目进度管理; 项目任务包管理; 项目文档管理; 项目费用管理; 项目归档; 项

50、目查询; 当前任务; 项目统计分析。4. 库存管理掌握库存的动态流动状况,减少库存资金的占用,加强资金的合理使用。选择“库存管理”模块后,在主菜单下将出现库存资料维护、入库、出库、库存查询、仓库资料维护、业务类型维护、货物单位资料维护几个子菜单。左方出现“存货管理”模块的树状结构的库存分类信息。右边会出现库存列表,当没有选择库存分类的时候,库存资料列表将显示所有库存项目,按录入时间排序;在选择某个分类的时候,将显示该分类下的库存列表,库存列表会把当前的库存数量显示出来,点击某库存的链接将显示库存项目的详细信息。此模块包含以下主要功能:新增分类; 修改分类; 删除分类; 新增存货项目; 修改存货

51、资料; 删除存货资料; 库存查询; 入库登记; 出库登记; 查询存货收发记录; 仓库资料维护; 业务类型资料维护; 货物单位资料维护。=原文出自【比特网】,转载请保留原文链接:频流。对用户界面进行了改进并增强了对智能标记的支持,可以更加便捷地查看和创建高品质的演示文稿一套完整的PPT文件一般包含:片头动画、PPT封面、前言、目录、过渡页、图表页、图片页、文字页、封底、片尾动画等;所采用的素材有:文字、图片、图表、动画、声音、影片等;国际领先的PPT设计公司有:themegallery、poweredtemplates、presentationload等;近年来,中国的PPT应用水平逐步提高,应

52、用领域越来越广;PPT正成为人们工作生活的重要组成部分,在工作汇报、企业宣传、产品推介、婚礼庆典、项目竞标、管理咨询等领域。叙利亚内战局势急剧升级,国营电视台证实,国防部长拉杰哈今天在首都的一次自杀式袭击中被炸死,是叙利亚国内冲突爆发以来,政府军损失的最高级军方官员,另外,内政部长、情报首长也被炸伤。袭击者是总统巴沙尔的一名近身侍卫。叙利亚自由军和伊斯兰旅两个反政府组织都宣称对袭击负责,但否认事件是国营电视台所说的自杀式袭击,而是将fgdfgdfgdfgdgdfgdfgdfgdfgfhthhhfhh dhfdhdsfhgfhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

53、hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttthhhhhhhhhhhhhaaaaaaaaaaahhhhttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttthhhhhhhhhhhhhhhhhhhhhhhhhvvvvvvvvvvvvvvvvvvvvvv炸弹事先放在会议室内。事发后,叙利亚政府已经任命了原参谋长弗雷伊为新任国防部长。叙利亚国营

54、电视台新闻节目周三迅速公布了事件,称大马士革的国家安全部门遭到自杀袭击,当时内阁官员和军方高层正在开会,多名官员严重受伤,国防部长丧生。被炸死的叙利亚国防部长拉杰哈,本月九号才刚刚出席过,叙利亚防空部队的实弹演习,叙利亚电视台也在拉哈杰死后,马上播出他视察演习的画面。另外,总统巴沙尔的姐夫、副国防部长舒卡特,也在袭击中丧生。近几日以来,大马士革一直在爆发激烈战斗,冲突已经越来越接近总统巴沙尔的权力核心。有上载到网络的视频显示,在大马士革的苏塞村不断传出重型炮火声。又有段视频显示,逊尼派社区米丹发生战斗后,四处断壁残垣。此外,大马士革西部也据称有军营遇袭起火。连串冲突迫使近日大批叙民众,当中包括两名叙利亚将军,逃亡到邻国土耳其。另外,有上载到网络的视频显示,叙利亚自由军在北部阿扎兹训练。有自由军成员说,(自己)本来效忠巴沙尔部队,在政府军滥杀平民后变节50PPT(全名:PowerPoint)是美国微软公司出品的办公软件系列重要组件之一(另外还有Excel、Word等);最常用的就是用来制作幻灯片。MicrosoftOfficePowerPoint是一

温馨提示

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

评论

0/150

提交评论