Grokking Concurrency

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

This easy-to-read, hands-on guide demystifies concurrency concepts like threading, asynchronous programming, and parallel processing in any language. For readers who know the basics of programming. Grokking Concurrency is the ultimate guide to effective concurrency practices that will help you leverage multiple cores, excel with high loads, handle terabytes of data, and continue working after hardware and software failures. The core concepts in this guide will remain eternally relevant, whether you are building web apps, IoT systems, or handling big data. Specifically, you will Get up to speed with the core concepts of concurrency, asynchrony, and parallel programming Learn the strengths and weaknesses of different hardware architectures Improve the sequential performance characteristics of your software Solve common problems for concurrent programming Compose patterns into a series of practices for writing scalable systems Write and implement concurrency systems that scale to any size Grokking Concurrency demystifies writing high-performance concurrent code through clear explanations of core concepts, interesting illustrations, insightful examples, and detailed techniques you can apply to your own projects. About the technology Microservices, big data, real-time systems, and other performance-intensive applications can all slow your systems to a crawl. You know the solution is “concurrency.” Now what? How do you choose among concurrency approaches? How can you be sure you will actually reduce latency and complete your jobs faster? This entertaining, fully illustrated guide answers all of your concurrency questions so you can start taking full advantage of modern multicore processors.

Author(s): Kirill Bobrov
Publisher: Manning Publications
Year: 2024

Language: English
Pages: 224

grokking concurrency
contents
preface
acknowledgments
about this book
about the author
Part 1 The octopus orchestra: Introduction to a symphony of concurrency
1 Introducing concurrency
Why is concurrency important?
Layers of concurrency
What you’ll learn from this book
Recap
2 Serial and parallel execution
Review: What is a program?
Serial execution
Sequential computations
Parallel execution
Parallel computing requirements
Parallel computing
Amdahl’s law
Gustafson’s law
Concurrency vs. parallelism
Recap
3 How computers work
Processor
Runtime system
Design of computer systems
Multiple levels of concurrent hardware
Recap
4 Building blocks of concurrency
Concurrent programming steps
Processes
Threads
Recap
5 Interprocess communication
Types of communication
Thread pool pattern
Cracking passwords, revisited
Recap
Part 2 The many tentacles of concurrency: Multitasking, decomposition, and synchronization
6 Multitasking
CPU-bound and I/O-bound applications
The need for multitasking
Multitasking from a bird’s-eye view
Multitasking environments
Recap
7 Decomposition
Dependency analysis
Task decomposition
Task decomposition: Pipeline pattern
Data decomposition
Granularity
Recap
8 Solving concurrency problems: Race conditions and synchronization
Shared resources
Race conditions
Synchronization
Recap
9 Solving concurrency problems: Deadlocks and starvation
Dining philosophers
Deadlocks
Livelocks
Starvation
Designing synchronization
A last few words
Recap
Part 3 Asynchronous octopuses: A pizza-making tale of concurrency
10 Nonblocking I/O
The distributed world
Client-server model
Pizza-ordering service
Blocking I/O
Nonblocking I/O
Recap
11 Event-based concurrency
Events
Callbacks
Event loop
I/O multiplexing
Event-driven pizza server
Reactor pattern
Synchronization in message passing
I/O models
Recap
12 Asynchronous communication
A need for asynchrony
Asynchronous procedure calls
Cooperative multitasking
Future objects
Cooperative pizza server
Asynchronous pizza joint
Conclusions on the asynchronous model
Recap
13 Writing concurrent applications
So, what is concurrency?
Foster’s methodology
Matrix multiplication
Distributed word count
Recap
Epilogue
index
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W