Difference between revisions of "CSC352 Comparison threading to multiprocessing"

From dftwiki3
Jump to: navigation, search
Line 1: Line 1:
 +
===Experiment===
 +
 +
* Ran Threaded and Multiprocessing versions of NQueens programs (see [[:Category:Python]] for source code) for N ranging from 10 to 25.
 +
 +
* Typical shell script:
 +
<source lang="sh">
 +
#! /bin/bash
 +
# multiprocessingNQueens.py
 +
 +
for i in {10..25}
 +
do
 +
    echo $i
 +
    time python ./mulitprocessingNQueens.py $i | grep user
 +
done
 +
</source>
 +
 +
* recorded the times in spreadsheet (used [[CSC352ParseExecutionTimes.py | Python program]] to parse the data)
 +
 
<center>
 
<center>
 
[[Image:CSC352ComparisonMultiprocessingThreadingNQueens.png]]
 
[[Image:CSC352ComparisonMultiprocessingThreadingNQueens.png]]

Revision as of 21:16, 10 February 2010

Experiment

  • Ran Threaded and Multiprocessing versions of NQueens programs (see Category:Python for source code) for N ranging from 10 to 25.
  • Typical shell script:
#! /bin/bash
# multiprocessingNQueens.py

for i in {10..25}
do 
    echo $i
    time python ./mulitprocessingNQueens.py $i | grep user
done

CSC352ComparisonMultiprocessingThreadingNQueens.png