Open In App

Line Discipline in Data Link Layer

Line Discipline is function of Data link layer. It simply determines and identifies the direction of communication. It is simply process of coordinating half-duplex transmission i.e. data can be transmitted in both directions on network of data communication but not at the same time just by establishing and developing continuity among sender and receiver stations before transfer of data. It also makes sure that whether or not receiver is ready to accept or signal sender to start. Line discipline is generally sequence of various operations of network among devices that usually transfers and receives data, controls errors occurred during the transmission, deals with message sets sequence, and also ensures confirmation that data is being received. It is also used to determine which of device can transfer or transmit, and when it can transfer data.

Terminal drivers contain an internal interface to line discipline modules, which interpret input and output. In canonical mode, the line discipline converts the raw data sequence typed at the keyboard to a canonical form before sending the data to the receiving process; the line discipline also converts the raw output sequences written by a process to a format that the user expects. In raw mode, the line discipline passes data between processes and the terminal without such conversions.



Functions of a Line Discipline

Methods for Line Discipline

There are basically two ways of doing Line discipline as given below:

ENQ/ACK (Enquiry/Acknowledgement)

ENQ/ACK is a procedure of line discipline that is generally used to determine that which of device on network is capable of initiating or starting transmission of data or message and whether the receiver is ready and is capable to receive the data or not. If the hosts have similar and equal ranks, then either of hosts or stations can initiate process of transmission. The initiating device generally establishes session in both transmission i.e. full and half-duplex. Both of devices can send or transmit simultaneously once session is established in full-duplex. But in full-duplex, initiator transmits data whereas responder simply waits. The responder further might take over link when initiator is finished or simply has requested for the response.



Poll/Select

The Poll/Select method in line discipline basically works with some topologies where one of devices is considered as primary station and other devices are considered as secondary stations. Multipoint connections can be seen rather than two i.e., multipoint systems must coordinate several nodes. When primary station wants to transmit something to secondary station i.e. downstream, then Select mode is used. To solicit (ask for obtaining) transmission from secondary to primary i.e. upstream, then Poll mode is used. The primary device basically controls and handles link or connection and on the other hand, secondary device simply follows its instructions.

Article Tags :