Difference between revisions of "CSC352 Comparison threading to multiprocessing"

From dftwiki3
Jump to: navigation, search
(Experiment)
(Experiment)
Line 4: Line 4:
  
 
* Typical shell script:
 
* Typical shell script:
 +
<br />
 
<source lang="bash">
 
<source lang="bash">
 
#! /bin/bash
 
#! /bin/bash
Line 14: Line 15:
 
done
 
done
 
</source>
 
</source>
 +
<br />
  
 
* recorded the times in spreadsheet (used [[CSC352ParseExecutionTimes.py | Python program]] to parse the data)
 
* recorded the times in spreadsheet (used [[CSC352ParseExecutionTimes.py | Python program]] to parse the data)

Revision as of 21:18, 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