05319nam 22006374a 450 991083015500332120230726114555.01-280-27765-397866102776500-470-24456-90-471-74417-40-471-74416-6(CKB)1000000000355133(EBL)242775(OCoLC)63759031(SSID)ssj0000204444(PQKBManifestationID)11174613(PQKBTitleCode)TC0000204444(PQKBWorkID)10188506(PQKB)11019617(MiAaPQ)EBC242775(EXLCZ)99100000000035513320050307d2006 uy 0engur|n|---|||||txtccrModern multithreading[electronic resource] implementing, testing, and debugging multithreaded Java and C++/Pthreads/Win32 programs /Richard H. Carver, Kuo-Chung TaiHoboken, NJ Wiley20061 online resource (481 p.)"Wiley-Interscience."0-471-72504-8 Includes bibliographical references and index.MODERN MULTITHREADING; CONTENTS; Preface; 1 Introduction to Concurrent Programming; 1.1 Processes and Threads: An Operating System's View; 1.2 Advantages of Multithreading; 1.3 Threads in Java; 1.4 Threads in Win32; 1.5 Pthreads; 1.6 C++ Thread Class; 1.6.1 C++ Class Thread for Win32; 1.6.2 C++ Class Thread for Pthreads; 1.7 Thread Communication; 1.7.1 Nondeterministic Execution Behavior; 1.7.2 Atomic Actions; 1.8 Testing and Debugging Multithreaded Programs; 1.8.1 Problems and Issues; 1.8.2 Class TDThread for Testing and Debugging1.8.3 Tracing and Replaying Executions with Class Template sharedVariable1.9 Thread Synchronization; Further Reading; References; Exercises; 2 The Critical Section Problem; 2.1 Software Solutions to the Two-Thread Critical Section Problem; 2.1.1 Incorrect Solution 1; 2.1.2 Incorrect Solution 2; 2.1.3 Incorrect Solution 3; 2.1.4 Peterson's Algorithm; 2.1.5 Using the volatile Modifier; 2.2 Ticket-Based Solutions to the n-Thread Critical Section Problem; 2.2.1 Ticket Algorithm; 2.2.2 Bakery Algorithm; 2.3 Hardware Solutions to the n-Thread Critical Section Problem; 2.3.1 Partial Solution2.3.2 Complete Solution2.3.3 Note on Busy-Waiting; 2.4 Deadlock, Livelock, and Starvation; 2.4.1 Deadlock; 2.4.2 Livelock; 2.4.3 Starvation; 2.5 Tracing and Replay for Shared Variables; 2.5.1 ReadWrite-Sequences; 2.5.2 Alternative Definition of ReadWrite-Sequences; 2.5.3 Tracing and Replaying ReadWrite-Sequences; 2.5.4 Class Template sharedVariable; 2.5.5 Putting It All Together; 2.5.6 Note on Shared Memory Consistency; Further Reading; References; Exercises; 3 Semaphores and Locks; 3.1 Counting Semaphores; 3.2 Using Semaphores; 3.2.1 Resource Allocation; 3.2.2 More Semaphore Patterns3.3 Binary Semaphores and Locks3.4 Implementing Semaphores; 3.4.1 Implementing P() and V(); 3.4.2 VP() Operation; 3.5 Semaphore-Based Solutions to Concurrent Programming Problems; 3.5.1 Event Ordering; 3.5.2 Bounded Buffer; 3.5.3 Dining Philosophers; 3.5.4 Readers and Writers; 3.5.5 Simulating Counting Semaphores; 3.6 Semaphores and Locks in Java; 3.6.1 Class countingSemaphore; 3.6.2 Class mutexLock; 3.6.3 Class Semaphore; 3.6.4 Class ReentrantLock; 3.6.5 Example: Java Bounded Buffer; 3.7 Semaphores and Locks in Win32; 3.7.1 CRITICAL_SECTION; 3.7.2 Mutex; 3.7.3 Semaphore; 3.7.4 Events3.7.5 Other Synchronization Functions3.7.6 Example: C++/Win32 Bounded Buffer; 3.8 Semaphores and Locks in Pthreads; 3.8.1 Mutex; 3.8.2 Semaphore; 3.9 Another Note on Shared Memory Consistency; 3.10 Tracing, Testing, and Replay for Semaphores and Locks; 3.10.1 Nondeterministic Testing with the Lockset Algorithm; 3.10.2 Simple SYN-Sequences for Semaphores and Locks; 3.10.3 Tracing and Replaying Simple PV-Sequences and LockUnlock-Sequences; 3.10.4 Deadlock Detection; 3.10.5 Reachability Testing for Semaphores and Locks; 3.10.6 Putting It All Together; Further Reading; References; Exercises4 MonitorsMaster the essentials of concurrent programming,including testing and debuggingThis textbook examines languages and libraries for multithreaded programming. Readers learn how to create threads in Java and C++, and develop essential concurrent programming and problem-solving skills. Moreover, the textbook sets itself apart from other comparable works by helping readers to become proficient in key testing and debugging techniques. Among the topics covered, readers are introduced to the relevant aspects of Java, the POSIX Pthreads library, and the Windows Win32 Applications Programming InParallel programming (Computer science)Threads (Computer programs)Parallel programming (Computer science)Threads (Computer programs)005.1005.11Carver Richard H.1960-1698196Tai Kuo-Chung1698197MiAaPQMiAaPQMiAaPQBOOK9910830155003321Modern multithreading4079494UNINA