原创 Embarrassingly Parallel Applications!

2010-2-10 15:00 2508 13 13 分类: 消费电子

Dear Readers,

 

In the last article, we saw the difficulties in concurrent programming. The difficulties arise due to the complex interplay of different threads of execution, how they communicate with each other and how they access common variables.

 

But there are some cases, where this is NOT an issue.

 

Suppose there is an array of 1000000 bytes which has to be initialized with zeros. We can have a program that sequentially fills the array with zero. Or we can create multiple threads, and allow them to initialize different parts of the array. Since the threads work on different parts of the data, there is no access to common variables. There is also no communication between the threads. So, the potential issues of deadlocks, race conditions don’t apply.

 

In such cases, a multicore system can potentially run each thread on a seperate core thereby speeding up the performance. Such models have been used in scientific computing, using a model called OpenMP.

 

In parallel computing, such problems are called “Embarrassingly Parallel Problems”. These are computations which can be decomposed to a number of threads that can execute more or less independently, without communication. Such problems are easily converted to concurrent programs and one can get benefits of multiple cores with little effort.

 

Some examples that are “embarrassingly parallel programs” from Wikipedia are:

 

  • Brute force searches in cryptography.
  • Searching for DNA segments across a database as in BLAST algorithm in bioinformatics
  • Large scale face recognition that involves comparing thousands of input faces.
  • Computer simulations comparing many independent scenarios, such as climate models.
  • Weather prediction models
  • Event simulation and reconstruction in particle physics.

As we can see, all of them are scientific computation in nature and are of little use to a common man. Is there anything for a simple desktop PC user like us?

 

Fortunately, there is hope in computer graphics. The computer screen consists of many pixels. When we update the screen memory, we can partition the memory, create multiple threads and allow each thread to update their relevant part of the memory, thereby improving graphics performance.

 

Microsoft has made many changes in their recently released Windows 7 to improve their graphics performance. Multithreaded graphics libraries leverage multiple cores as each thread runs on a different core. As a result, the new DirectX11 from Microsoft makes games, visualization and other graphics intensive programs to deliver higher performance and a better user experience for users.

 

This is the first clear dividend to a common user from the multicore technology!

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
13
关闭 站长推荐上一条 /3 下一条