| |
| |
Preface | |
| |
| |
| |
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 | |
| |
| |
| |
Thread Communication | |
| |
| |
| |
Testing and Debugging Multithreaded Programs | |
| |
| |
| |
Thread Synchronization | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
| |
The Critical Section Problem | |
| |
| |
| |
Software Solutions to the Two-Thread Critical Section Problem | |
| |
| |
| |
Ticket-Based Solutions to the n-Thread Critical Section Problem | |
| |
| |
| |
Hardware Solutions to the n-Thread Critical Section Problem | |
| |
| |
| |
Deadlock, Livelock, and Starvation | |
| |
| |
| |
Tracing and Replay for Shared Variables | |
| |
| |
| |
.6 Note on Shared Memory Consistency | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
| |
Semaphores and Locks | |
| |
| |
| |
Counting Semaphores | |
| |
| |
| |
Using Semaphores | |
| |
| |
| |
Binary Semaphores and Locks | |
| |
| |
| |
Implementing Semaphores | |
| |
| |
| |
Semaphore-Based Solutions to Concurrent Programming Problems. | |
| |
| |
| |
Semaphores and Locks in Java | |
| |
| |
| |
Semaphores and Locks in Win32 | |
| |
| |
| |
.6 Example: C++/Win32 Bounded Buffer | |
| |
| |
| |
Semaphores and Locks in Pthreads | |
| |
| |
| |
Another Note on Shared Memory Consistency | |
| |
| |
| |
Tracing, Testing, and Replay for Semaphores and Locks | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
| |
Monitors | |
| |
| |
| |
Definition of Monitors | |
| |
| |
| |
Monitor-Based Solutions to Concurrent Programming Problems | |
| |
| |
| |
Monitors in Java | |
| |
| |
| |
Monitors in Pthreads | |
| |
| |
| |
Signaling Disciplines | |
| |
| |
| |
Using Semaphores to Implement Monitors | |
| |
| |
| |
Monitor Toolbox for Java | |
| |
| |
| |
Monitor Toolbox for Win32/C++/Pthreads | |
| |
| |
| |
Nested Monitor Calls | |
| |
| |
| |
Tracing and Replay for Monitors | |
| |
| |
| |
Testing Monitor-Based Programs | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
| |
Message Passing | |
| |
| |
| |
Channel Objects | |
| |
| |
| |
Rendezvous | |
| |
| |
| |
Selective Wait | |
| |
| |
| |
Message-Based Solutions to Concurrent Programming Problems | |
| |
| |
| |
Tracing, Testing, and Replay for Message-Passing Programs | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
| |
Message Passing in Distributed Programs | |
| |
| |
| |
TCP Sockets | |
| |
| |
| |
Timestamps and Event Ordering | |
| |
| |
| |
Message-Based Solutions to Distributed Programming Problems | |
| |
| |
| |
Testing and Debugging Distributed Programs | |
| |
| |
Programs | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
| |
Testing and Debugging Concurrent Programs | |
| |
| |
| |
Synchronization Sequences of Concurrent Programs | |
| |
| |
| |
Paths of Concurrent Programs | |
| |
| |
| |
Definitions of Correctness and Faults for Concurrent Programs | |
| |
| |
| |
Approaches to Testing Concurrent Programs | |
| |
| |
| |
Reachability Testing | |
| |
| |
Further Reading | |
| |
| |
References | |
| |
| |
Exercises | |
| |
| |
Index | |