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.
Please note that this resource requires
at least version 1.6 of
Java.
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… more... download 40kb .zip
Last Modified: February 1, 2013
previous versions
<a href="http://www.compadre.org/OSP/items/detail.cfm?ID=11669">Christian, Wolfgang. "Parallel Region Prime Number Computation Model." Version 1.0.</a>
W. Christian, Computer Program PARALLEL REGION PRIME NUMBER COMPUTATION MODEL, Version 1.0 (2012), WWW Document, (http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534).
W. Christian, Computer Program PARALLEL REGION PRIME NUMBER COMPUTATION MODEL, Version 1.0 (2012), <http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534>.
Christian, W. (2012). Parallel Region Prime Number Computation Model (Version 1.0) [Computer software]. Retrieved May 22, 2013, from http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534
Christian, Wolfgang. "Parallel Region Prime Number Computation Model." Version 1.0. http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534 (accessed 22 May 2013).
Christian, Wolfgang. Parallel Region Prime Number Computation Model. Vers. 1.0. Computer software. 2012. Java 1.6. 22 May 2013 <http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534>.
%A Wolfgang Christian %T Parallel Region Prime Number Computation Model %D January 19, 2012 %U http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534 %O 1.0 %O application/java
%0 Computer Program %A Christian, Wolfgang %D January 19, 2012 %T Parallel Region Prime Number Computation Model %7 1.0 %8 January 19, 2012 %U http://www.compadre.org/Repository/document/ServeFile.cfm?ID=11669&DocID=2534
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.
The Easy Java Simulations Modeling and Authoring Tool is needed to explore the computational model used in the Parallel Region Prime Number Computation Model.