Seeking prime numbers quickly through parallel-computing Daniel J. Wright
Seeking prime numbers quickly through parallel-computing Reasoning / Background Project Goals Methodology and Assumptions Software Description Result Data Conclusions
Reasoning / Background DES: U.S. Government Data Encryption Standard: 72,057,594,037,927,936 (72 quadrillion) possible keys. –Cracked by the Electronic Frontier Foundation’s “Deep Crack” software and hardware in just over 22 hours, trying 245 billion keys per second. –How?
Parallel Processing!!! Multiple CPU’s networked together and assigned only a portion of the entire work to be completed.
Reasoning / Background RC5: Public key encryption –Two keys (one public and one private) are generated based on the factors of a third number. –Recipe for a hard-to-factor number: Multiply two very large prime numbers together. –How do we find large prime numbers quickly?
Parallel Processing!!! Multiple CPU’s networked together to find very large prime numbers faster than any one machine could.
Project Goals To develop software that utilizes multiple CPUs to solve a problem more quickly than any one of the CPUs alone. To demonstrate a usage for legacy equipment. To implement the software within a frame of three months.
Description Two sets of software were written for comparison purposes. –Standalone version designed to find prime numbers very quickly. –Networked version designed to cooperate with multiple PCs to find the same range of prime numbers.
Methodologies and Assumptions Finding prime numbers is not a hard task. Fast prime number algorithms are not 100% effective. The networked version uses identical algorithms for actually calculating the primes. Both software versions are capable of benchmarking themselves.
Software Description Standalone Version: –Accepts all project details on the command line. –Uses the Rabin-Miller algorithm for finding prime numbers. –Outputs resulting data to pre-designated output files. Networked Client: –Accepts project details from the project server. –Uses the Rabin-Miller algorithm for finding prime numbers. –Sends resulting data back to the server.
Software Description Networked Server: –Accepts project details from the command line. –Utilizes multiple threads to allow concurrent access of all of the clients at the same time. –Handles all data flow to and from the the clients with a central database object. –Outputs the results of all the clients work to pre-designated output files.
Software Description Considerations: –The central database must be able to handle the critical section problem for an unlimited number of processes. –The central database must be able to intelligently assign blocks of numbers to each client so that all clients finish in the same amount of time. –The central database must operate efficiently.
Software Description Central Database: –Wrapper object holding 6 separate object- oriented databases. –Project Information Database - Maintains overall status information regarding the rest of the databases. –Client Table - Maintains listing of all clients that are registered with the database along with current assignment and benchmark information.
Software Description Central Database: (Continued) –Unassigned List, Assigned List, Done List, Prime List Uses polymorphism to inherit the list class. –List Class: Contains the Unassigned Record, Assigned Record, Done Record and Prime Record which are all use polymorphism to inherit the record class.
Resources Hardly Any! Project needed to demonstrate a positive usage for legacy equipment. –Developed with GCC on a Pentium 100 running Red Hat Linux 5.1. –Tested on multiple Linux work stations and legacy Sun Sparc Stations.
Results: All primes between 1 and 25,000: –One system was able to process 260 numbers per second. –Two systems cooperating were able to process 454 numbers per second. –An increase of 75% !
Results: All primes between 1 and 250,000: –One system was able to process 43 numbers per second. –Two systems were able to process 134 numbers per second. –An increase of 210% !
Results: All primes between 1 and 250,000: –Some Sun Sparc Stations were unable to complete the project as a standalone system due to CPU time limits. –Other workstations that managed to complete the project processed an average of 25 numbers per second. –In a combined effort, 9 workstations were able to process 250,000 numbers at a rate of 200 numbers per second.
Conclusions: Parallel processing improves processing speed. Legacy systems can still be powerful machines if there are enough of them. As ubiquitous computing becomes more prominent, the processing of data can not be limited by the capabilities of any one system.
For further information Project documentation: –HTTP://www.pitt.edu/~djwst18/coursework RSA Encryption –HTTP://www.rsa.com Unix network programming –HTTP://www.interlog.com/~vic/sock-faq.html Unix interprocess communication –HTTP://www.kohala.com/~rstevens