An Ada multitasking solution for the sieve of Eratosthenes

  • Authors:
  • G. Anderson

  • Affiliations:
  • Logicon, 4010 Sorrento Valley Blvd., San Diego, CA

  • Venue:
  • ACM SIGAda Ada Letters
  • Year:
  • 1988

Quantified Score

Hi-index 0.00

Visualization

Abstract

The Sieve of Eratosthenes, an algorithm for calculating prime numbers, has been used for years as a benchmark for evaluating the processing power of single CPUs. A recent modification to the sieve algorithm provides a concurrent solution method for calculating prime numbers. This paper describes an Ada program which uses a multitasking solution for the Sieve of Eratosthenes. The program illustrates the use of Ada tasking to obtain concurrency in the solution of compute-intensive numerical algorithms and may also serve as a benchmark program for evaluating multiple CPU systems.