LEADER 05351nam 22006494a 450 001 9910143394903321 005 20170815122235.0 010 $a1-280-27765-3 010 $a9786610277650 010 $a0-470-24456-9 010 $a0-471-74417-4 010 $a0-471-74416-6 035 $a(CKB)1000000000355133 035 $a(EBL)242775 035 $a(OCoLC)63759031 035 $a(SSID)ssj0000204444 035 $a(PQKBManifestationID)11174613 035 $a(PQKBTitleCode)TC0000204444 035 $a(PQKBWorkID)10188506 035 $a(PQKB)11019617 035 $a(MiAaPQ)EBC242775 035 $a(EXLCZ)991000000000355133 100 $a20050307d2006 uy 0 101 0 $aeng 135 $aur|n|---||||| 181 $ctxt 182 $cc 183 $acr 200 10$aModern multithreading$b[electronic resource] $eimplementing, testing, and debugging multithreaded Java and C++/Pthreads/Win32 programs /$fRichard H. Carver, Kuo-Chung Tai 210 $aHoboken, NJ $cWiley$d2006 215 $a1 online resource (481 p.) 300 $a"Wiley-Interscience." 311 $a0-471-72504-8 320 $aIncludes bibliographical references and index. 327 $aMODERN 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 Debugging 327 $a1.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 Solution 327 $a2.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 Patterns 327 $a3.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 Events 327 $a3.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; Exercises 327 $a4 Monitors 330 $aMaster 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 In 606 $aParallel programming (Computer science) 606 $aThreads (Computer programs) 608 $aElectronic books. 615 0$aParallel programming (Computer science) 615 0$aThreads (Computer programs) 676 $a005.1 676 $a005.11 700 $aCarver$b Richard H.$f1960-$0998089 701 $aTai$b Kuo-Chung$0998090 801 0$bMiAaPQ 801 1$bMiAaPQ 801 2$bMiAaPQ 906 $aBOOK 912 $a9910143394903321 996 $aModern multithreading$92289380 997 $aUNINA