Question for Thought: Satellites
Satellites are very high bandwidth, very high latency communication channels that are exposed to thousands of kilometers of highly variable environmental noise.
Athough the antennas on the ground can all communicate with the satellite, they cannot necessarily hear each other. This, by itself, makes the use of a broadcast-based multicast scheme unsuitable for the uplink from the ground stations to the satellite. But, let's forget about reality for a moment.
Let's make the reality-contradicting, blatently-false, obviously-wrong assumption that the ground stations communicating with the satellite can all hear each other. Would it make sense to use a CSMA/CD scheme to manage contention for the uplink bandwidth?
Satellites can support bit rates in the gigabit/second range. Latency is typically about 270mS -- 1/4 second. Consider the bandwidth-delay product -- the frame size would have to be in the hundreds of megabytes-to-gigabytes per second range. This seems funky on its face, especially if smaller messages need to be sent. But, now consider the impact of noise periodically whacking at those huge messages. Keep in mind that the liklihood of a frame being garbled in transit is proportional to its size. This is just simple probability -- the bigger the target the more likely it is to be hit.
Clearly satellites don't use CSMA/CD. They use timedivision, and possibly also frequency division. Very few users could realistically make productive use of all of a satellite's capacity at once, anyway, even during a burst.
Question for Thought: Ad Hoc Wireless Networks
Consider a collection of computers, for example on campus, forming an ad hoc wireless network. By an ad hoc network, I mean one that is self-organizing based on which laptops happen to be in radio range of each other, rather than one that is structured in advance, whether by human or algorithmic design.
Think about the laptops as radio transmitters that can talk to other laptops within some small radius. But, rememebr that because of hills, valleys, buildings, cars and trucks, &c the exact radius isn't perfect or predictable. Would it make sense for these laptops to communicate using CSMA/CD? What about just CSMA, without CD?
Nope, and nope. You could sense carrier -- but the value would be limited. Just because the Sender hears chatter doesn't imply that the intended Recipent also hears the same chatter -- the source could be closer to the Sender than the Receiver. Similarly, the value of listening is further reduced given that the Receiver might be disturbed by chatter that is too far away from the Sender to be noticed by the Sender.
As far as collision detection is concerned, the same is true. Maybe any noise matters to the receiver. Maybe it doesn't. Why stop? And, if one stopped at the sound of any noise, given that it isn't transitive, consider how much this limits the opportunity to send.
Multiple Access with Collision Avoidance (MACA)
In order to address the collision problem in wireless networks, such as the one described above, whether or not they happen to be ad hoc, we can make use of Multiple Access with Collision Avoidance (MACA). Since, as described above, we can't listen to determine if we are likely to succeed in sending to the intended recipient, MACA takes a less nosy, more direct approach -- the sender asks.
The sender sends a Request To Send (RTS) message to the intended recipient. If it doesn't hear back, it assumes that there is a collision and backs off. If it does get back a Clear To Send (CTS), then it goes ahead.
Any node that hears the RTS should remain quiet to avoid colliding with the CTS. Similarly, any node that hears the CTS should remain quiet until the entire message is sent. In order to enable this, each RTS contains the size of the message -- this lets those hearing the CTS know how long to remain quiet.
Notice that it is a transmission from the sender that squenches those near the sender and the transmission from the receiver that squenches those near the receiver. This keeps the two collision domains separate.
This protocol is an avoidance protocol, because it is proactive about avoiding collisions, rather than only managing them after-the-fact. None-the-less, collisions might still occur -- stations can move around, for example. This, in addition to other type of loss, make an ACK a reasonable extension, such as is the case in the more sophisticated MACAW protocol.
Cellphones and the Global System for Mobile Communications (GSM)
Consider the communication between individual cellphones and the tower that connects them to the wired network. These cellphones are all within range of the tower -- but not necessarily within range of each other. Since voice communications requires a fixed amount of bandwidth, the bandwidth that needs to be reserved for each call is constant, not bursty.
This sounds like a textbook case for a time-division protocol. But, we've got a complication. How do the time slots get assigned? In traditional, wired networks, all of the players are known in advance -- the assignment is static and a priori. But, in this case, only a few phones will be talking to a tower at any point in time -- and we don't know which ones. We surely don't have enough netowrk time on a particular tower to carve out a timeslice for each-and-every phone in existence. So, how can we make a dynamic assignment.
Phones request a reservation using a broadcast protocol on one channel. The tower replies, on a different broadcast channel with an assignment that places the call on a particular voice channel with a particular time slice. In this way, we are using broadcasting to manage calls, as well as frequency division to carve the frequency space into channels, and time division to divy up each channel.
The end result is that the calls, which require consistent network capacity get it. Yet, we can dynamically assign it, to allow for the bursty nature of calls. As a side benefit, the fact that many phones may be able to hear the communication from the tower with regard to assignments enables them to maintain an understanding of the load at each of the nearby towers, enabling smarter handoffs.
Black Magic: Code Division Multiplexing (CDMA)
Sometimes in the real world, technology is so fascinating as to appear to be magic. Code Division Multiplexing (CDMA) is one such example. CDMA is a collision-based protocol. In other words, it is a technique which not only survives in light of collison -- but thrives with it.
CDMA allows virtually any number of stations to trasnmit at exactly the same time, while allowing the reciepient to sort out what each party is saying. There isn't actually any magic. But, as we'll see, there surely is a lot of precision required.
Here's how it works. Some careful math generates a number that serves as a station identifier. It is called a chip sequence. When a sender wants to send a 1-bit, it simply sends this chip sequence. When it wants to send a 0-it, it sends the compliment of this sequence. The world is carefully configured such that all senders send at exactly the same time so that the corresponding 1's and 0's add linearly. The recipient can do some funny math to figure out what each sender actually sent. Basically, the reciever, which knows the chip sequences assigned to each sender, can run through the set of chip sequences, do some funny math, and reverse the signal that it received to get back to the chipsequence, or complement, sent by each station.
But, there are some tricks:
- The chip sequence must be balance. That is, it must contain as many 1's as 0's.
- The chip sequence must be carefully chosen to work out with respect o to the funky math.
- The transmissions must all stack up, bit-for-bit on top of each other to combine linearly from the perspective of the recipient. This is accomplished by tuning the sender to a transmission of a well-known sequence fromt he receiver.
- The transmissions must all be equally powerful from the perspective of the receiver. This is accomplished by having the senders transmit with a power inversely proportional to the strenght with which they hear the receiver's transmissions.
- The processor must be able to do the math and decode the signals fast enough
For those who are interested, the icky math is shown below:
Recall that collision will result in the linear combination of chip sequences. The dot product of this linear combination of chip sequences and the sender's chip sequence will result in a 1 if the sender sent a 1 or a -1, otherwise. The other sequences balance out and become 0. The interesting chip sequence is multiplied by itself, or the compliment of itself, yielding 1 or -1. Consider 0101 vs 1010 vs 1100 vs 0011 vi 0110 vs 1001.