WHAT'S IN THIS CHAPTER?
Working with shared-memory multicore
Understanding the differences between shared-memory multicore and distributed-memory systems
Working with parallel programming and multicore programming in shared-memory architectures
Understanding hardware threads and software threads
Understanding Amdahl's Law
Considering Gustafson's Law
Working with lightweight concurrency models
Creating successful task-based designs
Understanding the differences between interleaved concurrency, concurrency, and parallelism
Parallelizing tasks and minimizing critical sections
Understanding rules for parallel programming for multicore architectures
Preparing for NUMA architectures
This chapter introduces the new task-based programming that allows you to introduce parallelism in applications. Parallelism is essential to exploit modern shared-memory multicore architectures. The chapter describes the new lightweight concurrency models and important concepts related to concurrency and parallelisms. It includes the necessary background information in order to prepare your mind for the next 10 chapters.
In 2005, Herb Sutter published an article in Dr. Dobb's Journal titled "The Free Lunch Is Over: A Fundamental Turn Toward Concurrency in Software" (
www.gotw.ca/publications/concurrency-ddj.htm). He talked about the need to start developing software considering concurrency to fully exploit continuing exponential microprocessors throughput ...