Hey everyone! I'm diving into the world of concurrency and multithreading and I'm on the hunt for some solid book recommendations. I'm specifically looking for resources that focus on the theory behind concurrency and multithreading rather than just guides on how to implement them in different programming languages or frameworks. Ideally, I'd love something akin to books on best programming practices or clean code architecture, which discuss common problems faced in this area and solutions to them. I've been a developer for about a decade but haven't tackled this topic in practice yet. Any suggestions would be greatly appreciated!
4 Answers
Check out *The Art of Multiprocessor Programming* by Herlihy & Shavit. The first edition is accessible for free through the ACM Digital Library, while the second edition includes new chapters and exercises. It primarily covers the underlying principles and how to apply them, heavily using Java but applicable to other languages too!
While I don't have specific book recommendations, I suggest checking out some video resources. There's a channel called @CoreDumpped that covers a lot of great material on these topics.
To sum it up: processes in an OS run concurrently, with each getting its own time slice to execute. Threads, on the other hand, are like mini-processes—they share the same virtual address space but can run concurrently or even in parallel if you have enough CPU cores. When a thread finishes its task, it might need to be recreated, or you can have a set number of threads ready to handle requests, like in C#'s thread pools.
I got into concurrency during my OS class, and I used a bunch of resources there. I remember reading Stallings’ OS book and also 'OS in Three Easy Pieces.' While I haven’t read a specific concurrency book for a programming language, I’d love to see what others suggest as well!
Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically