I really hate to give you another assignment while I'm still sitting on one I've already given you, but I really want you to have this...
Show that an 8x8 Benes network made out of 2x2 switchboxes is
topologically equivalent to two 8x8 dynamic hypercube networks set
back-to-back (so you've got one 8x8 dynamic hypercube network,
with its outputs feeding into a mirror image of itself). To do
this, you'll need to observe that two 2x2 switchboxes in a row
like this:
can do exactly the same thing as a single 2x2 switchbox.
Draw a picture of a 27x27 Benes network made of 3x3 switchboxes.
Using the notation I used for memory operations, show that there is a possible interleaving that results in the following incorrect two-processor mutual exclusion algorithm failling (i.e. either both processes enter the critical section simultaneously, or they get stuck so neither can ever enter):
turn = 1-i;
flag[i] = true;
while (flag[1-i] && (turn == (1-i))) ;
A couple of notes:
i appearing in the code is not a variable
- it's a constant, which is equal to 0 on processor 0 and
equal to 1 on processor 1
The following is are eight bit binary numbers with error correcting codes and parity, in the order M8 M7 M6 M5 C8 M4 M3 M2 C4 M1 C2 C1 P. Show that one of them is correct, one has a one-bit error, and one has a two-bit error. In the case of the one with the one-bit error, correct the error.