版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
1、Chapter 3 Operating-System StructuresSystem ComponentsOperating System ServicesSystem CallsSystem ProgramsSystem StructureVirtual MachinesSystem Design and Implementation1Chapter 3 Operating-System StructuresSystem ComponentsOperating System ServicesSystem CallsSystem ProgramsSystem StructureVirtual
2、 MachinesSystem Design and Implementation2Common System ComponentsProcess ManagementMain Memory ManagementSecondary-Storage ManagementI/O System ManagementProtection SystemNetworkingCommand-Interpreter System3Process ManagementA process is a program in execution. A process needs certain resources, i
3、ncluding CPU time, memory, files, and I/O devices, to accomplish its task.The operating system is responsible for the following activities in connection with process management. 在同進(jìn)程管理有關(guān)的活動中,操作系統(tǒng)負(fù)責(zé)下列事務(wù)Process creation and deletion. process suspension and resumption. Provision of mechanisms for proce
4、ss synchronizationprocess communication4Main-Memory ManagementMemory is a large 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.Main memory is a volatile storage device. It loses its contents in the case of system fa
5、ilure.The operating system is responsible for the following activities in connections with memory management:Keep track of which parts of memory are currently being used and by whom.Decide which processes to load when memory space becomes available.Allocate and deallocate memory space as needed.5Sec
6、ondary-Storage ManagementSince 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. Most modern computer systems use disks as the principle on-line storage medium, for both
7、 programs and data. The operating system is responsible for the following activities in connection with disk managementFree space managementStorage allocationDisk scheduling6I/O System ManagementThe I/O system consists of:A buffer-caching systemA general device-driver interfaceDrivers for specific h
8、ardware devices7A a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. The operating system is responsible for the following activities in connections with : and deletion. Directory creation and deletion. Support of p
9、rimitives原語 for manipulating files and directories.Mapping files onto secondary storage. on stable (nonvolatile) storage media.8Protection SystemProtection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources.The protection mechanism mustdis
10、tinguish between authorized and unauthorized usage. specify the controls to be imposed. provide a means of enforcement. 9Networking (Distributed Systems)A distributed system is a collection processors that do not share memory or a clock. Each processor has its own local memory.The processors in the
11、system are connected through a communication network.A distributed system provides user access to various system resources.Access to a shared resource allows:Computation speed-up 加速運算Increased data availability 提高數(shù)據(jù)利用性Enhanced reliability 增強(qiáng)可靠性10Command-Interpreter SystemMany commands are given to t
12、he operating system by control statements which deal with: process creation and managementI/O handlingsecondary-storage managementmain-memory management accessprotectionnetworking11Command-Interpreter System (Cont.)The program that reads and interprets control statements is called variously: control
13、-card interpreter command-line interpreter shell (in UNIX) Its function is to get and execute the next command statement. 12Chapter 3 Operating-System StructuresSystem ComponentsOperating System ServicesSystem CallsSystem ProgramsSystem StructureVirtual MachinesSystem Design and Implementation13Oper
14、ating System ServicesProgram execution system capability to load a program into memory and to run it. I/O operations since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O. manipulation program capability to read, write, create, and de
15、lete files. Communications exchange of information between processes executing either on the same computer or on different systems tied together by a network. Implemented via shared memory or message passing. Error detection ensure correct computing by detecting errors in the CPU and memory hardware
16、, in I/O devices, or in user programs. 14Additional Operating System Functions Additional functions exist not for helping the 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
17、 track of and record which users use how much and what kinds of computer resources for account billing or for accumulating usage statistics.Protection ensuring that all access to system resources is controlled.15System CallsSystem calls provide the interface between a running program and the operati
18、ng system.Generally available as assembly-language instructions.Languages defined to replace assembly language for systems programming allow system calls to be made directly Three general methods are used to pass parameters between a running program and the operating system.Pass parameters in regist
19、ers. Store the parameters in a table in memory, and the table address is passed as a parameter in a register. Push (store) the parameters onto the stack by the program, and pop off the stack by operating system. 16Passing of Parameters As A Table 表格方式的參數(shù)傳遞17Chapter 3 Operating-System StructuresSyste
20、m ComponentsOperating System ServicesSystem CallsSystem ProgramsSystem StructureVirtual MachinesSystem Design and Implementation18System Calls (Cont.)Process controlDevice managementInformation maintenanceCommunications19System Call process controlend, abortload, executecreate process, terminate pro
21、cessget process attributes, set process attributeswait for timewait event, signal eventAllocate and free memory20MS-DOS ExecutionAt System Start-up系統(tǒng)啟動Running a Program運行程序21UNIX Running Multiple Programs22System Call create file, delete fileopen, closeread, write, repositionget , set 23System Call
22、device managementrequest device, release deviceread, write, repositionget device attributes, set device attributeslogically attach or detach devices24System Call information managementget time or date, set time or dateget system data, set system dataget process, file, or device attributesset process
23、, file, or device attributes25System Call communicationscreate, delete communication connectionsend, receive messagestransfer status informationattach or detach remote devices26Communication ModelsMsg Passing Shared Memory 27Chapter 3 Operating-System StructuresSystem ComponentsOperating System Serv
24、icesSystem CallsSystem ProgramsSystem StructureVirtual MachinesSystem Design and Implementation28System ProgramsSystem programs provide a convenient environment for program development and execution. They can be divided into:Status informationProgramming language supportProgram loading and execution
25、CommunicationsApplication programs29Chapter 3 Operating-System StructuresSystem ComponentsOperating System ServicesSystem CallsSystem ProgramsSystem StructureVirtual MachinesSystem Design and Implementation30System Structure Layered ApproachThe operating system is divided into a number of layers (le
26、vels), 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, layers are selected such that each uses functions (operations) and services of only lower-level layers. 31An Operating System Layer32Layered Structure o
27、f the THE OSA layered design was first used in THE operating system.Its six layers are as follows:33MicrokernelsWindows NT Client-Server Structure34Chapter 3 Operating-System StructuresSystem ComponentsOperating System ServicesSystem CallsSystem ProgramsSystem StructureVirtual MachinesSystem Design
28、and Implementation35Virtual MachinesA virtual machine takes the layered approach to its logical conclusion. It treats hardware and the operating system kernel as though they were all hardware. 虛擬機(jī)是層次化的邏輯結(jié)果A virtual machine provides an interface identical to the underlying bare hardware.The operating
29、 system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory. 操作系統(tǒng)創(chuàng)建了多個進(jìn)程,每個進(jìn)程在其處理器和(虛擬)內(nèi)存執(zhí)行36Virtual Machines (Cont.)The resources of the physical computer are shared to create the virtual machines.CPU scheduling can create the appearance tha
30、t users have their own processor. Spooling and a can provide virtual card readers and virtual line printers. A normal user time-sharing terminal serves as the virtual machine operators console. 普通用戶終端成為虛擬機(jī)操作員的控制臺37System ModelsNon-virtual Machine Virtual Machine 38Advantages/Disadvantages of Virtual
31、 MachinesThe virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. A virtual-machine system is a perfect vehicle for operating-systems research and development. System development is done on the virtual machin
32、e, instead of on a physical machine and so does not disrupt normal system operation. The virtual machine concept is difficult to implement due to the effort required to provide an exact duplicate to the underlying machine. 39The Java Virtual Machine40Java .class Cross Platforms跨平臺的Java .class文件41Java Development Environment42Chapter
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 化學(xué)氧化工安全檢查能力考核試卷含答案
- 醋酸乙烯和乙烯共聚物裝置操作工常識水平考核試卷含答案
- 氣動元件制造工崗前實踐理論考核試卷含答案
- 硬質(zhì)合金混合料鑒定下料工發(fā)展趨勢測試考核試卷含答案
- 梁式窯石灰煅燒工持續(xù)改進(jìn)水平考核試卷含答案
- 親屬結(jié)婚的請假條
- 2025年網(wǎng)安系統(tǒng)合作協(xié)議書
- 2025年轉(zhuǎn)子式海流計項目發(fā)展計劃
- 2025年碳二餾份加氫催化劑項目合作計劃書
- 2025年箱、包及類似容器項目合作計劃書
- 別人買房子給我合同范本
- 電力通信培訓(xùn)課件
- 鋼結(jié)構(gòu)防護(hù)棚工程施工方案
- 中建三局2024年項目經(jīng)理思維導(dǎo)圖
- 中國藥物性肝損傷診治指南(2024年版)解讀
- 基層黨建知識測試題及答案
- DG-TJ08-2021-2025 干混砌筑砂漿抗壓強(qiáng)度現(xiàn)場檢測技術(shù)標(biāo)準(zhǔn)
- 鼻竇炎的護(hù)理講課課件
- 腸系膜脂膜炎CT診斷
- 體外膜肺氧合技術(shù)ECMO培訓(xùn)課件
- 老年醫(yī)院重點??平ㄔO(shè)方案
評論
0/150
提交評論