CS439: Principles of Computer Systems
Discussion Section 9 Problem Set
Due in Section on Friday, April 19, 2024
The problem set must be completed before section and brought to section. To
ensure that your problem set is turned in correctly and that you receive credit
for discussion section, you must follow these guidelines exactly.
-
In some operating systems, I/O from/to disk is done directly to/from a
buffer in the user program's memory. The user program does a system
call specifying the address and length of the buffer (the length must
be a multiple of the disk record size).
The disk controller needs a physical memory address not a virtual
address. Your co-worker proposes that when the user does a write
system call, the operating system should check that the user's virtual
address is valid, translate it into a physical address, and pass that
address and the length (also checked for validity) to the disk
hardware.
This won't quite work. In no more than two sentences,
what did your co-worker forget?
-
Explain the steps that an operating system goes through when the
CPU receives an interrupt.
-
In class, we covered the idea of remote procedure calls. Name four
difficulties that may be encountered when one attempts to implement
a remote procedure call.
There are
additional complications when the procedure executes a system
call. What are the complications and how might you fix them?
Adapted from Tanenbaum page 607.
-
In two-phase commit, suppose the master fails after writing
``GLOBAL_COMMIT'' to disk and sending ``GLOBAL_COMMIT'' to all
participating nodes but before any of the nodes receive this
message. Suppose that the ``GLOBAL_COMMIT'' message reaches i of
the n participants and that the participants implement a protocol
in which they communicate with one another when they suspect the
primary has died. What is the minimum number of participants that
must receive the ``GLOBAL_COMMIT'' message to allow the
participants to complete the transaction without waiting for the
master to recover?
-
Sun's network file system (NFS) protocol provides reliability via:
- at-most-once semantics
- at-least-once semantics
- two-phase commit
- transactions
-
In class, we have discussed many methods to get reliability from
unreliable parts. Name and describe two.
|