Second Quiz of Operating System 2004/12/20 – 12/21 Class: 3A and 3B 1. Provide one programming example of multithreading that improves performance over a single-threaded solution? (2%) Ans: Any one of the following is ok: ± A Web server that services each request in a separate thread. ± A parallelized application such as matrix multiplication where different parts of the matrix may be worked in parallel. ± An interactive GUI program such as a debugger where a thread is used to monitor user input, another thread represents the running application, and a third thread monitors performance. 2. What are two differences between user-level threads and kernel-level threads? (4%) Ans: (a) User-level threads are unknown by the kernel, whereas the kernel is aware of kernel threads. (b) User-level threads are scheduled by the thread library and the kernel schedules kernel-level threads. 3. What is the functionality of a stub in RPC? (2%) (3A) Ans: (a) Marshall / Un-marshall parameters. (b)
This is the end of the preview. Sign up
access the rest of the document.