The Medium Access Sub-Layer (MAC) is a part of the Data Link Layer in computer networks. It controls how multiple devices share a common communication channel.
For example, if 10 computers are connected to the same network cable, all computers cannot transmit data at exactly the same time. The MAC sub-layer decides who can use the channel and when.
There are two major approaches:
- Static Channel Allocation
- Dynamic Channel Allocation
1. Static Channel Allocation
In static channel allocation, the available communication channel is divided among users in advance.
Each user gets a fixed portion of the channel, regardless of whether they have data to send or not.
Example
Suppose there are 4 computers sharing a network:
- Computer A → 25% of channel
- Computer B → 25%
- Computer C → 25%
- Computer D → 25%
Even if Computer A has no data to send, its 25% portion generally remains unused.
Common method: FDMA
FDMA (Frequency Division Multiple Access) divides the available bandwidth into different frequency bands.
For example:
Total Channel
------------------------------------------------
| User A | User B | User C | User D |
------------------------------------------------
F1 F2 F3 F4
Each user gets a separate frequency range.
Advantages
- Simple to implement.
- No major conflict between users.
- Each user gets a predictable portion of the channel.
- Suitable when traffic is continuous and predictable.
Disadvantages
- Channel capacity can be wasted.
- If one user has no data, its allocated portion may remain unused.
- Not suitable for bursty or unpredictable traffic.
- Less efficient when the number of active users changes frequently.
2. Dynamic Channel Allocation
In dynamic channel allocation, the channel is not permanently assigned to users.
Users compete for or request access to the channel when they have data to transmit.
The channel is allocated according to the current traffic.
Example
Suppose four computers share one channel:
Computer A ──┐
Computer B ──┤
Computer C ──┼── Shared Channel
Computer D ──┘
If only Computer B has data, it can use most or all of the available channel.
When Computer B finishes, another computer can use the channel.
Common techniques
Dynamic channel allocation is used in protocols such as:
- ALOHA
- Slotted ALOHA
- CSMA
- CSMA/CD
- CSMA/CA
These techniques determine when a device should transmit and how to handle collisions.
Static vs Dynamic Channel Allocation
| Feature | Static Allocation | Dynamic Allocation |
|---|---|---|
| Channel assignment | Fixed | Changes according to demand |
| Allocation | Done in advance | Done when required |
| Flexibility | Low | High |
| Channel utilization | Can be low | Generally higher |
| Wastage | More likely | Less likely |
| Suitable for | Continuous traffic | Bursty traffic |
| Complexity | Simple | More complex |
| Example | FDMA, TDMA | ALOHA, CSMA |
| Collision possibility | Generally low | Possible |
Simple Example for Students
Imagine 4 students sharing one microphone.
Static allocation
Each student gets 5 minutes, whether they have something to say or not.
Student A → 5 min
Student B → 5 min
Student C → 5 min
Student D → 5 min
If Student C has nothing to say, those 5 minutes may be wasted.
Dynamic allocation
A student gets the microphone when they actually have something to say.
A → speaks
C → speaks
A → speaks
D → speaks
B → speaks
This uses the microphone more efficiently.
Key Point to Remember
Static Channel Allocation = Fixed sharing of the channel.
Dynamic Channel Allocation = Sharing the channel according to current demand.
Exam Definition
Static Channel Allocation:
Static channel allocation is a technique in which the available communication channel is divided and permanently assigned among users before communication begins.
Dynamic Channel Allocation:
Dynamic channel allocation is a technique in which channel access is assigned to users dynamically according to their current communication requirements.
In short:
Static → Fixed allocation → Possible wastage
Dynamic → Demand-based allocation → Better utilization
