written by Wolfgang Christian
The Concurrent Prime Number Test Model uses the trial 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 threads that 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 Concurrent Prime Number Test 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.
Please note that this resource requires at least version 1.6 of Java.
View the supplemental document attached to this resource
View the source code documents attached to this resource (2)
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… more...
download 37kb .zip
Last Modified: October 15, 2013
ComPADRE is beta testing Citation Styles!
Disclaimer: ComPADRE offers citation styles as a guide only. We cannot offer interpretations about citations as this is an automated procedure. Please refer to the style manuals in the Citation Source Information area for clarifications.
Citation Source Information
The APA Style presented is based on information from APA Style.org: Electronic References.
The Chicago Style presented is based on information from Examples of Chicago-Style Documentation.
The MLA Style presented is based on information from the MLA FAQ.
Concurrent Prime Number Test Model:
Is Based On Easy Java Simulations Modeling and Authoring Tool
The Easy Java Simulations Modeling and Authoring Tool is needed to explore the computational model used in the Parallel Region Prime Number Computation Model.relation by Wolfgang Christian
Know of another related resource? Login to relate this resource to it.