Product Description<br>โWhen you begin using multi-threading throughout an application, the importance of clean architecture and design is critical. . . . This places an emphasis on understanding not only the platformโs capabilities but also emerging best practices. Joe does a great job interspersin
Concurrent Programming on Windows
โ Scribed by Joe Duffy
- Year
- 2008
- Tongue
- English
- Leaves
- 990
- Edition
- 1
- Category
- Library
No coin nor oath required. For personal study only.
โฆ Synopsis
โWhen you begin using multi-threading throughout an application, the importance of clean architecture and design is critical. . . . This places an emphasis on understanding not only the platformโs capabilities but also emerging best practices. Joe does a great job interspersing best practices alongside theory throughout his book.โ โ From the Foreword by Craig Mundie, Chief Research and Strategy Officer, Microsoft Corporation ย Author Joe Duffy has risen to the challenge of explaining how to write software that takes full advantage of concurrency and hardware parallelism. In Concurrent Programming on Windows, he explains how to design, implement, and maintain large-scale concurrent programs, primarily using C# and C++ for Windows. ย Duffy aims to give application, system, and library developers the tools and techniques needed to write efficient, safe code for multicore processors. This is important not only for the kinds of problems where concurrency is inherent and easily exploitableโsuch as server applications, compute-intensive image manipulation, financial analysis, simulations, and AI algorithmsโbut also for problems that can be speeded up using parallelism but require more effortโsuch as math libraries, sort routines, report generation, XML manipulation, and stream processing algorithms. ย Concurrent Programming on Windows has four major sections: The first introduces concurrency at a high level, followed by a section that focuses on the fundamental platform features, inner workings, and API details. Next, there is a section that describes common patterns, best practices, algorithms, and data structures that emerge while writing concurrent software. The final section covers many of the common system-wide architectural and process concerns of concurrent programming. ย This is the only book youโll need in order to learn the best practices and common patterns for programming with concurrency on Windows and .NET.
โฆ Table of Contents
Contents......Page 12
PART I - Concepts......Page 32
Why Concurrency?......Page 34
Program Architecture and Concurrency......Page 37
Layers of Parallelism......Page 39
Why Not Concurrency?......Page 41
Where Are We?......Page 42
2. Synchronization and Time......Page 44
Managing Program State......Page 45
Synchronization: Kinds and Techniques......Page 69
Where Are We?......Page 104
PART II - Mechanisms......Page 108
3. Threads......Page 110
Threading from 10,001 Feet......Page 111
The Life and Death of Threads......Page 120
Where Are We?......Page 155
Thread State......Page 158
Inside Thread Creation and Termination......Page 183
Thread Scheduling......Page 185
Where Are We?......Page 211
5. Windows Kernel Synchronization......Page 214
The Basics: Signaling and Waiting......Page 215
Using the Kernel Objects......Page 242
Where Are We?......Page 282
6. Data and Control Synchronization......Page 284
Mutual Exclusion......Page 286
Reader/Writer Locks (RWLs)......Page 318
Condition Variables......Page 335
Where Are We?......Page 343
7. Thread Pools......Page 346
Thread Pools 101......Page 347
Windows Thread Pools......Page 354
CLR Thread Pool......Page 395
Performance When Using the Thread Pools......Page 422
Where Are We?......Page 429
8. AsynchronousProgramming Models......Page 430
Asynchronous Programming Model (APM)......Page 431
Event- Based Asynchronous Pattern......Page 452
Where Are We?......Page 458
9. Fibers......Page 460
An Overview of Fibers......Page 461
Using Fibers......Page 466
Additional Fiber-Related Topics......Page 476
Building a User-Mode Scheduler......Page 484
Where Are We?......Page 504
PART III - Techniques......Page 506
10. Memory Models and Lock Freedom......Page 508
Memory Load and Store Reordering......Page 509
Hardware Atomicity......Page 517
Memory Consistency Models......Page 537
Examples of Low-Lock Code......Page 551
Where Are We?......Page 572
11. Concurrency Hazards......Page 576
Correctness Hazards......Page 577
Liveness Hazards......Page 603
Where Are We?......Page 640
12. Parallel Containers......Page 644
Fine-Grained Locking......Page 647
Lock Free......Page 663
Coordination Containers......Page 671
Where Are We?......Page 685
13. Data and Task Parallelism......Page 688
Data Parallelism......Page 690
Task Parallelism......Page 715
Message-Based Parallelism......Page 750
Cross-Cutting Concerns......Page 751
Where Are We?......Page 763
14. Performance and Scalability......Page 766
Parallel Hardware Architecture......Page 767
Speedup: Parallel vs. Sequential Code......Page 787
Spin Waiting......Page 798
Where Are We?......Page 812
PART IV - Systems......Page 814
15. Input and Output......Page 816
Overlapped I/O......Page 817
I/O Cancellation......Page 853
Where Are We?......Page 857
16. Graphical User Interfaces......Page 860
GUI Threading Models......Page 861
.NET Asynchronous GUI Features......Page 868
Where Are We?......Page 891
PART V - Appendices......Page 894
A. Designing Reusable Libraries for Concurrent .NET Programs......Page 896
The 20,000-Foot View......Page 897
The Details......Page 898
B. Parallel Extensions to .NET......Page 918
Task Parallel Library......Page 919
Parallel LINQ......Page 941
Synchronization Primitives......Page 946
Concurrent Collections......Page 955
Index......Page 962
๐ SIMILAR VOLUMES
<h3>Pressestimmen</h3><p>"I have been fascinated with concurrency ever since I added threading support to the Common Language Runtime a decade ago. That's also where I met Joe, who is a world expert on this topic. These days, concurrency is a first-order concern for practically all developers. Thank
Author Joe Duffy has risen to the challenge of explaining how to write software that takes full advantage of concurrency and hardware parallelism. In Concurrent Programming on Windows, he explains how to design, implement, and maintain large-scale concurrent programs, primarily using C# and C++ for
Pearson Education, 2009. โ 990 p. ะะฐ ะฐะฝะณะป. ัะทัะบะต.<div class="bb-sep"></div><strong>Author Joe Duffy has risen to the challenge of explaining how to write software that takes full advantage of concurrency and hardware parallelism. In <em>Concurrent Programming on Windows</em>, he explains how to desi
Here, one of the leading figures in the field provides a comprehensive survey of the subject, beginning with prepositional logic and concluding with concurrent programming. It is based on graduate courses taught at Cornell University and is designed for use as a graduate text. Professor Schneier emp
GRADUATE TEXTS IN COMPUTER SCIENCE; ON CONCURRENT PROGRAMMING; Copyright; Preface; Contents; List of Figures; Chapter 1 Introduction; Chapter 2 Formal Logic; Chapter 3 Temporal Logic; Chapter 4 Notation and Logic for Sequential Programming; Chapter 5 Concurrency and Interference; Chapter 6 Safety Pr