Results 1 to 2 of 2
  1. #1
    w0st is offline Member
    Join Date
    May 2012
    Rep Power

    Default Simulation network of processors in java

    I must do one more simulation in Java.
    A part of this simulation is allocation new processes in processors dependents of algorithm.
    I think about below logic conception:

    Java Code:
    class Processor
            Queue<Process> queue; // processes come up in concrete moment 
            //(when process.getTime() == time, where time is increments per cycle  )
            Set<Process> running; // running processes on the processor
            Set<Process> waiting; // store processes, which can't add to running, because load on processor > 100%
            int time;
            int load;
                 // decrease timeToLife every processes in running
                         // if process.timeToLife == 0 then the process is delete from running
                  // while(!waiting.isEmpty && this.overload + p.load (p from waiting) < 100)
                  //         move p from waiting to running
                  // p = fetch process from queue (if process.getTime() in queue == time)
                  // The algorithm should randomize other processor pOther (max. k times) 
                  // and send there process p if (pOther.load < threshold) to processor pOther(migration) , else add to this processor
                  // HELP ME HERE with communicate with another processors involve to migration process
                  // if process will run on this processor (above migration is  not succeed) and this.overload + process.overload > 100%      
                  // then process --> waiting, else process --> running
    In my simulation is many objects of Processor.
    I don't know how effectively deliver communication between processors. I want implement this and another(similar) algorithms in class Processor, and I want to avoid looping reference (class a-> b and b->a)

    My English isn't too good, so sorry and thank you for reading this topic.

    Small introduction to the problem is here: (page from 197)
    Last edited by w0st; 05-09-2012 at 02:18 AM.

  2. #2
    quad64bit's Avatar
    quad64bit is offline Moderator
    Join Date
    Jul 2009
    Rep Power

    Default Re: Simulation network of processors in java

    Don't these distributed systems generally have a host controller than manages to some extent the communication between nodes? Or does this system need to be totally decentralized?

Similar Threads

  1. Water Fluid Simulation for Java
    By CuppaCoffee in forum New To Java
    Replies: 0
    Last Post: 04-05-2012, 05:14 AM
  2. PeerSim P2P simulation based on JAVA
    By aditya149149 in forum Threads and Synchronization
    Replies: 0
    Last Post: 08-24-2011, 11:16 PM
  3. Simulation of a Network architecture
    By m4enigma in forum Advanced Java
    Replies: 0
    Last Post: 04-04-2011, 04:55 PM
  4. Simulation in Java
    By Eranga in forum Advanced Java
    Replies: 15
    Last Post: 08-15-2010, 04:32 AM
  5. Small tennis simulation in Java
    By diego in forum New To Java
    Replies: 1
    Last Post: 12-02-2007, 01:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts