# Data Link Layer in OSI Model

Below are some common GATE CS topics of data link layer.

**Carrier Sense Multiple Access (CSMA)**

Carrier Sense Multiple Access or CSMA method was developed to minimize the probability of collision and thus, to increase the performance. The probability of collision can be minimized if a station senses or reads the medium before trying to use it for sending data. CSMA is based on the principle of sensing before transmitting.

**CSMA/CD (Carrier sense multiple access with collision detection)**

The CSMA method does not tells us what to do in case there is a collision. Carrier sense multiple access with collision detection (CSMA/CD) adds on to the CSMA algorithm to deal with collision. For CSMA/CD to work, we need a particular frame size. Before sending the last bit of the frame, the sending station must detect a collision, if any, and abort the transmission because the station, once the entire frame is sent, does not keep a copy of the frame and does not monitor the channel for collision detection.

In CSMA/CD, the size of a frame must be large enough so that collision can be detected by sender while sending the frame. So, the frame transmission delay must be at least two times the maximum propagation delay.

T_{t}>= 2*T_{p}

Here T_{t} is transmission delay and T_{p} is propagation delay.

T_{t}= S/B

Here S is size of frame and B is bandwidth or transmission speed.

T_{p}= L/P

Here L is distance between the farthest nodes and P is propagation speed, putting above values we get

S/B >= 2*(L/P) Frame size 'S' should be S >= 2BL/P Or cable length 'L' should be L <= SP/2B

Example: A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation time including the device delays is 25.6 µs, what is the minimum size of the frame?

Solution: Frame Transmission Time, T_{t} = 2 * T_{p} = 2 * 25.6 = 51.2 µs

Minimum frame size, S = 10 Mbps * 51.2 µs = 512 bits = 64 bytes

Below questions have been asked in previous GATE exam on above topic.

GATE | GATE CS 2003 | Question 90

GATE | GATE-CS-2005 | Question 74

GATE | GATE CS 2013 | Question 65

GATE | GATE CS 2015 Set 3 | Question 65

**CRC (Cyclic Redundancy Check)**

Please refer this for examples and detailed explanation.

GATE | GATE-CS-2007 | Question 68

GATE | GATE CS 2009 | Question 48

Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: **DSA Self Paced**. Become industry ready at a student-friendly price.

## Recommended Posts:

- Walk-Through DSA3 : Data Structures and Algorithms Online Course by GeeksforGeeks
- First element of every K sets having consecutive elements with exactly K prime factors less than N
- Sorting algorithm visualization : Insertion Sort
- Check if row-major order path of Matrix is palindrome or not
- Generate an array of given size with equal count and sum of odd and even numbers
- Dropbox - An Introduction
- Escape Sequences in Java
- Minimum number of blocks required to form Hollow Rectangular Prism
- Visibility Modes in C++ with Examples
- Python | Pattern Generation using time() module
- AMCAT Mock Paper | Verbal Aptitude 2
- AMCAT Mock Paper | Quantitative Aptitude 4
- AMCAT Mock Paper | Quantitative Aptitude 5
- AMCAT Mock Paper | Quantitative Aptitude 1