PRESCRIBED TEXT FOR ITC527 AT CSU DISTANCE ED, SEMESTER 1 2013
PRESCRIBED TEXT FOR ITC511 AT CSU DISTANCE ED, SEMESTER 1 2013
PRESCRIBED TEXT FOR ITC527 AT CSU, SEMESTER 1 2010
'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
As processors become faster and multiprocessor systems become cheaper, the need to take advantage of multithreading in order to achieve full hardware resource utilization only increases the importance of being able to incorporate concurrency in a wide variety of application categories.
For many developers, concurrency remains a mystery. Developing, testing and debugging multithreaded programs is extremely difficult because concurrency hazards do not manifest themselves uniformly or reliably. This book is intended to be neither an introduction to concurrency (any threading chapter in an 'intro' book does that) nor is it an encyclopedic reference of All Things Concurrency (that would be Doug Lea's Concurrent Programming in Java). Instead, this title is a combination of concepts, guidelines, and examples intended to assist developers in the difficult process of understanding concurrency and its new tools in J2SE 5.0.
Filled with contributions from Java gurus such as Josh Bloch, David Holmes and Doug Lea, this book provides any Java programmers with the basic building blocks they need to gain a basic understanding of concurrency and its benefits.
Features and Benefits
A how-to companion to Doug Lea's 'Concurrent Programming in Java', this book is the only authorative and practical guide to Java Concurrency
° Powerhouse author team with contributions from Doug Lea, Josh Bloch and David Holmes
° A practical, hands-on, example-driven guide for every working Java programmer
° Based on J2SE 5.0 which includes many new concurrency features that make concurrency development much more accesible (and necessary)
Table of Contents
Chapter 1: Introduction
A (very) brief history of concurrency
Benefits of threads
Risks of threads
Threads are everywhere
Part I: Fundamentals
Chapter 2: Thread Safety
What is thread safety?
Guarding state with locks
Liveness and performance
Chapter 3: Sharing Objects
Publication and escape
Chapter 4: Composing Objects
Designing a thread-safe class
Delegating thread safety
Adding functionality to existing thread-safe classes
Documenting synchronization policies
Chapter 5: Building Blocks
Blocking queues and the producer-consumer pattern
Blocking and interruptible methods
Building an efficient, scalable result cache
Part II: Structuring Concurrent Applications
Chapter 6: Task Execution
Executing tasks in threads
The Executor framework
Finding exploitable parallelism
Chapter 7: Cancellation and Shutdown
Stopping a thread-based service
Handling abnormal thread termination
Chapter 8: Applying Thread Pools
Implicit couplings between tasks and execution policies
Sizing thread pools
Parallelizing recursive algorithms
Chapter 9: GUI Applications
Why are GUIs single-threaded?
Short-running GUI tasks
Long-running GUI tasks
Shared data models
Other forms of single-threaded subsystems
Part III: Liveness, Performance, and Testing
Chapter 10: Avoiding Liveness Hazards
Avoiding and diagnosing deadlocks
Other liveness hazards
Chapter 11: Performance and Scalability
Thinking about performance
Costs introduced by threads
Reducing lock contention
Example: Comparing Map performance
Reducing context switch overhead
Chapter 12: Testing Concurrent Programs
Testing for correctness
Testing for performance
Avoiding performance testing pitfalls
Complementary testing approaches
Part IV: Advanced Topics
Chapter 13: Explicit Locks
Lock and ReentrantLock
Choosing between synchronized and ReentrantLock
Chapter 14: Building Custom Synchronizers
Managing state dependence
Using condition queues
Explicit condition objects
Anatomy of a synchronizer
AQS in java.util.concurrent synchronizer classes
Chapter15: Atomic Variables and Nonblocking Synchronization
Disadvantages of locking
Hardware support for concurrency
Atomic variable classes
Chapter 16: The Java Memory Model
What is a memory model, and why would I want one?
Appendix A: Annotations for Concurrency
Field andmethod annotations