Home > Uncategorized > Parallelism versus concurrency

Parallelism versus concurrency

As ISO C++ Committee is adding lambda expressions to the language, Robert Harper from Carnegie Mellon University argues that functional programming can hide concurrency complexities from the programmer and allow the runtime environment to take care of them. This seems like the right thing to do – in the runtime the number of available processors is known and if the algorithm can be changed then to take advantage of it, it’s a good thing.

I wonder how one can write a compiler which implements this idea – should all tasks be represented as “batches of work” with known input and output parameters and known graph of dependencies between them? That could lead to even better optimization at processor scheduler level. Instead of distributing processor time between all threads (some of which can be waiting for something) it could start the “batch of work”/thread when it has all data needed to perform it’s computation.

Advertisements
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: