Silberschatz 7 Chapter 1 Questions and Answers: Jas::/conversion/tmp/scratch/389117979
Silberschatz 7 Chapter 1 Questions and Answers: Jas::/conversion/tmp/scratch/389117979
1.2 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. Handheld computers
Answer: a. Mainframes: memory and CPU resources, storage, network
bandwidth. b. Workstations: memory and CPU resources c. Handheld computers:
power consumption, memory resources.
1.3 Under what circumstances would a user be better off using a timesharing
system rather than a PC or single-user workstation?
Answer: When there are few other users, the task is large, and the hardware is
fast, time-sharing makes sense. The full power of the system can be brought to
bear on the user’s problem. The problem can be solved faster than on a personal
computer. Another case occurs when lots of other users need resources at the
same time.
jas::/conversion/tmp/scratch/389117979.doc <(1)>
Silberschatz 7th Chapter 1 Questions and Answers
1.4 Which of the functionalities listed below need to be supported by the operating
system for the following two settings:
(a) handheld devices and (b) real-time systems.
Answer: Symmetric multiprocessing treats all processors as equals, and I/O can
be processed on any CPU.
Asymmetric multiprocessing has one master CPU and the remainder CPUs are
slaves. The master distributes tasks among the slaves, and I/O is usually done by
the master only.
Multiprocessors can save money by not duplicating power supplies, housings, and
peripherals. They can execute programs more quickly and can have increased
reliability. They are also more complex in both hardware and software than
uniprocessor systems.
jas::/conversion/tmp/scratch/389117979.doc <(2)>
Silberschatz 7th Chapter 1 Questions and Answers
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 (i.e. it may
request recipes) and as a server (it may provide recipes.)
1.9 How are network computers different from traditional personal computers?
1.10 What is the purpose of interrupts? What are the differences between a trap
and an interrupt? Can traps be generated intentionally by a user program? If so,
for what purpose?
jas::/conversion/tmp/scratch/389117979.doc <(3)>
Silberschatz 7th Chapter 1 Questions and Answers
obviate the need for device polling. A trap can be used to call operating system
routines or to catch arithmetic errors.
1.11 Direct memory access is used for high-speed I/O devices in order to avoid
increasing the CPU´s execution load. a. How does the CPU interface with the
device to coordinate the transfer?
b. How does the CPU know when the memory operations are complete?
c. The CPU is allowed to execute other programs while the DMA controller is
transferring data. Does this process interfere with the execution of the user
programs? If so, describe what forms of interference are caused.
Answer: The CPU can initiate a DMA operation by writing values into special
registers that can be independently accessed by the device. The device initiates
the corresponding operation once it receives a command from the CPU. When the
device is finished with its operation, it interrupts the CPU to indicate the
completion of the operation. Both the device and the CPU can be accessing
memory simultaneously. The memory controller provides access to the memory
bus in a fair manner to these two entities. A CPU might therefore be unable to
issue memory operations at peak speeds since it has to compete with the device in
order to obtain access to the memory bus.
Answer: An operating system for a machine of this type would need to remain in
control (or monitor mode) at all times. This could be accomplished by two
methods:
a. Software interpretation of all user programs (like some BASIC, Java, and LISP
systems, for example). The software interpreter would provide, in software, what
the hardware does not provide.
b. Require meant that all programs be written in high-level languages so that all
object code is compiler-produced. The compiler would generate (either in-line or
by function calls) the protection checks that the hardware is missing.
1.13 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?
Answer: Caches are useful when two or more components need to exchange
data, and the components perform transfers at differing speeds. Caches solve the
transfer problem by providing a buffer of intermediate speed between the
jas::/conversion/tmp/scratch/389117979.doc <(4)>
Silberschatz 7th Chapter 1 Questions and Answers
components. If the fast device finds the data it needs in the cache, it need not
wait for the slower device. The data in the cache must be kept consistent with the
data in the components. If a component has a data value change, and the datum
is also in the cache, the cache must also be updated. This is especially a problem
on multiprocessor systems where more than one process may be accessing a
datum. a component may be eliminated by an equal-sized cache, but only if: (a)
the cache and the component have equivalent state-saving capacity (that is, if the
component retains its data when electricity is removed, the cache must retain data
as well), and (b) the cache is affordable, because faster storage tends to be more
expensive.
1.14 Discuss, with examples, how the problem of maintaining coherence of cached
data manifests itself in the following processing environments: a. Single-processor
systems b. Multiprocessor systems c. Distributed systems
Answer: The processor could keep track of what locations are associated with
each process and limit access to locations that are outside of a program’s extent.
Information regarding the extent of a program’s memory could be maintained by
using base and limits registers and by performing a check for every memory
access.
1.16 What network configuration would best suit the following environments?
Answer:
a. A dormitory floor A LAN.
b. A university campus A LAN, possible a WAN for very large campuses.
c. A state AWAN.
d. A nation A WAN.
1.17 Define the essential properties of the following types of operating systems:
a. Batch b. Interactive c. Time sharing d. Real time e. Network f. Parallel g.
Distributed h. Clustered i. Handheld
Answer: a. Batch. Jobs with similar needs are batched together and run through
the computer as a group by an operator or automatic job sequencer. Performance
is increased by attempting to keep CPU and I/O devices busy at all times through
jas::/conversion/tmp/scratch/389117979.doc <(5)>
Silberschatz 7th Chapter 1 Questions and Answers
buffering, off-line operation, spooling, and multiprogramming. Batch is good for
executing large jobs that need little interaction; it can be submitted and picked up
later.
d. Real time. Often used in a dedicated application, this system reads information
from sensors and must respond within a fixed amount of time to ensure correct
performance.
f. SMP. Used in systems where there are multiple CPU’s each running the same
copy of the operating system. Communication takes place across the system bus.
Answer: Handheld computers are much smaller than traditional desktop PC’s.
This results in smaller memory, smaller screens, and slower processing capabilities
than a standard desktop PC. Because of these limitations, most handhelds
currently can perform only basic tasks such as calendars, email, and simple word
processing. However, due to their small size, they are quite portable and, when
they are equipped with wireless access, can provide remote access to electronic
mail and the World Wide Web.
jas::/conversion/tmp/scratch/389117979.doc <(6)>