Home CS439

CS439: Principles of Computer Systems

Discussion Section Problem Set 10 Solutions

Due in Section on Friday, November 21, 2025

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.

  1. 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.

  2. Sun's network file system (NFS) protocol provides reliability via:
    • at-most-once semantics
    • at-least-once semantics
    • two-phase commit
    • transactions

  3. 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?

  4. Considering all the pieces of the operating system we have discussed, describe the steps the OS takes when performing a context switch. Assume that processes are waiting in the ready queue.

  5. In class, we have discussed many methods to get reliability from unreliable parts. Name and describe two.

  6. In a distributed system there are 3 processes on different machines communicating over the network. The orderings of each event on each process are given below. Determine what the Lamport clocks of each event are.
    • Process A:
      1. Send message PA1 to Process C
      2. Receive message PB1 from process B
      3. Receive message PC1 from process C
      4. Send message PA2 to Process B
      5. Send message PA3 to Process C
      6. Generic notable event
    • Process B:
      1. Send message PB1 to process A
      2. Receive message PC2 from process C
      3. Receive message PA2 from process A
    • Process C:
      1. Generic notable event
      2. Receive message PA1 from process A
      3. Send message PC1 to Process A
      4. Send message PC2 to Process B
      5. Generic notable event
      6. Receive message PA3 from process A
  7. Using the previous question answer the following questions
    • Does event 5 on process C happen before event 5 on process A?
    • Does event 5 on process C Lamport clock less than that of event 5 on process A?
    • Is it possible to use Lamport clocks to determine if a happens before relationship exists between events?
  8. What is the web browser you use, and what is its default search engine?

    Some potental answers. I would hope if someone uses a web browser outside of this list they know the diffrence between a web browser and a search engine. And of course no need to say all of the web browsers, the top 4 are probally the only ones used.

    1. Google Chrome: Google
    2. Firefox: Google
    3. Safari: Google
    4. Microsoft Edge: Bing
    5. Brave Browser: Brave Search
    6. Chromium: Google
    7. Arc Browser: Google
    8. Opera: Google
    9. Konqueror: Duck Duck Go
    10. Falkon: Duck Duck Go