lec06-threads - Lecture 6: Threads Chapter 4 Operating...

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

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Lecture 6: Threads Chapter 4
Background image of page 1

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

View Full DocumentRight Arrow Icon
3.2 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Single and Multithreaded Processes
Background image of page 2
3.3 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multithreaded Server Architecture Benefits of multi-threaded programming:  Responsiveness Resource sharing Economy (Solaris example: 30X > expensive to create a process, 5X  > expensive to context-switch processes) Scalability 
Background image of page 3

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

View Full DocumentRight Arrow Icon
3.4 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Multicore Programming Each core seen by the OS as a separate processor Challenges in programming for multicore systems Identifying parallelism (dividing activities) Load balance Data splitting Data dependency Testing and debugging
Background image of page 4
3.5 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition User- vs. Kernel-level Threads From W. Stallings, Operating Systems, 6 th  Edition
Background image of page 5

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

View Full DocumentRight Arrow Icon
3.6 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition User vs. Kernel-level Threads User-level threads : Thread management done by user-level threads library: create/destroy threads; message passing or data sharing between threads; scheduling threads; saving/restoring threads contexts. Kernel not aware of the existence of threads: sees only the process Three primary thread libraries: POSIX Pthreads; Win32 threads; Java threads Advantages over kernel-level threads: Thread switching Application-specific scheduling No need of special support from OS Disadvantages: One blocking system call in a user-level thread blocks all threads in the same process No advantage from multiprocessing
Background image of page 6
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th
Background image of page 7

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

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

This note was uploaded on 02/17/2012 for the course COP 6611 taught by Professor Staff during the Spring '08 term at University of South Florida - Tampa.

Page1 / 21

lec06-threads - Lecture 6: Threads Chapter 4 Operating...

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

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