Media access control refers to the need to control when computers transmit. With point-to-point full-duplex configurations, media access control is unnecessary because there are only two computers on the circuit and full duplex permits either computer to transmit at any time.
Media access control becomes important when several computers share the same communication circuit, such as a point-to-point configuration with a half-duplex configuration that requires computers to take turns, or a multipoint configuration in which several computers share the same circuit. Here, it is critical to ensure that no two computers attempt to transmit data at the same time—but if they do, there must be a way to recover from the problem. There are two fundamental approaches to media access control: controlled access and contention.
Most computer networks managed by a host mainframe computer use controlled access. In this case, the mainframe controls the circuit and determines which clients can access media at what time.
Polling is the process of sending a signal to a client (a computer or terminal) that gives it permission to transmit or asks it to receive. With polling, the clients store all messages that need to be transmitted. Periodically, the server (usually a mainframe computer) polls the client to see if it has data to send. If the client has data to send, it does so. If the client has no data to send, it responds negatively, and the server asks another client if it has data to send.
In other words, polling is like a classroom situation in which the instructor calls on the students who raise their hands. The instructor acts like the server. To gain access to the media, students raise their hands and the instructor recognizes them so they can contribute. When they have finished, the instructor again takes charge and allows someone else to comment.
There are several types of polling. With roll-call polling, the server works consecutively through a list of clients, first polling client 1, then client 2, and so on, until all are polled. Roll-call polling can be modified to select clients in priority so that some get polled more often than others. For example, one could increase the priority of client 1 by using a polling sequence such as 1, 2, 3, 1, 4, 5, 1, 6, 7, 1,8, 9.
Typically, roll-call polling involves some waiting because the server has to poll a client and then wait for a response. The response might be an incoming message that was waiting to be sent, a negative response indicating nothing is to be sent, or the full "time-out period" may expire because the client is temporarily out of service (e.g., it is malfunctioning or the user has turned it off). Usually, a timer "times out" the client after waiting several seconds without getting a response. If some sort of fail-safe time-out is not used, the system poll might lock up indefinitely on an out-of-service client.
With hub polling (often called token passing), one computer starts the poll and passes it to the next computer on the multipoint circuit, which sends its message and passes the poll to the next. That computer then passes the poll to the next, and so on, until it reaches the first computer, which restarts the process again.
Contention is the opposite of controlled access. Computers wait until the circuit is free (i.e., no other computers are transmitting) and then transmit whenever they have data to send. Contention is commonly used in Ethernet LANs.
As an analogy, suppose that you are talking with some friends. Each person tries to get the floor when the previous speaker finishes. Usually, the others yield to the first person who jumps in at the precise moment the previous speaker stops. Sometimes two people attempt to talk at the same time, so there must be some technique to continue the conversation after such a verbal collision occurs.
Figure 4.1 Relative response times
Which media access control approach is best: controlled access or contention? There is no simple answer. The key consideration is throughput—which approach will permit the most amount of user data to be transmitted through the network.
In general, contention approaches work better than controlled approaches for small networks that have low usage. In this case, each computer can transmit when necessary, without waiting for permission. Because usage is low, there is little chance of a collision. In contrast, computers in a controlled access environment must wait for permission, so even if no other computer needs to transmit, they must wait for the poll.
The reverse is true for large networks with high usage: controlled access works better. In high-volume networks, many computers want to transmit, and the probability of a collision using contention is high. Collisions are very costly in terms of throughput because they waste circuit capacity during the collision and require both computers to retransmit later. Controlled access prevents collisions and makes more efficient use of the circuit, and although response time does increase, it does so more gradually (Figure 4.1).
The key to selecting the best access control technique is to find the crossover point between controlled and contention. Although there is no one correct answer, because it depends on how many messages the computers in the network transmit, most experts believe that the crossover point is often around 20 computers (lower for busy computers, higher for less-busy computers). For this reason, when we build shared multipoint circuits like those often used in LANs or wireless LANs, we try to put no more than 20 computers on any one shared circuit.