viernes, 30 de abril de 2010

Parallel algorithms. Java threads. Using multiple cores.

Today, computar machines has a multiples cores into his processors. The main problem is that the software engineers do not design the software accord this situation because they ignore this new technology or simply because they doesn´t want design parallel algorithms. This problem imply that the multiple core machines are underused.

I propose a simple problem: Adding an integer array of ten million positions with a due core machine.

  1. Only one process
  2. Four threads. A piece of vector by thread
  3. Two threads. A piece of vector by thread
The results: