Wiley-Interscience, 2006. — 465 p. — ISBN10: 0471725048, ISBN13: 978-0471725046.
Modern Multithreading is a textbook and professional reference on concurrent programming. The book describes fundamental concepts and the various concurrency constructs supported by operating systems and programming languages. Covering semaphores, locks, monitors, and message passing, the book emphasizes using these constructs to solve concurrent programming problems, an addressing testing and debugging issues that must be dealt with by every concurrent programmer.
Содержание:
Introduction to Concurrent Programming.Processes and Threads: An Operating System’s View.
Advantages of Multithreading.
Threads in Java.
Threads in Win32.
Pthreads.
C++ Thread Class.
C++ Class Thread for Win32.
C++ Class Thread for Pthreads.
Thread Communication.
Nondeterministic Execution Behavior.
Atomic Actions.
Testing and Debugging Multithreaded Programs.
Problems and Issues.
Class TDThread for Testing and Debugging.
Tracing and Replaying Executions with Class Template sharedVariable.
Thread Synchronization.
The Critical Section Problem.Software Solutions to the Two-Thread Critical Section Problem.
Incorrect Solution 1.
Incorrect Solution 2.
Incorrect Solution 3.
Peterson’s Algorithm.
Using the volatile Modifier.
Ticket-Based Solutions to the n-Thread Critical Section Problem.
Ticket Algorithm.
Bakery Algorithm.
Hardware Solutions to the n-Thread Critical Section Problem.
Partial Solution.
Complete Solution.
Note on Busy-Waiting.
Deadlock, Livelock, and Starvation.
Deadlock.
Livelock.
Starvation.
Tracing and Replay for Shared Variables.
ReadWrite-Sequences.
Alternative Definition of ReadWrite-Sequences.
Tracing and Replaying ReadWrite-Sequences.
Class Template sharedVariable.
Putting It All Together.
Note on Shared Memory Consistency.