Practice Exercises: Answer
Practice Exercises: Answer
Practice Exercises: Answer
CHAPTER
Introduction
Practice Exercises
1.1 What are the three main purposes of an operating system?
Answer:
The three main puropses are:
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?
Answer:
Single-user systems should maximize use of the system for the user. A
GUI might “waste” CPU cycles, but it optimizes the user’s interaction
with the system.
1.3 What is the main difficulty that a programmer must overcome in writing
an operating system for a real-time environment?
Answer:
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. Therefore when writing an operating system for a real-time
system, the writer must be sure that his scheduling schemes don’t allow
response time to exceed the time constraint.
1
2 Chapter 1 Introduction
retain data as well), and (b) the cache is affordable, because faster storage
tends to be more expensive.
1.11 Distinguish between the client–server and peer-to-peer models of
distributed systems.
Answer:
The client-server model firmly distinguishes the roles of the client and
server. Under this model, the client requests services that are provided
by the server. The peer-to-peer model doesn’t have such strict roles. In
fact, all nodes in the system are considered peers and thus may act as
either clients or servers—or both. A node may request a service from
another peer, or the node may in fact provide such a service to other
peers in the system.
For example, let’s consider a system of nodes that share cooking
recipes. Under the client-server model, all recipes are stored with the
server. If a client wishes to access a recipe, it must request the recipe from
the specified server. Using the peer-to-peer model, a peer node could ask
other peer nodes for the specified recipe. The node (or perhaps nodes)
with the requested recipe could provide it to the requesting node. Notice
how each peer may act as both a client (it may request recipes) and as a
server (it may provide recipes).