Computer Systems

Tutorial: IP control, processes, multithreading

IP control protocols

  1. Explain how a forwarding table for multicast would differ from a forwarding table for unicast.
  1. Finding an optimal multicast routing tree is NP-hard. (a) Does that mean that multicast requires a lot of processing per packet? Why or why not?
  1. Why is an ARP query sent within a broadcast frame? Why is an ARP response sent within a frame with a specific destination MAC address?
  1. Suppose you walk into a room, connect to Ethernet (a layer-2 network), and want to download a Web page. What are all the protocol steps that take place, starting from powering on your PC to getting the Web page? Assume there is nothing in your DNS or browser caches when you power on your PC. (Hint: the steps include the use of DHCP, ARP, DNS, TCP, and HTTP protocols.) Explicitly indicate in your steps how you obtain the IP and MAC addresses of a gateway router.
  1. You have just explained the ARP protocol to a friend. When you are all done, he says: “I’ve got it. ARP provides a service to the network layer, so it is part of the data link layer.” What do you say to him?
  1. When the IPv6 protocol is introduced, does the ARP protocol have to be changed? If so, are the changes conceptual or technical?
  1. How is ICMP used? Give examples from the lecture slides, plus any you find on the web.

Process management and multithreading

  1. What is the difference between kernel and user mode? Explain how having two distinct modes aids in designing an operating system.
  1. What is a purpose of a system call in an operating system?
  1. To a programmer, a system call looks like any other call to a library procedure. Is it important that a programmer knows which library procedures result in system calls? Under what circumstances and why?
  1. What is the biggest advantage of implementing threads in user space? What is the biggest disadvantage?
  1. In the lectures, a multi-threaded text editor was shown. If the only way to read from a file is the normal blocking read system call, do you think user-level threads or kernel-level threads are being used for the text editor? Why?
  1. Consider designing a server for a Website where requests for pages come in and the requested page is sent back to the client. At most Websites, some pages are more commonly accessed than other pages. For example, a home page is accessed far more than a page deeper in the tree structure of the Website. Web servers use this fact to improve performance by maintaining a collection of heavily requested pages in main memory to eliminate the need to go to disk to get them. Such a collection is called a cache and provides much faster access to data than disk (we will learn more about caches in the upcoming lectures). One possibility is to have the server operate as a single thread: The main loop of the Web server gets a request, examines it, and carries it out to completion before getting the next one. While waiting for the disk, the server is idle and does not process any other incoming requests. What problems does this solution have? Design a multi-threaded server to improve over a single-threaded design.

Edit this page.