CH 1
CH 1
1
Introduction
Practice Exercises
1.1 What are the three main purposes of an operating system?
1.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?
1.3 What is the main difficulty that a programmer must overcome in writing
an operating system for a real-time environment?
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.
1.5 How does the distinction between kernel mode and user mode function
as a rudimentary form of protection (security)?
1.6 Which of the following instructions should be privileged?
a. Set value of timer.
b. Read the clock.
c. Clear memory.
d. Issue a trap instruction.
e. Turn off interrupts.
f. Modify entries in device-status table.
g. Switch from user to kernel mode.
h. Access I/O device.
1.7 Some early computers protected the operating system by placing it in
a memory partition that could not be modified by either the user job or
3
4 Chapter 1 Introduction
the operating system itself. Describe two difficulties that you think could
arise with such a scheme.
1.8 Some CPUs provide for more than two modes of operation. What are two
possible uses of these multiple modes?
1.9 Timers could be used to compute the current time. Provide a short
description of how this could be accomplished.
1.10 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?
1.11 Distinguish between the client–server and peer-to-peer models of dis-
tributed systems.