Concurrency Strategies and Models
Today’s computing world consists of distributed systems, cloud-based architectures, and hardware accelerated by multi-core processors. These characteristics necessitate concurrency strategies. This chapter provides foundational information on concurrency concepts and provides hands-on opportunities to implement concurrency in Java programs. The underlying goal is to harness the benefits and advantages of concurrency to improve the performance of our Java applications.
The chapter starts with a review of different concurrency models and their practical uses. Concepts include the thread-based memory model and the message-passing model. Then, we will explore multithreading from both a theoretical perspective and a hands-on practical aspect. The thread life cycle, thread pools, and other related topics will be covered. Synchronization will also be covered to include how to ensure thread safety and strategies to avoid common pitfalls. Finally...