东南大学《操作系统》课程作业 第一章

1 - What are the three main purposes of an operating system?
① 操作系统是一个资源管理器,它管理计算机硬件;
② 操作系统为应用程序提供运行的基础;
③ 操作系统充当计算机用户和计算机硬件的中介。

2 - We have stressed the need for an operating system to make efficient use of the computing hardware. When is it appropriate for the operating system to forsake this principle and to “waste” resources? Why is such a system not really wasteful?
操作系统确实应该具有高效率性。但为了改善用户体验,可以将部分计算效率“浪费”用于其他目的。例如渲染复杂的图形界面(从Windows 98时代,到之后的Aero特效时代)显然消耗了更多的计算资源,但是使用户的感官体验更好。从这种意义上来说,这种“浪费”也是不浪费的。

3 - How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?
计算机硬件可以通过一个模式位来表示当前模式是内核模式还是用户模式。某些特权指令只有在内核模式下才允许进行,这样就起到了保护的作用。

4 - The issue of resource utilization shows up in different forms in different types of operating systems. List what resources must be managed carefully in the following settings:
a. Mainframe or minicomputer systems
b. Workstations connected to servers
c. Mobile computers

对于a,大型机或小型机,应该妥善管理CPU资源和内存资源,同时对于部分作为云服务器的大型机也要妥善管理网络带宽资源和存储资源。
对于b,与服务器相连的工作站,应该妥善管理CPU资源和内存资源,以及提供稳定的通信链路。
对于c,移动计算机,在妥善管理CPU资源和内存资源以提供流畅的使用体验以外,还要注意功耗的管理。

5 - Under what circumstances would a user be better off using a timesharing system than a PC or a single-user workstation?
当有多个用户同时使用一台物理机器时,分时系统能使得每个用户的任务都按切片被相对公平地尽快处理。而单用户系统可能造成用户独占现象。

6 - Describe the differences between symmetric and asymmetric multiprocessing. What are three advantages and one disadvantage of multiprocessor systems?

对称多处理系统所有处理器是对等的,之间没有主从关系;非对称多处理系统存在一个主处理器控制系统,其他处理器服从主处理器的调度。
多处理器系统拥有更高的吞吐量,更好的规模经济,更强的可靠性;但是在硬件架构和软件设计方面都更为复杂。

7 - Many SMP systems have different levels of caches; one level is local to each processing core, and another level is shared among all processing cores. Why are caching systems designed this way?
缓存是为了解决高速与低速之间交互的问题。缓存的层次越低,其速度越快,但成本也越高,故容量也越小。因此,多处理系统中每个处理器拥有一些较小较快的缓存,只有它们才能跟跟得上处理器的计算速度;同时有一个较大较快的缓存,用于在不同处理器之间共享数据。

8 - Consider an SMP system similar to the one shown in Figure 1.6. Illustrate with an example how data residing in memory could in fact have a different value in each of the local caches.

image

这实际上是一个分布式缓存一致性的问题。如果memory中有一个数据data=X,CPU0读取data并计算后得到data=Y存入自身cache,同时CPU1也读取data并计算后得到data=Z存入自身cache,此时发生了缓存不一致(脏读)。

原文地址:https://www.cnblogs.com/zxuuu/p/15628503.html