1. 首页
  2. 文档大全

操作系统精髓与设计原理

上传者:ta****u 2022-07-11 23:17:34上传 DOC文件 324KB
操作系统精髓与设计原理_第1页 操作系统精髓与设计原理_第2页 操作系统精髓与设计原理_第3页

《操作系统精髓与设计原理》由会员分享,可在线阅读,更多相关《操作系统精髓与设计原理(31页珍藏版)》请在文档大全上搜索。

1、Chapter 2Operating Sy stemOverviewReview Questi onsConvenience: An operating system makes a computer more convenient to use. Efficiency: An operating system allows the computer system resources to be used in an efficie nt manner. Ability to evolve: An opera ting system should be con structed in such

2、 a way as to perm 让 the effective developme nt, test ing, and in troductio n of new system fun cti ons without in terferi ng with service.2.5 The executi on con text, or process state, is the internal data by which the operat ing system is able to supervise and con trol the process - This internal i

3、n formati on is separated from the process, because the operat ing system has in formati on not permit ted to the process. The con text in cludes all of the in formati on that the operati ng system n eeds to man age the process and that the processor n eeds to execute the process properl y. The con

4、text in cludes the contents of the various processor registers, such as the program coun ter and data registers .It also in cludes in formati on of use to the operating system, such as the prior 让 y of the process and whether the process is wagi ng for the completi on of a particular I/O eve nt.Prob

5、lems(ii) The answers are the same for (a) and (b). Assume that although processor operatio ns cannot overlap, I/O operati ons can.1 Job:TAT=NTProcessor utilizati on=50%2 Jobs:TAT=NTProcessor utilizati on=100%4 Jobs:TAT=(2N 1)NTProcessor utilizati on=100%A system call is used by an applicati on progr

6、am to in voke a fun cti on provided by the operati ng syste m. Typically, the system call results in tran sfer to a system program that runs in kernel mode.Review Questions3-5 Swapping involves moving part or all of a process from main memory to disk. When none of the processes in main memory is in

7、the Ready state, the operating system swaps one of the blocked processes out onto disk into a suspend queue, so that another process may be brought into main memory to execute.3-10 The user mode has restrictions on the instructions that can be executed and the memory areas that can be accessed. This

8、 is to protect the operating system from damage or alteration. In kernel mode, the operating system does not have these restrictions, so that 让 can perform 让 s tasks.Problems3-1 ? Creation and deletion of both user and system processes. Theprocesses in the system can execute concurrently for informa

9、tion sharing, computation speedup, modularity, and convenience. Concurrent execution requires a mechanism for process creation and deletion. The required resources are given to the process when让 iscreated, or allocated to it while 让 is running. When the process terminates, the OS needs to reclaim an

10、y reusable resources.? Suspension and resumption of processes. In process scheduling, the OS needs to change the process's state to wa 让 ing or ready state when 让 is waiting for some resources- When the required resources are available, OS needs to change its state to running state to resume its

11、 execution.? Provision of mechanism for process synchronization.Cooperatingprocesses may share data. Concurrent access to shared data may result in data inconsistency. OS has to provide mechanisms for processes synchronization to ensure the orderly execution of cooperating processes, so that data co


文档来源:https://www.renrendoc.com/paper/212700536.html

文档标签:

下载地址