Skip to main content

Sponsors

Distributed Parallel Reversi in Java: You have Dual-Core? Quad-Core Processors?

Posted in

Let's catch up with the technology trends on multi-core processors. If you have bought a dual-core, or quad-core, or a large shared memory parallel machine, or a cluster of computers, then you can run this Distributed Parallel Reversi, xversi-java-parallel-v0.8b, to make them busy.

Running Distributed Parallel Reversi: Step-by-step

  1. Launch a server in each of your machines that will provide reversi evaluation services.
    • xman@sai xversi-java-parallel-v0.8b # java -Djava.security.policy=xversi.policy XversiEval localhost 9394
      Registered XversiInterface
    • localhost: Machine name, or its IP.
    • 9394: Port number for the client to connect to. Remember to set your firewall to allow this port.
  2. Setup a machine info file called nodeinfo.txt.
    • xman@sai parallel # cat nodeinfo.txt
      2
      localhost:9394
      localhost:9394
    • 2: There are 2 entries about machine information.
    • localhost: Machine name or its IP. I include two identical lines because I'm running this on a dual-processor or dual-core processor machine. This will make the parallel reversi to utilize the two processors in the system.
  3. Launch the Java Applet.
    • xman@sai parallel # appletviewer -J-Djava.security.policy=xversi.policy test.html
      Number of Node : 2
      before lookup
      Node 0 localhost:9394
      name 0 //localhost:9394/xversiInterface
      Node 1 localhost:9394
      name 0 //localhost:9394/xversiInterface
      after lookup
    • I've forgotten how do you specify the policy to a browser to launch the Java applet. TELL ME IF YOU KNOW! ;)

Notice that in picture below, two processors in the system are running at full speed to evaluate different moves at the same time. :) Hence, if you bought a dual-core, quad-core, ... or even a cluster of computers, enjoy the benefit of parallel computing. :) Ideally it will run N times faster with N processors.

Click to see larger picture

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.