Three-Dimensional Hypercube |
          |
Four-Dimensional Hypercube |
|
Five or more Dimensions...    FORGET IT! |
3-D Hypercube |
    |
|
Four-Dimensional Hypercube |
Three-Dimensional Hypercube |
  |
Adjacent nodes differ by one binary digit. |
Three Dimensional Hypercube |
        |
Source Node:     2 = 0 1 0 Destination Node:     7 = 1 1 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
    ( Initial) |
Tasks A, B, and C are on nodes 2, 4, and 5 respectively and will wait appropriate times before moving.
|
A moves at 1.2 B moves at 2.3 C moves at 3.1 |
|
Task A moves to node 3, NEXT EVENT (move) for A
scheduled at 2.4 (current time + wait time)
|
B moves at 2.3 A moves at 2.4 C moves at 3.1 |
|
Task B checks node 5, but discovers it is BLOCKED by C
Task B moves to node 6, NEXT EVENT for B scheduled at 4.6 |
A moves at 2.4 C moves at 3.1 B moves at 4.6 |
|
Task A moves from node 3 to node 7, NEXT EVENT for A at
3.6
        (Note: A will sit blocking node 7 until clock=3.6) |
C moves at 3.1 A moves at 3.6 B moves at 4.6 |
|
Task C checks node 7, NODE BLOCKED (by A), cannot move
        (Task C goes into "sleep mode" and must WAIT until clock = 3.61, the time when the blocking task is finished and it receives WAKEUP message) |
A moves at 3.6 C wakes at 3.61 B moves at 4.6 |
|
Task A finishes and frees node 7, node 7 sends WAKEUP message to C at 3.61
        |
C wakes at 3.61 B moves at 4.6 |
|
Task C wakes up and moves to node 7 (it has been in WAIT mode since
clock=3.1) Task C will sit there until Clock = 6.71 (3.61 current + 3.1 wait time)
        |
B moves at 4.6 C moves at 6.71 |
|
Task B tries to access node 7, but it is BLOCKED. B goes into "sleep mode" and must wait until clock = 6.72
|
C moves at 6.71 B wakes at 6.72 |
|
Task C frees up node 7 and sends wake up call to B at clock = 6.72
|
B wakes at 6.72 |
|
Task B wakes up and moves to node 7. Next event is at 9.02 when B is
finished with node 7 and leaves the system.
| B moves at 9.02 |
|
Task B fished with node 7. Simulation is over and Event List is empty.
| (empty) |
The program should also reflect Object Oriented Programming (OOP) design.
Although it is possible to generate the output of the simulation using a procedural
approach without ever building objects such as the hypercube with tasks on the
various nodes, and those nodes being aware of only thier own direct links, make
sure your design utilizes strong OOP design skills.
Extra Credit Challenge:
Create a Graphical Representation of the simulation in
OpenGL or Java.