- Paperback: 384 pages
- Publisher: Addison-Wesley Professional; 1 edition (May 19, 2006)
- Language: English
- ISBN-10: 0321349601
- ISBN-13: 978-0321349606
- Product Dimensions: 6.9 x 1 x 9.1 inches
- Shipping Weight: 1.4 pounds (View shipping rates and policies)
- Average Customer Review: 4.7 out of 5 stars See all reviews (162 customer reviews)
- Amazon Best Sellers Rank: #42,697 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Java Concurrency in Practice 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Frequently bought together
Customers who bought this item also bought
From the Back Cover
"I was fortunate indeed to have worked with a fantastic team on the design and implementation of the concurrency features added to the Java platform in Java 5.0 and Java 6. Now this same team provides the best explanation yet of these new features, and of concurrency in general. Concurrency is no longer a subject for advanced users only. Every Java developer should read this book."
JDK Concurrency Czar, Sun Microsystems
"For the past 30 years, computer performance has been driven by Moore's Law; from now on, it will be driven by Amdahl's Law. Writing code that effectively exploits multiple processors can be very challenging. "Java Concurrency in Practice" provides you with the concepts and techniques needed to write safe and scalable Java programs for today's--and tomorrow's--systems."
Research Scientist, Intel Corp
"This is the book you need if you're writing--or designing, or debugging, or maintaining, or contemplating--multithreaded Java programs. If you've ever had to synchronize a method and you weren't sure why, you owe it to yourself and your users to read this book, cover to cover."
Author of "Effective Enterprise Java"
"Brian addresses the fundamental issues and complexities of concurrency with uncommon clarity. This book is a must-read for anyone who uses threads and cares about performance."
"This book covers a very deep and subtle topic in a very clear and concise way, making it the perfect Java Concurrency reference manual. Each page is filled with the problems (and solutions!) that programmers struggle with every day. Effectively exploiting concurrency is becoming more and more important now that Moore's Law is delivering more cores but not faster cores, and this book will show you how to do it."
--Dr. Cliff Click
Senior Software Engineer, Azul Systems
"I have a strong interest in concurrency, and have probably written more thread deadlocks and made more synchronization mistakes than most programmers. Brian's book is the most readable on the topic of threading and concurrency in Java, and deals with this difficult subject with a wonderful hands-on approach. This is a book I am recommending to all my readers of "The Java Specialists' Newsletter," because it is interesting, useful, and relevant to the problems facing Java developers today."
--Dr. Heinz Kabutz
"The Java Specialists' Newsletter"
"I've focused a career on simplifying simple problems, but this book ambitiously and effectively works to simplify a complex but critical subject: concurrency. "Java Concurrency in Practice" is revolutionary in its approach, smooth and easy in style, and timely in its delivery--it's destined to be a very important book."
Author of "Beyond Java"
""Java Concurrency in Practice" is an invaluable compilation of threading know-how for Java developers. I found reading this book intellectually exciting, in part because it is an excellent introduction to Java's concurrency API, but mostly because it captures in a thorough and accessible way expert knowledge on threading not easily found elsewhere."
Author of "Inside the Java Virtual Machine"
Threads are a fundamental part of the Java platform. As multicore processors become the norm, using concurrency effectively becomes essential for building high-performance applications. Java SE 5 and 6 are a huge step forward for the development of concurrent applications, with improvements to the Java Virtual Machine to support high-performance, highly scalable concurrent classes and a rich set of new concurrency building blocks. In "Java Concurrency in Practice," the creators of these new facilities explain not only how they work and how to use them, but also the motivation and design patterns behind them.
However, developing, testing, and debugging multithreaded programs can still be very difficult; it is all too easy to create concurrent programs that appear to work, but fail when it matters most: in production, under heavy load. "Java Concurrency in Practice" arms readers with both the theoretical underpinnings and concrete techniques for building reliable, scalable, maintainable concurrent applications. Rather than simply offering an inventory of concurrency APIs and mechanisms, it provides design rules, patterns, and mental models that make it easier to build concurrent programs that are both correct and performant.
This book covers: Basic concepts of concurrency and thread safety Techniques for building and composing thread-safe classes Using the concurrency building blocks in java.util.concurrent Performance optimization dos and don'ts Testing concurrent programs Advanced topics such as atomic variables, nonblocking algorithms, and the Java Memory Model
About the Author
Brian Goetz is a software consultant with twenty years industry experience, with over 75 articles on Java development. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Tim Peierls is the very model of a modern multiprocessor, with BoxPop.biz, recording arts, and goings on theatrical. He is one of the primary members of the Java Community Process JSR 166 Expert Group (Concurrency Utilities), and has served on numerous other JCP Expert Groups.
Joshua Bloch is a principal engineer at Google and a Jolt Award-winner. He was previously a distinguished engineer at Sun Microsystems and a senior systems designer at Transarc. Josh led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He holds a Ph.D. in computer science from Carnegie Mellon University.
Joseph Bowbeer is a software architect at Vizrea Corporation where he specializes in mobile application development for the Java ME platform, but his fascination with concurrent programming began in his days at Apollo Computer. He served on the JCP Expert Group for JSR-166 (Concurrency Utilities).
David Holmes is director of DLTeCH Pty Ltd, located in Brisbane, Australia. He specializes in synchronization and concurrency and was a member of the JSR-166 expert group that developed the new concurrency utilities. He is also a contributor to the update of the Real-Time Specification for Java, and has spent the past few years working on an implementation of that specification.Doug Lea is one of the foremost experts on object-oriented technology and software reuse. He has been doing collaborative research with Sun Labs for more than five years. Lea is Professor of Computer Science at SUNY Oswego, Co-director of the Software Engineering Lab at the New York Center for Advanced Technology in Computer Applications, and Adjunct Professor of Electrical and Computer Engineering at Syracuse University. In addition, he co-authored the book, Object-Oriented System Development (Addison-Wesley, 1993). He received his B.A., M.A., and Ph.D. from the University of New Hampshire.
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
This book is not meant to be an introduction to concurrency in Java. Its intention is to offer practical design rules to assist developers in the difficult process of creating safe, fast, and high-performance concurrent classes. While many of the general concepts in this book are applicable to versions of Java prior to Java 1.5, most of the code examples and all the statements about the Java Memory Model assume Java 1.5 or later. By "later" I mean that some of the code examples use library features added in the not-yet released Java 1.6. After the introduction, which consists of Chapter 1, the book is divided into four parts:
Part one, "Fundamentals", (Chapters 2-5) are about the basic concepts of concurrency, thread safety, and composing thread-safe classes from those concurrent building blocks provided by the Java language. Chapter 2, "Thread Safety", and 3, "Sharing Objects", include nearly all of the rules on avoiding concurrency hazards, constructing thread-safe classes, and verifying thread safety. Thus, these chapters emphasize theory and have less code than other chapters in the book. Chapter 4 , "Composing Objects", covers techniques for composing large thread-safe classes from smaller thread-safe classes. Chapter 5, "Building Blocks", covers thread-safe collections and synchronizers, which are the the concurrent building blocks provided by Java. To conclude the section, the authors work through the steps of building an efficient, scalable result cache that could be used in a web server. A summary of the most important rules presented in Part one occur at the end of the section.
Part two, "Structuring Concurrent Applications", describes how proper use of threading improves the throughput and responsiveness of concurrent applications. The topics covered in this section include identifying tasks that can be run in parallel and programming them as such, proper termination of tasks, using thread pools for greater efficiency in multi-threaded systems, and finally improving the responsiveness of single-threaded systems, GUI's being the most prominent example.
Part 3, "Liveness, Performance, and Testing" is concerned with ensuring that concurrent programs actually do what is expected of them and do so with acceptable performance. The authors describe how to avoid situations where a thread waits forever, also known as a "liveness failure". Also included in this section is an excellent explanation of the use of the "ThreadLocal" class and how it makes it much easier to manage the process of associating a thread with its per-thread data.
Part 4, "Advanced Topics", covers issues that will probably be interesting only to experienced developers. These topics include explicit locks, atomic variables, nonblocking algorithms, and developing custom synchronizers. Any of these techniques, explicit locks in particular, can cause chaos when done incorrectly. This book shows how to use these techniques safely and with confidence.
One of the things that makes this book so good are the many code examples. There are only snippets of entire programs included in the book itself in order to highlight the portions relevant to the concurrency issue being discussed. The code examples are either good examples, questionable examples, or bad code examples and are decorated with "Smiley Faces" that are either happy, concerned, or unhappy depending on the quality of the code. The full versions of the code examples, as well as supplementary examples and errata, are supposed to be available from the book's website. However, at the time I am writing this, they are not yet available.
Overall, I would say that this is the most complete and accessible resource on concurrency in Java I have seen in print. I highly recommend it.
Before tackling this book, you should have at least some idea of pre-Java 5.0 concurrency. You don't need to be a threading master, though, as the first part of the book covers basics like deadlock, atomicity and liveness. This was my favourite part of the book, as it comes with lots of small code snippets, both right and (horribly) wrong, and pithy design guidelines. It's rather like Effective Java in that respect - although the material on threading was probably the weakest part of that book, so this is a definite improvement.
The second part deals with thread pools, cancellation strategies, and GUIs. This is also excellent. Part three covers performance and testing. The last 75 pages are for advanced users and goes into a fair amount of low level detail (including a discussion of the Java Memory Model), which may be of interest to experts only.
I would be lying if I said that reading this book will demystify concurrency completely. Who wrote which bit of the book is unclear (although readers of Effective Java will probably spot parts of the text that seem rather Joshua Blochish), but while it's mostly very clear, some parts of the text are a little murkier than other. Perhaps this is to be expected given the subject matter. But for the most part it's surprisingly easy reading, and very practical to boot.
Let's face it, short of aliens landing and introducing a radically new way of computing, multicores are here for the medium term at least, so thread-dodging wimps such as myself will just have to get used to it. That being so, this book is going to be installed as one of the must-read books in the Java pantheon.
The book stands on par with such established Java book jems as Josh Bloch's "Effective Java", Eckel's "Thinking in Java" and Rod Johnson's J2EE books.
All in all, this is a definite must have for any Java specialist.
Most Recent Customer Reviews
This is not a taxonomic reference-like book that describes the Java Concurrency APIs either.Read more