[hashcash] Re: freeBSD 5.3 compile problems

  • From: Jonathan Morton <chromi@xxxxxxxxxxxxxxxxxxxxx>
  • To: hashcash@xxxxxxxxxxxxx
  • Date: Wed, 12 Jan 2005 04:21:59 +0000

Adam> btw a simple way to get multi-cpu support would be to write a
Adam> simple shell script to spawn as many instances of hashcash as your
Adam> hyperthreads x cpus and wait for the first one to terminate then
Adam> kill the rest. As there is no need for communication between the
Adam> instances this should basically be just as effective. An exercise
Adam> for the reader...


I was just thinking about this yesterday. I think this is a good way to
go. I don't know if a shell script would be able to cut it, but it
should be simple to write a C program with some fork(2)s, wait(2)s and
kill(2)s. I should be able to whip up something soon (say, next week).


BTW, this is also a good solution from the point of view of clusters
(and distributed computing) because threads don't work too well under
those environments. Some (most?) clustering software can't even migrate
programs that use threads.

Eric mentioned the clustering question some time ago, and I thought up a basic protocol which could distribute the work among ordinary desktop PCs (without clustering software). I think I even managed to make it DoS resistant, in that performance would never get worse than if the PCs remained standalone.


All you need to do is broadcast a request packet every minute when you have work to do, while working on it yourself. Any PCs that hear it can choose to help. Requests that are not refreshed for more than 5 minutes are cancelled. Each PC *always* works on it's own requests in preference to others', but may then work on other requests in random order. Once a solution is found by any PC, it is also broadcast, being a signal for all PCs who hear it to cancel that request.

--------------------------------------------------------------
from:     Jonathan "Chromatix" Morton
mail:     chromi@xxxxxxxxxxxxxxxxxxxxx
website:  http://www.chromatix.uklinux.net/
tagline:  The key to knowledge is not to rely on people to teach you it.


Other related posts: