CS 573

HW 3

Due Friday, April 30, 2004

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...

  1. 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:
    two switch boxes in a row
    can do exactly the same thing as a single 2x2 switchbox.

  2. Draw a picture of a 27x27 Benes network made of 3x3 switchboxes.

  3. 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:

  4. don't panic that you haven't seen this yet. You'll see it Real Soon Now.

    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.


Last modified: Mon Apr 26 08:47:20 MDT 2004