川大软件学院2011操作系统_期末A闭_2010-2011-2

一、单项选择题(本大题共11小题,每小题2分,共22分)提示:在每小题列出的四个备选项

中只有一个是符合题目要求的,请将其代码填写在下表中。错选、多选或未选均无分

1. As one proceeds down the memory hierarchy (i.e., from inboard memory to offline storage), the following condition(s) apply()

(A) Decreasing capacity

(B) Increasing access time

(C) Increasing cost per bit

(D) All of the above

2. The principle objective of a time sharing, multiprogramming system is to()

(A) Maximize response time

(B) Maximize processor use

(C) Provide exclusive access to hardware

(D) None of the above

3. There are a number of conditions that can lead to process termination, including()

(A) Normal completion

(B) Bounds violation

(C) Parent termination

(D) All of the above

4. Which of the following is true regarding the relationship between processes and threads()

(A) It takes less time to switch between two different processes than to switch between two threads within

the same process

(B) It takes far less time to create a new thread in an existing process than to create a new process

(C) It takes less time to terminate a process than a thread

(D) All of the above

5. In order to implement mutual exclusion on a critical resource for competing processes, only one program at a time should be allowed ( )

(A) T o perform message passing

(B) In the critical section of the program

(C) T o Exhibit cooperation

(D) None of the above

6. An example of a consumable resource is the following()

(A) Messages

(B) Printers

(C) Main Memory

(D) All of the above

7. In a system employing a segmentation scheme for memory management, wasted space is due to

()

(A) Internal fragmentation

(B) External fragmentation

(C) Segments of different sizes

(D) None of the above

8. The replacement policy that chooses only among the resident pages of the process that generated the page fault in selecting a page to replace is referred to as a()

(A) Global replacement policy

(B) Local replacement policy

(C) Variable replacement policy

(D) None of the above

9. Which of the following scheduling policies allow the O/S to interrupt the currently running process and move it to the Ready state?()

(A) First-come-first-served

(B) Non-Preemptive

(C) Preemptive

(D) None of the above

10. The following disk scheduling policy is useful as a benchmark against which to evaluate other disk

scheduling policies because it provides a worst-case scenario()

(A) FIFO scheduling

(B) Priority scheduling

(C) Random scheduling

(D) None of the above

11. In a tree-structured directory, the series of directory names that culminates in a file name is referred to as

the()

(A) Pathname

(B) Working directory

(C) Symbolic name

(D) None of the above

二、名词解释题(本大题共5小题,每小题3分,共15分)。提示:解释每小题所给名词的含义,若解释正确则给分,若解释错误则无分,若解释不准确或不全面,则酌情扣分。

1.Instruction cycle

2.Operating system

3.Process

4.Microkernel

5.Mutual exclusion

三、简答题(本大题共5小题,每小题5分,共25分)。

1.What are the three conditions that may lead to deadlock?

2.Describe the similarities and differences between fixed partitioning and paging.

3.Draw a figure to show the process of Address-Translation in virtual paging system. Show the TLB, one-level page table, M and Disk in this figure.

4.Describe the three kind of scheduling of process in operating system.

5.What delay elements are involved in a disk read or write?

四、问答题(本大题共3小题,共38分)。

1. The following code describes the Driver-Ticket seller Problem. The driver must wait until the ticket seller

close the door, and then drive the bus. And the ticket seller must wait until the driver stop the bus, and then open the door. Please synchronize the procedure by semaphore, and explain the reasons.(12分)

2. There is sequence of disk track requests: 97 76 85 36 162 120 155 35 175. Assume that the disk head

is initially positioned over track 100 and is moving in the direction of increasing track number. For FIFO/SSTF/SCAN/C-SCAN:

(1) What is the tracking order?

(2) What is average track length? (13分)

3. A process contains 8 virtual pages on disk and is assigned a fixed allocation of 4 page frames in main

memory. The following page trace occurs:

3,2,1,4,2,3,5,6,2,3,2,1,7,6,1,2,3,2,1,6

Compute number of page faults using the following replacement strategy and give the detail step of each replacement process.(13分)

(A) LRU replacement

Page fault number:

(B) FIFO replacement

Page fault number:

(C) OPT replacement

Page fault number:

相关文档
最新文档