Description
- (0 points) Answer the questions given in Lecture 3, slide 19.
- (10 points) In this problem you are to compare reading a file using a single-threaded file server and a multithreaded server. It takes 15 msec to get a request for work, dispatch it, and do the rest of the necessary processing, assuming that the data needed are in a cache in main memory. If a disk operation is needed, as is the case one-third of the time, an additional 75 msec is required, during which time the thread sleeps.
- How many requests/sec can the server handle if it is single threaded?
- If it is multithreaded?
- (10 points) Would it make sense to limit the number of threads in a server process?
- (10 points) Consider a process P that requires access to file F which is locally available on the machine where P is currently running. When P moves to another machine, it still requires access to F. If the file-to-machine binding is fixed, how could the systemwide reference to F be implemented?
- (10 points) List all the components of a program state that are shared across threads in a multithreaded process.
- (10 points) Explain the tradeoffs between using multiple processes and using multiple threads.
- (10 points) Does a multi-threading solution always improve performance? Please explain your answer and give reasons.
- (10 points) Explain the tradeoffs between preemptive scheduling and non-preemptive scheduling.
- (10 points) What are two differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other?
- (10 points) What is the difference between a process and a thread. Which one consumes more resources?
- (10 points) The X protocol suffers from scalability problems. How can these problems
be tackled? - (0 points) Read textbook Chapter 1, 2, and 3.