Concurrent Programming in Java�: Design Principles and Patterns
Douglas Lea
None pages, Paperback
ISBN: 0321256174
ISBN13:
Language: English
Publish: None
Computer ScienceComputersNonfictionProgrammingReferenceSoftwareTechnicalTechnology
Concurrent Programming in Java, 2nd Edition surveys a wide field of research in parallelism and concurrency and shows how to do more with multithreading in Java with dozens of patterns and design tips. Written for the advanced Java developer, this book offers a comprehensive tour of leading-edge thinking about parallel coding processes. Within the dozens of techniques and tips offered here, this book accomplishes at least two goals. First, it shows how concurrency is implemented by default within Java, with material on how built-in features (like the synchronized keyword and its memory model) can be expected to perform when dealing with multiple threads. Naturally, Java threads themselves are also covered, including priorities, scheduling, and the like. Much of this book looks at ways to improve performance of concurrent code beyond the simple default strategies. After defining criteria for measuring concurrent code (such as safety and “liveness,” a measure of running live threads effectively), the book presents dozens of techniques for letting threads work together safely. For the working Java programmer, coverage of patterns that have been implemented in the downloadable java.concurrency package will be the most immediately useful. (Within this nearly encyclopedic survey, short code snippets are used for every pattern and concept.) Though theoretical at times, this book offers plenty of ideas and sample code to get you started thinking of ways to improve multithreaded code. Impressively comprehensive, Concurrent Programming in Java offers a veritable bible of techniques for doing two things at once with threads in Java. It’s a worthwhile guide to the state-of-the-art strategies for improving the performance of your Java threads. –Richard Dragan Topics covered: Threads and concurrency in Java, design considerations (safety, liveness, and performance), Before/After Patterns, layering, adapters, immutability and synchronization, deadlock, resource ordering, the Java Memory Model and concurrency, using the java.concurrency package, confinement, refactoring for concurrency, mutexes, read-write locks, recovering from failure, notifications, semaphores, latches, exchanges, transactions, one-way messages, worker threads, polling and event-driven I/O, parallelism techniques (fork/join, computation trees, and barriers), Communicating Sequential Processes (CSP).