《操作系统概念》第六版作业解答1-6章.ppt_第1页
《操作系统概念》第六版作业解答1-6章.ppt_第2页
《操作系统概念》第六版作业解答1-6章.ppt_第3页
《操作系统概念》第六版作业解答1-6章.ppt_第4页
《操作系统概念》第六版作业解答1-6章.ppt_第5页
已阅读5页,还剩30页未读 继续免费阅读

下载本文档

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

文档简介

1、Chapter 1,1.1 What are the three main purposes of an operating system? 环境提供者,为计算机用户提供一个环境,使得能够在计算机硬件上方便、高效的执行程序 资源分配者,为解决问题按需分配计算机的资源,资源分配需尽可能公平、高效 控制程序 监控用户程序的执行,防止出错和对计算机的不正当使用 管理I/O设备的运行和控制,1-cont.,1.3 What is the main advantage of multiprogramming? 高效地使用CPU,通过重叠来自不同用户对CPU和I/O设备的需求 增加CPU的利用,设法让CP

2、U执行有意义的指令,1-cont.,1.5 In a multiprogramming and time-sharing environment, several users share the system simultaneously. This situation can result in various security problems. a. What are two such problems? b. Can we ensure the same degree of security in a time-shared machine as we have in a dedica

3、ted machine? Explain your answer. 用户之间互相偷数据、代码 对系统资源使用的记账信息,1-cont.,1.6 Define the essential properties of the following types of operating systems: a. Batch 相似需求的Job分批、成组的在计算机上执行,Job由操作员或自动Job程序装置装载; 可以通过采用 buffering, off-line operation, spooling, multiprogramming 等技术使CPU 和 I/O不停忙来提高性能 批处理适合于需要极少用户

4、交互的Job。 b. Interactive 由许多短交易组成,下一次交易的结果可能不可预知 需要响应时间短,1-cont.,1.6 Define the essential properties of the following types of operating systems: c. Time sharing 使用CPU调度和多道程序提供对系统的经济交互式使用,CPU快速地在用户之间切换 一般从终端读取控制,输出立即打印到屏幕 d. Real time 在专门系统中使用,从传感器读取信息,必须在规定时间内作出响应以确保正确的执行,1-cont.,1.6 Define the essen

5、tial properties of the following types of operating systems: e. Network 在通用OS上添加 联网、通信功能 远程过程调用 文件共享 f. Distributed 具有联网、通信功能 提供远程过程调用 提供多处理机的统一调度调度 统一的存储管理 分布式文件系统,1-cont.,1.9 Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage o

6、f multiprocessor systems? Symmetric multiprocessing中所有处理器同等对待,I/O可以在任意CPU上处理。 Asymmetric multiprocessing具有一个主CPU和多个从CPU,主CPU将任务分派到从CPU,I/O通常只能由主CPU处理。 多处理机系统的优点 比多个计算机系统可能更省钱(同样CPU个数) 执行程序更快 可靠性更高 缺点:软硬件更复杂,Chapter 2,2.2 How does the distinction between monitor mode and user mode function as a rudim

7、entary form of protection (security) system? 通过建立一组只能在monitor mode才能执行的特权指令集,OS能够确保总是能控制整个系统。,2-cont.,2.3 What are the differences between a trap and an interrupt? What is the use of each function? An interrupt是硬件产生的系统内的流的改变 A trap是软件产生的“中断”。 interrupt可以被I/O用来产生完成的信号,从而避免CPU对设备的轮询 A trap可以用来调用OS的例程或

8、者捕获算术错误,2-cont.,2.5 Which of the following instructions should be privileged? a. Set value of timer. b. Read the clock. c. Clear memory. d. Turn off interrupts. e. Switch from user to monitor mode. a. Set value of timer. c. Clear memory. d. Turn off interrupts. e. Switch from user to monitor mode.,2

9、-cont.,2.8 Protecting the operating system is crucial to ensuring that the computer system operates correctly. Provision of this protection is the reason behind dual-mode operation, memory protection, and the timer. To allow maximum flexibility, however, we would also like to place minimal constrain

10、ts on the user. The following is a list of operations that are normally protected. What is the minimal set of instructions that must be protected? a. Change to user mode. b. Change to monitor mode. c. Read from monitor memory. d. Write into monitor memory. e. Fetch an instruction from monitor memory

11、. f. Turn on timer interrupt. g. Turn off timer interrupt. b. Change to monitor mode. c. Read from monitor memory. d. Write into monitor memory. g. Turn off timer interrupt.,Chapter 3,3.1 What are the five major activities of an operating system in regard to process management? 用户和系统进程地创建和删除 进程的挂起和恢

12、复 提供进程同步的机制 提供进程通信的机制 提供死锁处理的机制,3-cont.,3.2 What are the three major activities of an operating system in regard to memory management? 跟踪内存使用情况(哪一部分被使用、谁使用) 当内存空间可用的时候,确定将哪些进程调入内存(job调度) 按需要分配和回收内存,3-cont.,3.3 What are the three major activities of an operating system in regard to secondary-storage

13、management? 剩余空间的管理 存储分配 磁盘调度,3-cont.,3.4 What are the five major activities of an operating system in regard to file management? 文件创建和删除 目录创建和删除 目录和文件操作原语的支持 文件到二级存储的映射 将文件备份到非易失存储设备,3-cont.,3.5 What is the purpose of the command interpreter? Why is it usually separate from the kernel? 读取命令(从用户或者命令

14、文件)并执行(转化成系统调用) 可能会经常改变,3-cont.,3.7 What is the purpose of system calls? 让用户级进程可以请求操作系统所提供的服务,3-cont.,3.10 What is the purpose of system programs? 为程序开发和运行提供了方便的环境 给用户提供基本的公共功能函数,为用户在不用自己写代码的情况下解决公用问题 试着安装虚拟机VMWARE,然后在这台虚拟机上安装一个操作系统 阅读Linux源码,给出某一个system call的源码并分析,分析init/main.c给出流程图,Chapter 4,4.2 D

15、escribe the differences among short-term, medium-term, and long-term scheduling. Short-term,CPU调度 Long-term,job调度 Medium-term,分时系统中的中间调度级,4-cont.,4.4 Describe the actions a kernel takes to context switch between processes. 保存正在运行的进程的状态、恢复欲调度到CPU进程的状态,4-cont.,4.5 What are the benefits and detriments

16、of each of the following? Consider both the systems and the programmers levels. a. Symmetric and asymmetric communication b. Automatic and explicit buffering c. Send by copy and send by reference d. Fixed-sized and variable-sized messages,4-cont.,4.6 The correct producerconsumer algorithm in Section

17、 4.4 allows only n - 1 buffers to be full at any one time. Modify the algorithm to allow all buffers to be utilized fully.,4-cont.,4.7 Consider the interprocess-communication scheme where mailboxes are used. a. Suppose a process P wants to wait for two messages, one from mailbox A and one from mailb

18、ox B. What sequence of send and receive should it execute? b. What sequence of send and receive should P execute if P wants to wait for one message either from mailbox A or from mailbox B (or from both)? c. A receive operation makes a process wait until the mailbox is nonempty. Either devise a scheme that allows a proces

温馨提示

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

评论

0/150

提交评论