Data Link Layer Access Control: Medium Access Protocols with Worked Examples

Understand where access control sits inside the MAC sublayer, compare random, controlled and channelized access, and solve the ALOHA and CSMA/CD calculations students commonly mix up.

KnowledgeGate Team

Exam prep & CS education

Updated 4 Aug 20266 min read

When many devices share one wire or radio channel, who gets to transmit, and when? Students often memorise ALOHA, CSMA and CSMA/CD as a list, then freeze when a question asks for throughput or minimum frame size. Both answers are short: pure ALOHA cannot carry more than 18.4 percent of the channel and slotted ALOHA no more than 36.8 percent, and a CSMA/CD frame must stay in transmission for a full round trip, which at 10 Mbps over 2 km means 200 bits.

On a shared or broadcast link, such as old bus Ethernet, Wi-Fi or a satellite uplink, two stations may transmit at the same time. Their signals overlap, causing a collision that corrupts both frames. Access control provides the rules that avoid such collisions or handle them after they occur.

The data link layer has Logical Link Control (LLC) above Medium Access Control (MAC). Access control belongs to the MAC sublayer, so DLL access control, MAC protocols and multiple-access protocols refer to the same syllabus area.

Some protocols allow contention and recover from collisions. Others grant turns or divide the channel into fixed shares.

The three families of medium access control

  1. Random access: No station has priority. Each decides when to send, so collisions are possible. Pure ALOHA, slotted ALOHA, CSMA, CSMA/CD and CSMA/CA belong here. This approach is simple at low load but suffers as contention rises.

  2. Controlled access: Stations coordinate, and only the one with permission transmits. Reservation, polling and token passing are orderly and collision-free, but coordination adds overhead.

  3. Channelization: The medium is divided by frequency, time or code. FDMA, TDMA and CDMA give predictable access, but an assigned share may sit idle when its station has nothing to send.

Tree diagram grouping medium access control into random access, controlled access, and channelization, each with its protocols.

Random access protocols and the ALOHA throughput result

Random-access methods become progressively more careful:

  • Pure ALOHA sends immediately. If no acknowledgement arrives, the station waits randomly and retries. Its vulnerable time is two frame-times.

  • Slotted ALOHA permits transmission only at slot boundaries, reducing the vulnerable time to one frame-time.

  • CSMA listens before sending. In 1-persistent CSMA, a station sends as soon as the channel is idle. Non-persistent CSMA waits randomly before sensing again. In p-persistent CSMA, it sends with probability p in a slot.

  • CSMA/CD also listens while sending and aborts when it detects a collision on wired Ethernet. CSMA/CA uses inter-frame gaps and random back-off to reduce collisions on Wi-Fi, where reliable collision detection is impractical.

For offered load G, measured in average attempted frames per frame-time, pure ALOHA throughput is S = G x e^(-2G). Its peak occurs at G = 0.5:

S_max = 0.5 x e^(-1) = 0.5 x 0.3679 = 0.184, or about 18.4 percent.

Slotted ALOHA uses S = G x e^(-G). Its peak occurs at G = 1:

S_max = 1 x e^(-1) = 0.3679, or about 36.8 percent.

At the same load G = 0.5, pure ALOHA still gives 0.184. Slotted ALOHA gives 0.5 x e^(-0.5) = 0.5 x 0.6065 = 0.303, or about 30.3 percent. Slotted ALOHA beats pure ALOHA at every load, not only at its peak, because dividing one formula by the other leaves e^G, which exceeds 1 for any positive G.

Offered load G

Pure ALOHA, S = G x e^(-2G)

Slotted ALOHA, S = G x e^(-G)

0.5

0.184 (its peak)

0.303

1.0

0.135

0.368 (its peak)

Read the second row. At G = 1 pure ALOHA has already slid past its peak to 1 x e^(-2) = 0.135, or 13.5 percent, while slotted ALOHA is exactly at its best. Past the peak, more offered load destroys throughput instead of adding it.

Worked example: CSMA/CD minimum frame size

Collision detection works only if the sender is still transmitting when a worst-case collision returns from the far end. Therefore, frame transmission time Tt must be at least the round-trip propagation time, 2 x Tp.

