Parallel Region Prime Number Computation Model Documents

This material has 2 associated documents. Select a document title to view a document's information.

Main Document

Parallel Region Prime Number Computation Model 

written by Wolfgang Christian

The Parallel Region Prime Number Computation Model uses the prime division algorithm to decide if a number is prime.  The prime division algorithm is inefficient and we use it here only to test the EJS implementation of the Parallel Region Element in EJS.  A parallel region executes independent code in a separate thread and these threads can execute simultaneously on a multi-core processor.  The screen capture shows that the total execution time for four computations on a quad-core processor is only one millisecond longer than the execution time for the longest single computation.  This linear speedup is close to the theoretical maximum.

The Parallel Region Prime Number Computation Model was created using the Easy Java Simulations (EJS) modeling tool.  It is distributed as a ready-to-run (compiled) Java archive.  Double clicking the model's jar file will run the simulation if Java is installed.

Last Modified February 1, 2013

This file has previous versions.

Source Code Documents

Parallel Region Prime Number Computation Source Code 

The source code zip archive contains an XML representation of the Parallel Region Prime Number Computation Model.  Unzip this archive in your Ejs workspace to compile and run this model using EJS.

Last Modified February 1, 2013

This file has previous versions.