Matrix multiplication using fixed thread pool executor service

In this article, we shall
  • Divide the job of matrix multiplication into tasks that can be executed in parallel.
  • Execute tasks in parallel using ExecutorService.

Executor Service

An instance of  ExecutorService can be obtained using static methods in Executors. For example, Invoking Executors.newFixedThreadThreadPool (3) shall return an ExecutorService that uses a maximum of 3 threads (workers) in parallel to perform the job. Using multiple threads to work in parallel shall reduce the time taken (more...)