正在加载图片...
<Index Part ll:Structuring Concurrent Applications 71 Chapter 6.Task Execution 72 6.1.Executing Tasks in.Threads 72 6.2.The Executor Framework. 74 6.3..Finding Exploitable Parallelism. 78 Summary. 83 Chapter 7.Cancellation and Shutdown 85 7.1.Task Cancellation 7.2 Stopping a Thread-based Service 85 7.3..Handling Abnormal.Thread Termination.. 23 .100 7.4.JVM Shutdown 102 Summary ..103 Chapter 8.Applying Thread Pools 104 8.1.Implicit Couplings Between Tasks and Execution Policies 104 ■■■■ 8.2.Sizing Thread Pools. .105 8.3.Configuring ThreadPoolExecutor ...1Q5 8.4.Extendina ThreadPoolExecutor. 111 8.5.Parallelizing Recursive Algorithms. .112 115 Chapter 2 GUL Applications 117 9.1.Why are GUls Single-threaded? 117 9.2:Short-running GUl Tasks... .…119 9.3.Long-runnina Gu Tasks 122 9.4.Shared Data Models.. ■■■ .123 9.5.Other Forms of Single-threaded Subsystems. 125 Summary......... .125 Partll:Liveness,Performance,and Testing 12Z Chapter 10.Avoiding Liveness Hazards 128 10.1.Deadlock .128 10.2.Avoiding and Diagnosing Deadlocks 133 10.3.Other Liveness Hazards 135 .136 Chapter 11.Performance and Scalability 137 11.1.Thinking about Performance. 137 11.2:Amdah!'s Law 139 11.3.Costs Introduced by Threads .142 11.4.Reducing Lock Contention. .144 ■■■■■■■ 11.5.Example:Comparing Map Performance. .150 11.6.Reducing Context Switch Overhead. 151 Summary 152 Chapter 12.Testing Concurrent Programs 153 12.1.Testing for Correctness... .153 12.2.Testing for Performance.. .160 12.3.Avoidina Performance Testing Pitfalls 165 12.4.Complementary Testing Approaches .167 Summary. 169 Part IV:Adyanced Topics 170 Chapter 13-Explicit Locks 171 13.1.Lock and Reentrantlock... .171 13.2.Performance Considerations .174 13.3.Fairnes5.… 175<Index iii Part II: Structuring Concurrent Applications 71 Chapter 6. Task Execution 72 6.1. Executing Tasks in Threads 72 6.2. Th e Executor Framework 74 6.3. Finding Exploitable Parallelism 78 Summary 83 Chapter 7. Cancellation and Shutdown 85 7.1. Task Cancellation 85 7.2. Stopping a Thread Ͳbased Service 93 7.3. Handling Abnormal Thread Termination 100 7.4. JVM Shutdown 102 Summary 103 Chapter 8. Applying Thread Pools 104 8.1. Implicit Couplings Between Tasks and Execution Policies 104 8.2. Sizing Thread Pools 105 8.3. Configuring ThreadPoolExecutor 106 8.4. Extending ThreadPoolExecutor 111 8.5. Parallelizing Recursive Algorithms 112 Summary 116 Chapter 9. GUI Applications 117 9.1. Why are GUI s Single Ͳthreaded? 117 9.2. Short Ͳ running GUI Tasks 119 9.3. Long Ͳrunning GU I Tasks 121 9.4. Shared Data Models 123 9.5. Other Forms of Single Ͳthreaded Subsystems 125 Summary 126 Part III: Liveness, Performance, and Testing 127 Chapter 10. Avoiding Liveness Hazards 128 10.1. Deadlock 128 10.2. Avoiding and Diagnosing Deadlocks 133 10.3. Other Liveness Hazards 135 Summary 136 Chapter 11. Performance and Scalability 137 11.1. Thinking about Performance 137 11.2. Amdahl's Law 139 11.3. Costs Introduced by Threads 142 11.4. Reducing Lock Contention 144 11.5. Example: Comparing Map Performance 150 11.6. Reducing Context Switch Overhead 151 Summary 152 Chapter 12. Testing Concurrent Programs 153 12.1. Testing for Correctness 153 12.2. Testing for Performance 160 12.3. Avoiding Performanc e Testing Pitfalls 165 12.4. Complementary Testing Approaches 167 Summary 169 Part IV: Advanced Topics 170 Chapter 13 - Explicit Locks 171 13.1. Lock an d ReentrantLock 171 13.2. Performance Considerations 174 13.3. Fairness 175
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有