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

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

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
计算机科学导论原书第二版答案第十一章.pdf
计算机科学导论原书第二版答案第十一章 - CHAPTER 11 Data Str
《计算机科学导论》第七章答案(包含讨论题).doc
计算机科学导论第七章答案(包含讨论题) - 一、选择题 15 DACBD
计算机科学导论原书第二版答案第十四章.pdf
计算机科学导论原书第二版答案第十四章 - CHAPTER 14 Database
计算机科学导论第2版答案.doc
第1章 概述习题(答案) 一.选择题 1. D 6. A 2. B 7. B 3. CD 8...计算机科学导论原书第二... 7页 1下载券 计算机科学导论第13章参... ...
计算机科学导论第二版答案.doc
计算机科学导论第二版答案 - 计算机科学导论第二版答案 【篇一:计算机科学导论习题答案】 题(答案) 一.选择题 1. d2. b3. cd 4. c5. abc 6. a7. b8...
计算机科学导论习题答案.pdf
计算机科学导论习题答案_IT/计算机_专业资料。计算机科学导论习题答案 原书第二版 英文 CHAPTER 1 Introduction (Solutions to Practice Set) Review Questions 1. ...
计算机科学导论 第七章 操作系统_图文.ppt
计算机科学导论 第七章 操作系统 - 第七章 操作系统 ?7.1 引言(操作系统定义 ) ?7.2 演化(操作系统的发展) ?7.3 操作系统的组成部分 ?7.4 主流操作...
计算机导论课后习题答案.doc
计算机导论课后习题答案 - 计算机科学导论 第七章 1 应用程序和操作系统的不同点是什么? 操作系统是一个程序,有利于应用程序的执行。 2 操作系统的组成是什么? ...
计算机科学导论(董荣胜)7.ppt
计算机科学导论:思想与方法 董荣胜 高等教育出版社计算机科学导论:思想与方法 董荣胜 高等教育出版社隐藏>> 第七章 社会与职业问题作为未来的实际工作者,计算学科的学...
计算机科学导论(机械工业出版社)刘艺 瞿高峰 习题答案.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 见导论书 ...
计算机科学导论习题答案.doc
计算机科学导论习题答案_工学_高等教育_教育专区。...45.a 46.b 47.a 48.a 第七章 操作系统 1. ...(4)定义方法 6 见导论书 165 页 7 见导论书 ...
计算机科学导论 第一章 绪论_图文.ppt
计算机科学导论 第一章 绪论_电脑基础知识_IT/...参考书 ? 计算机科学概论(原书第3版)(Computer ...(第九章) 软件工程(第十章) 操作系统(第七章) ...
计算机科学导论大作业.doc
计算机科学导论大作业_工学_高等教育_教育专区。大一...搜索的重要性不言而喻,而且极有可能造就第二个 ...第七章移动互联的局限屏幕太小这:它很难或根本不...
计算机科学导论CS10致远学院-上海交通大学.doc
计算机科学导论CS10致远学院-上海交通大学_计算机软件...第七章 数论(Nu
计算机科学导论教学大纲(2009).doc
二、 课程教学的基本内容、要求及学时分配 第一章:计算机概论和发展史 2 学...七、 教材及教参,中外文核心期刊名称 1)教材 《计算机科学导论》 (第 2 版)...
样题1答案.doc
计算机科学导 计算机科学导论样题 1 答案填空题( 一...方法, 以及社会与职业问题分别列为第二第七章。...(How the Brain Learns)一书 中指出: 复杂度和...
计算机科学导论-致远学院-上海交通大学.doc
计算机科学导论-致远学院-上海交通大学_计算机软件及...第七章 图论(Grap