計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)2英
《計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)2英》由會(huì)員分享,可在線閱讀,更多相關(guān)《計(jì)算機(jī)系統(tǒng)結(jié)構(gòu)2英(47頁(yè)珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。
1、Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Callsn System Programsn System Structure n Virtual Machinesn System Design and Implementation Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Callsn System Programs
2、n System Structure n Virtual Machinesn System Design and Implementation Common System Componentsn Process Managementn Main Memory Managementn Secondary-Storage Managementn I/O System Managementn File Managementn Protection System n Networkingn Command-Interpreter System Process Managementn A process
3、 is a program in execution. A process needs certain resources, including CPU time, memory, files, and I/O devices, to accomplish its task.n The operating system is responsible for the following activities in connection with process management. 在同進(jìn)程管理有關(guān)的活動(dòng)中,操作系統(tǒng)負(fù)責(zé)下列事務(wù) n Process creation and deletion.
4、 n process suspension and resumption. n Provision of mechanisms for n process synchronizationn process communication Main-Memory Managementn Memory 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.n Main me
5、mory is a volatile storage device. It loses its contents in the case of system failure.n The operating system is responsible for the following activities in connections with memory management: n Keep track of which parts of memory are currently being used and by whom.n Decide which processes to load
6、 when memory space becomes available.n Allocate and deallocate memory space as needed. Secondary-Storage Managementn Since 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 memo
7、ry. n Most modern computer systems use disks as the principle on-line storage medium, for both programs and data. n The operating system is responsible for the following activities in connection with disk management nFree space managementnStorage allocationnDisk scheduling I/O System Managementn The
8、 I/O system consists of:nA buffer-caching systemnA general device-driver interfacenDrivers for specific hardware devices File Managementn A file is a collection of related information defined by its creator. Commonly, files represent programs (both source and object forms) and data. n The operating
9、system is responsible for the following activities in connections with file management:n File creation and deletion. n Directory creation and deletion. n Support of primitives原語(yǔ) for manipulating files and directories.n Mapping files onto secondary storage. n File backup on stable (nonvolatile) stora
10、ge media. Protection Systemn Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources.n The protection mechanism mustn distinguish between authorized and unauthorized usage. n specify the controls to be imposed. n provide a means of e
11、nforcement. Networking (Distributed Systems)n A distributed system is a collection processors that do not share memory or a clock. Each processor has its own local memory.n The processors in the system are connected through a communication network.n A distributed system provides user access to vario
12、us system resources. n Access to a shared resource allows:n Computation speed-up 加速運(yùn)算n Increased data availability 提高數(shù)據(jù)利用性n Enhanced reliability 增強(qiáng)可靠性 Command-Interpreter Systemn Many commands are given to the operating system by control statements which deal with: n process creation and managementn
13、 I/O handlingn secondary-storage management n main-memory managementn file-system accessn protectionn networking Command-Interpreter System (Cont.)n The program that reads and interprets control statements is called variously: n control-card interpreter n command-line interpreter n shell (in UNIX) I
14、ts function is to get and execute the next command statement. Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Callsn System Programsn System Structure n Virtual Machinesn System Design and Implementation Operating System Servicesn Program execution system
15、capability to load a program into memory and to run it. n I/O operations since user programs cannot execute I/O operations directly, the operating system must provide some means to perform I/O.n File-system manipulation program capability to read, write, create, and delete files. n Communications ex
16、change 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. n Error detection ensure correct computing by detecting errors in the CPU and memory hardware, in I/O devices, or in use
17、r programs. Additional 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 track of and record which us
18、ers 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. System Callsn System calls provide the interface between a running program and the operating system.n Generally availa
19、ble as assembly-language instructions.n Languages defined to replace assembly language for systems programming allow system calls to be made directly n Three general methods are used to pass parameters between a running program and the operating system. n Pass parameters in registers. n Store the pa
20、rameters in a table in memory, and the table address is passed as a parameter in a register. n Push (store) the parameters onto the stack by the program, and pop off the stack by operating system. Passing of Parameters As A Table 表格方式的參數(shù)傳遞 Chapter 3 Operating-System Structuresn System Componentsn Op
21、erating System Servicesn System Callsn System Programsn System Structure n Virtual Machinesn System Design and Implementation System Calls (Cont.)n Process controln File managementn Device managementn Information maintenancen Communications System Call process controln end, abortn load, executen cre
22、ate process, terminate processn get process attributes, set process attributesn wait for timen wait event, signal event n Allocate and free memory MS-DOS ExecutionAt System Start-up系統(tǒng)啟動(dòng)Running a Program運(yùn)行程序 UNIX Running Multiple Programs System Call file managementn create file, delete filen open, c
23、losen read, write, repositionn get file attributes, set file attributes System Call device managementn request device, release devicen read, write, repositionn get device attributes, set device attributesn logically attach or detach devices System Call information managementn get time or date, set t
24、ime or daten get system data, set system datan get process, file, or device attributesn set process, file, or device attributes System Call communicationsn create, delete communication connectionn send, receive messagesn transfer status informationn attach or detach remote devices Communication Mode
25、lsMsg Passing Shared Memory Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Callsn System Programsn System Structure n Virtual Machinesn System Design and Implementation System Programsn System programs provide a convenient environment for program developm
26、ent and execution. They can be divided into:n File manipulationn Status information n File modificationn Programming language supportn Program loading and executionn Communicationsn Application programs Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Calls
27、n System Programsn System Structure n Virtual Machinesn System Design and Implementation System Structure Layered Approachn The 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 u
28、ser interface.n With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers. An Operating System Layer Layered Structure of the THE OSn A layered design was first used in THE operating system.Its six layers are as follows:layer 5: user prog
29、rams layer 4: buffering for input and outputlayer 3: operator-console device driverlayer 2: memory managementlayer 1: CPU schedulinglayer 0: hardware MicrokernelsWindows NT Client-Server Structure Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Callsn Syst
30、em Programsn System Structure n Virtual Machinesn System Design and Implementation Virtual Machinesn A 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é)果n A virtual machine provides a
31、n interface identical to the underlying bare hardware.n The operating system creates the illusion of multiple processes, each executing on its own processor with its own (virtual) memory. 操作系統(tǒng)創(chuàng)建了多個(gè)進(jìn)程,每個(gè)進(jìn)程在其處理器和(虛擬)內(nèi)存執(zhí)行 Virtual Machines (Cont.)n The resources of the physical computer are shared to cr
32、eate the virtual machines.n CPU scheduling can create the appearance that users have their own processor. n Spooling and a file system can provide virtual card readers and virtual line printers. n A normal user time-sharing terminal serves as the virtual machine operators console. 普通用戶終端成為虛擬機(jī)操作員的控制臺(tái)
33、 System ModelsNon-virtual Machine Virtual Machine Advantages/Disadvantages of Virtual Machinesn The virtual-machine concept provides complete protection of system resources since each virtual machine is isolated from all other virtual machines. n A virtual-machine system is a perfect vehicle for ope
34、rating-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. n The virtual machine concept is difficult to implement due to the effort required to provide an exact duplicate to the underl
35、ying machine. The Java Virtual Machine Java .class File on Cross Platforms跨平臺(tái)的Java .class文件 Java Development Environment Chapter 3 Operating-System Structuresn System Componentsn Operating System Servicesn System Callsn System Programsn System Structure n Virtual Machinesn System Design and Implemen
36、tation System Design Goalsn User goals operating system should be convenient to use, easy to learn, reliable, safe, and fast. n System goals operating system should be easy to design, implement, and maintain, as well as flexible, reliable, error-free, and efficient. Mechanisms and Policiesn Mechanis
37、ms determine how to do something, policies decide what will be done. 機(jī)制確定怎樣做,策略決定要做什么n The separation of policy from mechanism is a very important principle, it allows maximum flexibility if policy decisions are to be changed later. System Implementationn Traditionally written in assembly language,
38、operating systems can now be written in higher-level languages.n Code written in a high-level language:n can be written faster. n is more compact. n is easier to understand and debug. n An operating system is far easier to port (move to some other hardware) if it is written in a high-level language. Homeworkn P83 n 3.5n 3.7n 3.13n 3.15
- 溫馨提示:
1: 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 植樹(shù)問(wèn)題課件PPT
- 實(shí)驗(yàn)九蕨類(lèi)植物觀察和解剖
- 護(hù)理禮儀講解
- 初中物理_液體的壓強(qiáng)課件
- 武漢市【人教部編版】2019年秋語(yǔ)文一年級(jí)上冊(cè):統(tǒng)編版一年級(jí)上冊(cè)語(yǔ)文期末總復(fù)習(xí)資料課件
- 護(hù)士管理法律制度
- 核心肌群的功能和訓(xùn)練方式
- 在尋找野敗的日子里-PPT
- 安全培訓(xùn)遠(yuǎn)離大貨車(chē)
- 《10000以內(nèi)數(shù)的認(rèn)識(shí)(例5、例6)》教學(xué)課件-PPT
- 思達(dá)心臟醫(yī)院心血管病峰會(huì)邀請(qǐng)函
- 臨藥咳嗽和咳痰呼吸困難
- 用友通財(cái)務(wù)培訓(xùn)教程
- 頭頂球與運(yùn)球技術(shù)動(dòng)作分析
- 新城幼兒園中班科學(xué)有趣的石頭課件