陈力操作系统

上传人:千****8 文档编号:118679117 上传时间:2019-12-22 格式:DOC 页数:5 大小:31.50KB
返回 下载 相关 举报
陈力操作系统_第1页
第1页 / 共5页
陈力操作系统_第2页
第2页 / 共5页
陈力操作系统_第3页
第3页 / 共5页
陈力操作系统_第4页
第4页 / 共5页
陈力操作系统_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

《陈力操作系统》由会员分享,可在线阅读,更多相关《陈力操作系统(5页珍藏版)》请在金锄头文库上搜索。

1、考的可能性极大1.1What are the three main purposes of an operating system?1 To provide an environment for a computer user to execute programs on computerhardware in a convenient and efcient manner.2 To allocate the separate resources of the computer as needed to solve the problemgiven. The allocation proces

2、s should be as fair and efcient as possible.3 As a control program it serves two major functions: (1) supervision of the execution ofuser programs to prevent errors and improper use of the computer, and (2) manage-ment of the operation and control of I/O devices.l 环境提供者,为计算机用户提供一个环境,使得能够在计算机硬件上方便、高效

3、的执行程序l 资源分配者,为解决问题按需分配计算机的资源,资源分配需尽可能公平、高效l 控制程序监控用户程序的执行,防止出错和对计算机的不正当使用管理I/O设备的运行和控制2.3 What are the differences between a trap and an interrupt? What is the use of each function?Answer: An interrupt is a hardware-generated change-of-ow within the system. Aninterrupt handler is summoned to deal wi

4、th the cause of the interrupt; control is then re-turned to the interrupted context and instruction. A trap is a software-generated interruptAn interrupt can be used to signal the completion of an I/O to obviate the need for devicepolling. A trap can be used to call operating system routines or to c

5、atch arithmetic errors.An interrupt是硬件产生的系统内的流的改变A trap是软件产生的“中断”。interrupt可以被I/O用来产生完成的信号,从而避免CPU对设备的轮询 A trap可以用来调用OS的例程或者捕获算术错误 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 monito

6、r mode.Answer: The following instructions should be privileged:a. Set value of timer.C. clear memory.D.Turn off interrupts.可能会考1.2 List the four steps that are necessary to run a programon a completely dedicatedmachine.Answer: Generally, operating systems for batch systems have simplerrequirements t

7、han for personal computers. Batch systems do not haveto be concerned with interacting with a user as much as a personalcomputer. As a result, an operating system for a PC must beconcernedwith response time for an interactive user. Batch systems do not havesuch requirements. A pure batch system also

8、may have not to handletime sharing,whereas an operating systemmust switch rapidly betweendifferent jobs.1.6 Define the essential properties of the following types of operating systems:a. Batchb. Interactivec. Time sharingd. Real timee. Networkf. Distributeda. Batch相似需求的Job分批、成组的在计算机上执行,Job由操作员或自动Job

9、程序装置装载;可以通过采用 buffering, off-line operation, spooling, multiprogramming 等技术使CPU 和 I/O不停忙来提高性能批处理适合于需要极少用户交互的Job。b. Interactive由许多短交易组成,下一次交易的结果可能不可预知需要响应时间短c. Time sharing使用CPU调度和多道程序提供对系统的经济交互式使用,CPU快速地在用户之间切换一般从终端读取控制,输出立即打印到屏幕d. Real time在专门系统中使用,从传感器读取信息,必须在规定时间内作出响应以确保正确的执行e. Network在通用OS上添加联网、

10、通信功能远程过程调用文件共享f. Distributed具有联网、通信功能提供远程过程调用提供多处理机的统一调度调度统一的存储管理分布式文件系统1.7 We have stressed the need for an operating system to make efficient use of the computinghardware. When is it appropriate for the operating system to forsake this principle and to“waste” resources? Why is such a system not re

11、ally wasteful?Answer: Single-user systems should maximize use of the system for the user. A GUImight “waste” CPU cycles, but it optimizes the users interaction with the system.2.2 Howdoes the distinction betweenmonitormode and usermode function as a rudimentaryform of protection (security) system?An

12、swer: By establishing a set of privileged instructions that can be executed only whenin the monitor mode, the operating system is assured of controlling the entire system at allTimes.通过建立一组只能在monitor mode才能执行的特权指令集,OS能够确保总是能控制整个系统。3.7 What is the purpose of system calls?Answer: System calls allow us

13、er-level processes to request services of the operating sysTem.让用户级进程可以请求操作系统所提供的服务3.10 What is the purpose of system programs?Answer: System programs can be thought of as bundles of useful system calls. Theyprovide basic functionality to users and so users do not need to write their own programsto

14、solve common problems.为程序开发和运行提供了方便的环境给用户提供基本的公共功能函数,为用户在不用自己写代码的情况下解决公用问题5.1 Provide two programming examples of multithreading giving improve performance overa single-threaded solution.Answer: (1) A Web server that services each request in a separate thread. (2) A paral-lelized application such as

15、 matrix multiplication where different parts of the matrix maybe worked on in parallel. (3) An interactive GUI program such as a debugger where athread is used to monitor user input, another thread represents the running application,Andat thirdthreadmonitorsperformance.可以并发的多任务Web浏览器,数据可并行处理5.3 What are two differences between user-level threads and kernel-level threads? Underwhatcircumstances is one type better than the other?Answer: (1) 内核可知与不可知User-level threads are unknown by the kernel, whereas the kernel is awareof kernel threads. (2) 调度者不同User threads are schedul

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 中考

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号