操作系统复习题

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1.1 What are the three main purposes of an operating system?

1.3 What is the main advantage of multiprogramming?

1.4What are the main differences between operating systems for mainframe computers and personal computers?

1.6 Define the essential properties of the following types of operating systems:

a.Batch

b.Interactive

c.Time sharing

d.Real time

work

f.Distributed

2.2 How does the distinction between monitor mode and user mode function as a rudimentary (基本的)form of protection (security) system?

2.3 What are the differences between a trap and an interrupt? What is the use of each function? 2.4 For what types of operations is DMA useful? Explain your answer.

2.9 Give two reasons why caches are useful. What problems do they solve? What problems do they cause? If a cache can be made as large as the device for which it is caching (for instance, a cache as large as a disk), why not make it that large and eliminate the device?

3.1 What are the five major activities of an operating system in regard to process management? 3.2 What are the three major activities of an operating system in regard to memory management?

3.3What are the three major activities of an operating system in regard to secondary-storage management?

3.4 What are the five major activities of an operating system in regard to file management?

3.5 What is the purpose of the command interpreter? Why is it usually separate from the kernel?

3.7 What is the purpose of system calls?

3.11 What is the main advantage of the layered approach to system design?

3.12 What are the main advantages of the microkernel approach to system design?

4.2 Describe the differences among short-term, medium-term, and long-term scheduling.

4.4 Describe the actions a kernel takes to context switch between processes.

5.1 Provide two programming examples of multithreading giving improved performance over a single-threaded solution.

5.2 Provide two programming examples of multithreading that would not improve performance over a single-threaded solution.

5.3What are two differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?

5.6 What resources are used when a thread is created? How do they differ from those used when a process is created?

6.1 A CPU scheduling algorithm determines an order for the execution of its scheduled processes.

Given n processes to be scheduled on one processor, how many possible different schedules are there? Give a formula in terms of n.

6.2Define the difference between preemptive and nonpreemptive scheduling. State why strict nonpreemptive scheduling is unlikely to be used in a computer center.

6.3Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:

Process Burst Time Priority

P110 3

P2 1 1

P3 2 3

P4 1 4

P5 5 2

The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.

a. Draw four Gantt charts illustrating the execution of these processes using FCFS, SJF,a nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum = 1) scheduling.

b. What is the turnaround time of each process for each of the scheduling algorithms in part a?

c. What is the waiting time of each process for each of the scheduling algorithms in part a?

d. Which of the schedules in part a results in the minimal average waiting time (over all processes)?

6.4 Suppose that the following processes arrive for execution at the times indicated. Each process will run the listed amount of time. In answering the questions, use nonpreemptive scheduling and base all decisions on the information you have at the time the decision must be made.

Process Arrival Time Burst Time

P10.0 8

P20.4 4

P3 1.0 1

a.What is the average turnaround time for these processes with the FCFS scheduling algorithm?

b.What is the average turnaround time for these processes with the SJF scheduling algorithm?

c.The SJF algorithm is supposed to improve performance, but notice that we chose to run

process P1 at time 0 because we did not know that two shorter processes would arrive soon.

Compute what the average turnaround time will be if the CPU is left idle for the first 1 unit and then SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase. This algorithm could be known as future-knowledge scheduling.

Remember that turnaround time is finishing time minus arrival time, so you have to subtract the arrival times to compute the turnaround times. FCFS is 11 if you forget to subtract arrival time. 6.6What advantage is there in having different time-quantum sizes on different levels of a multilevel queueing system?

6.10Explain the differences in the degree to which the following scheduling algorithms discriminate in favor of short processes:

a. FCFS

b. RR

c. Multilevel feedback queues

相关文档
最新文档