当前位置:首页 >> 理学 >>

计算机科学导论原书第二版答案第七章


CHAPTER 7

Operating Systems
(Solutions to Practice Set)

Review Questions
1. An operating system is a program that facilitates the execution of application programs. 2. Components of an operating systems are user interface, memory manager, process manager, device manager, and file manager. 3. In monoprogramming, only a single program is in memory at any time. In multiprogramming, several programs are in memory at a time, but the resources of the computer are only assigned to the program that is running. 4. In partitioning, memory is divided into variable-length sections, each of which holds one complete program. In paging, memory is divided into much smaller fixed-length sections as is the program itself; the program does not have to be contiguous in memory. 5. In regular paging the entire program must be in memory at the same time in order for the program to execute. With demand paging, only some pages of a program can be in memory. This means that, in demand paging, more programs can use the computer's resources at any given time. 6. A program is a non-active set of instructions stored on a disk and does not become a job until it is selected for execution. A job is a program that is scheduled for execution and does not become a process until it actually gets loaded into memory and starts executing. 7. A process resides, at least in part, in main memory. Programs and jobs reside on a disk. 8. The job scheduler moves a job from the hold state to the ready state or from the running state to the terminated state. The process scheduler moves a process from one state to another. 9. An operating system needs to use queues because there can be many jobs and processes active at the same time. In order to share all of the resources, queues are
1

2

necessary to make sure that jobs and processes all get access to the resources that they need. 10. Deadlock happens when processes are all waiting for resources held by other processes: they are all waiting for each other. This happens when the operating system does not put resource restrictions on processes. Starvation happens when the operating system puts too many resource restrictions on a process. If a process must wait until it can get all of the resources that it needs before it starts to execute, it may never start.

Multiple-Choice Questions
11. 17. 23. 29. a a a d 12. 18. 24. 30. a a d c 13. b 19. d 25. a 14. c 20. c 26. b 15. a 21. c 27. d 16. a 22. c 28. a

Exercises
31. 64 ? 4 = 60 MB. 32. 64 ? (10 + 4) = 50 MB. 33. 70 / (70 + 10) × 100 = 87.5%. 34. Figure S7.34 shows the partitions and memory used by each program. Figure S7.34 Exercise 34
10 MB 12 MB 18 MB 20 MB Second (8 MB) Third (10.5 MB) First (17 MB) 1 MB wasted Fourth (20 MB)

2 MB wasted 1.5 MB wasted

Total memory used = 17 + 8 + 10.5 + 20 = 55.5 MB. Total memory wasted = 2 + 1.5 +1 = 4.5 MB. Percent memory wasted = 4.5 / 60 × 100 = 7.5%. 35. Figure S7.35 shows the partitions and memory used by each program. The total memory wasted = 2 + 8 + 10 = 20 MB. Memory wasted = 40 / 60 × 100 = 33.3 percent. The total memory used = 10 + 10 + 10 + 10 = 40 MB.

3

Figure S7.35 Exercise 35
10 MB 12 MB 18 MB 20 MB Second program (10 MB) Third program (10 MB) First program (10 MB) 8 MB wasted Fourth program (10 MB) 10 MB wasted 2 MB wasted

36. a. b. c. d. e. f. 37. 38. a. b. c. d. e. running ready ready waiting waiting 13 / 4 = 3.25 → 4 pages. 12 / 4 = 3 pages. 27 / 4 = 6.75 → 7 pages. 15 ? (4 + 3 + 7) = 1 frame. Not considering memory lost inside each frame, one frame (4 MB) is unused. (4 / 60) × 100 = 6.66%.

Total memory = 1000 + 100 = 1100 MB. Number of program = 1100 / 10 = 110.

39. This is a deadlock situation (see Figure S7.39) because all four conditions of deadlock (mutual exclusion, resource holding, no preemption, and circular waiting) are all present. Figure S7.39 Exercise 39
File1 Is assigned to File2

A

Has requested

Has requested File3

Is assigned to

B
Is assigned to Has requested

C

4

40. This is not a deadlock situation (see Figure S7.40) because one of the necessary condition (circular waiting) is not present. Figure S7.40 Exercise 40
File3 Is assigned to File2

C

Has requested

Is assigned to File1

A

Is assigned to

Has requested

