
Silberschatz, Galvin and Gagne ©2018
Operating System Concepts
Chapter 4: Threads &
Concurrency

2
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Chapter 4: Threads
qOverview
qMulticore Programming
qMultithreading Models
qThread Libraries
qImplicit Threading
qThreading Issues
qOperating System Examples

3
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Objectives
qIdentify the basic components of a thread, and contrast threads and
processes
qDescribe the benefits and challenges of designing multithreaded
applications
qIllustrate different approaches to implicit threading including thread
pools, fork-join, and Grand Central Dispatch
qDescribe how the Windows and Linux operating systems represent
threads
qDesign multithreaded applications using the Pthreads, Java, and
Windows threading APIs

4
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Motivation
qMost modern applications are multithreaded
qThreads run within application
qMultiple tasks with the application can be implemented by separate
threads
oUpdate display
oFetch data
oSpell checking
oAnswer a network request
qProcess creation is heavy-weight while thread creation is light-weight
qCan simplify code, increase efficiency
qKernels are generally multithreaded

5
Operating System Concepts Silberschatz, Galvin and Gagne ©2018
Single and Multithreaded Processes

