4-sol - CHAPTER 4 Threads Practice Exercises 4.1 Provide...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
4 CHAPTER Threads Practice Exercises 4.1 Provide two programming examples in which multithreading provides better performance than a single-threaded solution. Answer: (1) A Web server that services each request in a separate thread. 2) (A parallelized application such as matrix multiplication where (dif- ferent parts of the matrix may be worked on in parallel. (3) An (interac- tive GUI program such as a debugger where a thread is used (to monitor user input, another thread represents the running (application, and a thirdthreadmonitorsperformance. 4.2 What are two differences between user-level threads and kernel-level threads? Under what circumstances is one type better than the other? Answer: (1) User-level threads are unknown by the kernel, whereas the kernel is aware of kernel threads. (2) On systems using either M:1 or M:N mapping, user threads are scheduled by the thread library and the kernel schedules kernel threads. (3) Kernel threads need not be associated with a process whereas every user thread belongs to a process. Kernel threads
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This homework help was uploaded on 04/05/2008 for the course CSCE 4000 taught by Professor Anonymous during the Spring '08 term at Arkansas.

Page1 / 2

4-sol - CHAPTER 4 Threads Practice Exercises 4.1 Provide...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online