Suppose bandwidth B = 10 Mbps = 10^7 bits/s, cable length d = 2 km = 2000 m, and propagation speed v = 2 x 10^8 m/s.

  1. One-way delay: Tp = d / v = 2000 / (2 x 10^8) = 1 x 10^(-5) s = 10 microseconds.

  2. Round-trip delay: 2 x Tp = 20 microseconds.

  3. Required transmission time: Tt >= 20 microseconds.

  4. Minimum length: L = Tt x B = (20 x 10^(-6)) x (10^7) = 200 bits = 25 bytes.

A frame shorter than 200 bits could finish before a far-end collision reaches the sender. The sender would wrongly assume success, which is why Ethernet needs a minimum frame size. Real 10 Mbps Ethernet sets that minimum at 512 bits, or 64 bytes, because the standard permits a worst-case path far longer than 2 km.

In the simplified exam model, define a = Tp / Tt and maximum efficiency as 1 / (1 + 2a). At minimum size, Tt = 2Tp, so a = 0.5 and efficiency = 1 / (1 + 2 x 0.5) = 1/2 = 50 percent. If Tt = 10Tp, then a = 0.1 and efficiency = 1 / 1.2 = 0.833, or about 83.3 percent. Longer frames use the wire better. Treat it as a ceiling, not a prediction: it assumes the winner then transmits undisturbed, so a busy segment sits below it once back-off eats slot times.

Space-time diagram of a CSMA/CD collision between two stations 2 km apart, showing the round trip that sets the minimum frame size.

Controlled access and channelization

Reservation divides time into intervals with mini-slots in which stations claim later transmission slots. Polling lets a primary station ask each secondary whether it has data, but poll messages cost time and the primary is a single point of failure. Token passing circulates a special frame around a logical ring. Only its holder transmits, making access fair and collision-free, though token loss requires recovery.

With FDMA, each station gets a frequency band continuously. With TDMA, each gets the full band during a repeating time slot. With CDMA, all stations use the full band at the same time but have distinct orthogonal codes. A receiver recovers one station's data by correlating the incoming signal with that station's code.

The Computer Networks module in GATE Guidance by Sanchit Sir covers this syllabus area lesson by lesson.

Common traps and misconceptions

  • Swapping ALOHA maxima: Pure ALOHA peaks at G = 0.5 with 18.4 percent. Slotted ALOHA peaks at G = 1 with 36.8 percent, exactly twice the pure maximum.

  • Losing the factor of two: CSMA/CD needs Tt >= 2Tp, not Tp, because the collision indication must travel back to the sender.

  • Confusing CD and CA: CSMA/CD detects collisions on wired Ethernet. CSMA/CA tries to avoid them on Wi-Fi.

  • Calling channelization collision handling: FDMA, TDMA and CDMA prevent overlap by design. They do not detect a collision and back off.

  • Mixing units: Convert kilometres to metres, Mbps to bits per second, and microseconds to 10^(-6) seconds before calculating.

How GATE and interviews test this

GATE questions commonly ask you to calculate ALOHA throughput from G, to find CSMA/CD minimum frame size from bandwidth and propagation delay, or to name a protocol from a description of its behaviour. Medium access control sits under the Data Link Layer in the official GATE Computer Science and Information Technology syllabus, and the marks it carries vary from cycle to cycle, so check the weightage in the current official notification.

Interviews often ask why Ethernet needs a minimum frame size, why Wi-Fi uses CSMA/CA, or how token passing compares with CSMA/CD under heavy load. Token passing stays bounded and fair, while contention-based access degrades as collisions increase.

One layer up, the network layer swaps contention for addressing arithmetic, drilled in Computer Networks Subnetting MCQs. Above that, the transport layer stops asking who may transmit and starts asking how fast to push, traced in TCP Congestion Control for GATE.

The short version and your next step

Access control lives in the MAC sublayer. Its three families are random access, controlled access and channelization. Know the ALOHA maxima, 18.4 percent at G = 0.5 for pure and 36.8 percent at G = 1 for slotted, plus the CSMA/CD rule Tt >= 2Tp. In our example, that rule gives 200 bits at 10 Mbps over 2 km.

Take GATE Guidance by Sanchit Sir for the whole computer-networks sequence taught in order. If your concepts are solid and only the numericals are slow, the GATE Test Series on its own gives the timed practice.