操作系统Operating System Concepts上机作业1
1.1 What are the three main purposes of an operating system?操作系统的三个主要功能是?
-execute user programs and make solving user problems easier
-make the computer system convenient to use
-use the computer hardware in an efficient manner
1.3 What is the main difficulty that a programmer must overcome in writing an operating system for a real-time environment?程序员在写一个实时操作系统的时候遇到的最大的困难是什么?
The main difficulty is keeping the operating system within the fixed time constraints of a real-time system. If the system does not complete a task in a certain time frame, it may cause a breakdown of the entire system it is running.
保证其硬实时性。
1.4 Keeping in mind the various definitions of operating system, consider whether the operating system should include applications such as web browsers and mail programs. Argue both that it should and that it should not, and support your answers.思考下操作系统的定义,想一下操作系统中是否应该包含像浏览器和有邮箱软件这样的应用。
Ad:
it is likely to be better able to take advantage of features in the kernel and therefore have performance advantages over an application that runs outside of the kernel.
Dis:
(1) the applications are applications - and not part of an operating system, (2) any performance benefits of running within the kernel are offset by security vulnerabilities, (3) it leads to a bloated operating system.
如果把邮箱和浏览器这些软件集成到操作系统中去,这样会给用户带来便利,可以直接使用这些软件而不需要安装。更好地利用在内核的性能优势。但是与此同时操作系统占的内存就会比较大,可能会有安全问题。
1.5 How does the distinction between kernel mode and user mode function as a rudimentary form of protection (security) system?
Some instruction can only be excuted when the CPU is in kernel mode.While limited capabilities in user mode force the protection of critical resources.
一些指令只有CPU在内核态时才能被执行。CPU在用户态时,一些指令是有限制的,从而达到对临界区资源的保护。