This is a book about multi-threaded programming - it could well be subtitled 'How to write computer programs tllat do lots of different tlrings all at once'. A multi-threaded application contains many separate tlrreads of execution all running concurrently and each assigned to its own particular task - the individual tasks are typically simple but the combination can be very powerful. Multi-threading therefore engenders a 'divide-and-conquer' strategy which allows complex monoliths to be broken up into more manageable chunks. Indeed multi-threading is perhaps the most exciting addition to the software engineer's toolkit since tlle advent of object-oriented programming, another topic about which tlris book has a lot to say. Multi-threading and object orientation are wonderful companions - e++ allows tlle basic building blocks for multi-threaded programming to be neatly packaged as objects whilst multi-threading techniques can be applied to transform objects from passive repositories of functionality into active entities that perform their own internal processing independently of external code. A general background in computing is assumed as well as familiarity with the C language and a basic knowledge of C++ would also be helpful - the more useful facets of the C++ language are introduced on a 'need-to-know' basis but for a fuller exposition than is possible here the reader is advised to rush out and buy the book 'Programming in C++' (ISBN 0859344355).
Inhaltsverzeichnis
1. Introduction. - 1. 1 Single Threaded Programming. - 1. 2 Multi-Threaded Programming. - 1. 3 Thread Synchronization. - 1. 4 Programming in C++. - 1. 5 Multi-Threading Implementations. - 1. 6 Summary. - 2. Threads. - 2. 1 Thread Scheduling. - 2. 2 Thread Environment. - 2. 3 The THREAD Class. - 2. 4 The Hello Program. - 2. 5 UNIX Implementation. - 2. 6 Windows Implementation. - 2. 7 Summary. - 3. Mutexes. - 3. 1 Why Synchronize? . - 3. 2 Mutex Mechanics. - 3. 3 The MUTEX Class. - 3. 4 Using Mutexes. - 3. 5 Atomic Operations. - 3. 6 The ATOMIC Class. - 3. 7 Inter-Thread Communication. - 3. 8 State Transitions. - 3. 9 Snapshots. - 3. 10 UNIX Implementation. - 3. 11 Windows Implementation. - 3. 12 Summary. - 4. Events. - 4. 1 Event Basics. - 4. 2 The EVENT Class. - 4. 3 Using Events. - 4. 4 The BUFFER Class. - 4. 5 The TIC _TAC_TOE Class. - 4. 6 UNIX Implementation. - 4. 7 Windows Implementation. - 4. 8 Summary. - 5. Semaphores. - 5. 1 Synchronization Patterns. - 5. 2 The SYNCH Class. - 5. 3 The SEMAPHORE Class. - 5. 4 The POOL Class. - 5. 5 The PIPELINE Class. - 5. 6 The ARBITRATOR Class. - 5. 7 UNIX Implementation. - 5. 8 Windows Implementation. - 5. 9 Summary. - 6. Objects. - 6. 1 Passive and Active Objects. - 6. 2 The TRANSFER Class. - 6. 3 Passive MUX Sender. - 6. 4 Active DEMUX Receiver. - 6. 5 Active MUX Sender. - 6. 6 Summary. - 7. Keys. - 7. 1 Thread-Specific Storage. - 7. 2 The KEY Class. - 7. 3 Thread Identifiers. - 7. 4 One-Time Initialization. - 7. 5 The ONCE Class. - 7. 6 UNIX Implementation. - 7. 7 Windows Implementation. - 7. 8 Summary. - 8. Multiple Mutexes. - 8. 1 Deadlocking Threads. - 8. 2 Avoiding Deadlock. - 8. 3 The RECURSIVE_MUTEX Class. - 8. 4 The TIMER Class. - 8. 5 The CLOCK Class. - 8. 6 Summary. - 9. Multiple Events. - 9. 1 Multiple Events. - 9. 2 The MULTI_EVENT Class. - 9. 3 Random Event Monitoring. - 9. 4 The HELLO Class. - 9. 5 UNIX Implementation. - 9. 6 Generic Implementation. - 9. 7 Windows Implementation. - 9. 8 Summary. - 10. Distributed Computing. - 10. 1 Network Communications. - 10. 2 The CHANNEL Class. - 10. 3 Packets and Streams. - 10. 4 The STREAM Class. - 10. 5 Database Queries. - 10. 6 The QUERY Class. - 10. 7 The DATABASE Class. - 10. 8 Building the Application. - 10. 9 Summary. - Postscript.