B


相关文章:
计算机科学导论原书第二版答案第七章.pdf
计算机科学导论原书第二版答案第七章 - CHAPTER 7 Operating
计算机科学导论原书第二版答案第二章.pdf
计算机科学导论原书第二版答案第 - CHAPTER 2 Number Sys
《计算机科学导论》第七章答案(包含讨论题).doc
计算机科学导论第七章答案(包含讨论题) - 一、选择题 15 DACBD
计算机科学导论原书第二版答案第十一章.pdf
计算机科学导论原书第二版答案第十一章 - CHAPTER 11 Data Str
计算机科学导论原书第二版答案第十二章.pdf
计算机科学导论原书第二版答案第十二章 - CHAPTER 12 Abstract
计算机科学导论原书第二版答案第十四章.pdf
计算机科学导论原书第二版答案第十四章 - CHAPTER 14 Database
计算机科学导论原书第二版答案第十六章.pdf
计算机科学导论原书第二版答案第十六章 - CHAPTER 16 Security
计算机科学导论 第七章 操作系统_图文.ppt
计算机科学导论 第七章 操作系统 - 第七章 操作系统 ?7.1 引言(操作系统定义 ) ?7.2 演化(操作系统...
计算机科学导论习题答案.pdf
计算机科学导论习题答案_IT/计算机_专业资料。计算机科学导论习题答案 原书第二版 英文 CHAPTER 1 Introduction (Solutions to Practice Set) Review Questions 1. ...
计算机导论课后习题答案.doc
计算机导论课后习题答案 - 计算机科学导论 第七章 1 应用程序和操作系统的不同点是什么? 操作系统是一个程序,有利于应用程序的执行。 2 操作系统的组成是什么? ...
大学计算机基础课课本计算机科学导论课后答案.doc
自己综合汇总的计算机科学导论第二版课后答案 ...45.a 46.b 47.a 48.a 第七章 操作系统 1. ...(4)定义方法 6 见导论书 165 页 7 见导论书 ...
计算机科学导论习题答案.doc
计算机科学导论习题答案_工学_高等教育_教育专区。...45.a 46.b 47.a 48.a 第七章 操作系统 1. ...(4)定义方法 6 见导论书 165 页 7 见导论书 ...
第七章计算机导论_图文.ppt
Linux和Window 计算机科学导论 G.jx@BUCT 2012 2 7.1 引言 计算机科学导论 G.jx@BUCT 2012 3 操作系统是计算机硬件和用户 (程序和人)的接口,它使得其他程序 ...
计算机科学导论(董荣胜)7.ppt
关键词:计算机科学导论思想与董荣胜高等教育出版社 1...第七章 社会与职业问题
计算机科学导论 (第二版 清华大学出版社)第12章 社会和....doc
计算机科学导论 (第二版 清华大学出版社)第12章 社会和职业问题(答案)_工学_高等教育_教育专区。第二版 清华大学出版社 第12 章 社会和职业问题习题(答案) ...
南开18秋学期(1709、1803、1809)《计算机科学导论》在线作业(第二....doc
南开18秋学期(1709、1803、1809)《计算机科学导论》在线作业(第二版) - www.vu8o.com ---...
计算机科学导论(机械工业出版社)刘艺 瞿高峰 习题答案.doc
第二点:而且,并没 以下答案为查阅多方资料做的,...45.a 46.b 47.a 48.a 第七章 操作系统 1. ...计算机科学导论(机械工业出版社)刘艺 瞿高峰 习题...
计算机科学导论(机械工业出版社)刘艺_瞿高峰_习题答案.doc
习题答案 第一章 1. 和计算机相关的问题. 2. 冯...45.a 46.b 47.a 48.a 第七章 操作系统 1. ...(4)定义方法 6 见导论书 165 页 7 见导论书 ...
计算机科学导论_图文.ppt
计算机科学导论本课程以通俗、易懂的语言讲述较为全...第二章 电脑硬件与产业从冯 诺依曼到蓝色巨人人类...知识系统 第七章:未来之路本章重点: 本章主要介绍...
计算机科学导论 第一章 绪论_图文.ppt
计算机科学导论 第一章 绪论_电脑基础知识_IT/...参考书 ? 计算机科学概论(原书第3版)(Computer ...