title: Parallelization of brute force search algorithm with threading in C++
body: <p>I've been working on a brute force program in C++ that for the time being only deals with alpha numeric values (lower case only), and a password of unknown length.</p>
  
  <p>I'm working with a quad core computer so I've broken the list of possibilities into four sections and have one thread working on each. </p>
  
  <p>The sections are:</p>
  
  <pre><code>000...0 to 8zz...z
  900...0 to hzz...z
  i00...0 to qzz...z
  r00...0 to zzz...z
  </code></pre>
  
  <p>Could I make better use of threading to increase the speed?  Since only 1 of 4 threads will ever reach the password it feels like 3/4 of the program is a waste of time. </p>
  
  <p>It would seem that if I could have the threads work together somehow it would be more efficient, however I can't seem to think of a way to do this. </p>
  
  <p>Any advice is much appreciated, I'm quite new to threading. </p>
  
  <p>*<em>EDIT: I should clarify that because it's a fairly simple program for academic purposes, I am actually only cracking one password, and giving the signal to kill the remaining 3 threads once one finds it. *</em></p>