Investigative Activities Victor Norman IS333 / CS332

advertisement
Investigative Activities
Victor Norman
IS333 / CS332
How does a learning switch work?
• Form a group of 4 or 5.
• Elect one student to be the switch, and sit in the middle.
• Other students are the computers connected to each other
via the switch.
• Computers: huddle up and elect unique names for
yourselves, without telling the switch the names you’ve
selected. Do not use your regular parent-given names.
• Keep a list of each others’ names available, perhaps on a
piece of paper.
Problem: allow all computers connected to the switch to
communicate efficiently with each other.
Rules
•
•
•
Computers cannot talk to each other directly – they must communicate via the
switch in the middle.
Computers do not know that they are connected to each other via a switch. They
just know they can talk to other computers through their ethernet connections.
Each time a computer wishes to talk (via the switch), it must tell the switch 1) who
it is, and 2) who it sending this message to.
– e.g., “I am Juliet, and this message is for Romeo: “wherefore art thou?”
•
•
•
•
•
The switch in the middle must allow communication between any pair of
computers.
The switch can copy messages and send them out to multiple computers.
The switch must maintain the illusion that all computers can talk directly to each
other – like on a bus.
The switch can use paper and pen to keep track of stuff.
The switch is passive – it does *NOT* generate any messages of its own.
Goals: come up with the algorithm to solve this problem, in a way that is as efficient as
possible – i.e., don’t waste time sending messages that don’t need to be sent to
computers that don’t care, if possible.
Thoughts…
• What if a computer leaves? What if a new
computer comes in?
• What if a new computer (with a new name)
replaces an old computer?
• What if a computer moves to a new location
around the outside?
Download