concurrency and parallelism landscape

The seven models covered in this book have been chosen to provide a broad

view of the concurrency and parallelism landscape.


  • Threads and locks: Threads-and-locks programming has many well-under-

stood problems, but it’s the technology that underlies many of the other

models we’ll be covering and it is still the default choice for much concur-

rent software.

  • Functional programming: Functional programming is becoming increasingly

prominent for many reasons, not the least of which is its excellent support

for concurrency and parallelism. Because they eliminate mutable state,

functional programs are intrinsically thread-safe and easily parallelized.

  • The Clojure Way—separating identity and state: The Clojure language has

popularized a particularly effective hybrid of imperative and functional

programming, allowing the strengths of both approaches to be leveraged

in concert.

  • Actors: The actor model is a general-purpose concurrent programming model

with particularly wide applicability. It can target both shared- and dis-

tributed-memory architectures and facilitate geographical distribution,

and it provides particularly strong support for fault tolerance and

resilience.

  • Communicating Sequential Processes: On the face of things, Communicating

Sequential Processes (CSP) has much in common with the actor model,

both being based on message passing. Its emphasis on the channels used

for communication, rather than the entities between which communication

takes place, leads to CSP-based programs having a very different flavor,

however.

  • Data parallelism: You have a supercomputer hidden inside your laptop. The

GPU utilizes data parallelism to speed up graphics processing, but it can

be brought to bear on a much wider range of tasks. If you’re writing code

to perform finite element analysis, computational fluid dynamics, or

anything else that involves significant number-crunching, its performance

will eclipse almost anything else.

  • The Lambda Architecture: Big Data would not be possible without paral-

lelism—only by bringing multiple computing resources to bear can we

contemplate processing terabytes of data. The Lambda Architecture

combines the strengths of MapReduce and stream processing to create

an architecture that can tackle a wide variety of Big Data problems.


你可能感兴趣的:(PARALLELISM,concurrency,landscape,and)