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 Document Right 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 Document Right 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 z Identifying parallelism (dividing activities) z Load balance z Data splitting z Data dependency z 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 Document Right 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: z create/destroy threads; z message passing or data sharing between threads; z scheduling threads; z 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: z Thread switching z Application-specific scheduling z No need of special support from OS ± Disadvantages: z One blocking system call in a user-level thread blocks all threads in the same process z No advantage from multiprocessing
Background image of page 6
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Kernel-Level Threads ± All work done in the kernel
Background image of page 7

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

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

{[ snackBarMessage ]}

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