Difference between revisions of "CSC352 Comparison threading to multiprocessing"

From dftwiki3
Jump to: navigation, search
(Experiment)
Line 4: Line 4:
  
 
* Typical shell script:
 
* Typical shell script:
<source lang="sh">
+
<source lang="bash">
 
#! /bin/bash
 
#! /bin/bash
 
# multiprocessingNQueens.py
 
# multiprocessingNQueens.py
Line 22: Line 22:
  
 
* [[Media:CSC352ComparisonMultiProcThreaded.xls.gz | spreadsheet]]
 
* [[Media:CSC352ComparisonMultiProcThreaded.xls.gz | spreadsheet]]
 +
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
<br />
 +
[[Category:CSC352]][[Category:Threads]][[Category:Multiprocessing]]

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