Está en la página 1de 4

CHAPTER 7

T 17A HALF DUPLEX AND FULL DUPLEX PROTOCOLS


Ordinarily data communication means that at any chosen time only one terminal is transmitting. Otherwise in a single channel point-to-point system, both the computers try to transmit simultaneously or in a multidrop system, if more than one terminal try to transmit together, the obvious result would be data collision, which is termed as bus contention. To prevent this, some line contro procedures are needed. Half duplex is on such procedure which can be used for point to point or multipoint system. 7.1 Point to Point:

The data are generally broken into blocks and transmitted serially. After each block is sent, next block is transmitted only after checking a back ward acknowledgement signal-acknowledge-ACK or NAK depending on whether earlier transmission was error free or not. The half duplex procedure employs this system, where on getting a NAK signal, the source transmits the last data block again. Use of 4 wire system is preferred for using half-duplex procedure because turn around of the modem is then avoided. Error free data communication is most desirable but in practice, it is very difficult to achieve. Data blocks corrupted due to noise hits. Receiving NAK signals from abstention and causes retransmission of the noise hit data block. Sometimes and ACK signal may itself get noise hit. The source computer senses a problem and requests the other end to retransmit. The blocks should be numbered properly to keep a trace and link-up the acknowledgement signals. The data transmission starts by the sender transmitting an ENQ signal. If the destination is ready, it sends ACK_O which will be sensed at the sender for data transmission. If destination is busy, it sends WACK (Wait ACK) signal. The diagram 7.1 shows a normal point to point block transfer. The figure shows that normal transmission occurs upto Block-3. But Block-4 is hit by a noise so, B sends NAK signal to A, which then retransmits Block-4. Block 5 does not arrive at B at all and so no acknowledgement returns. A now sends ENQ to which B responds with the last signal sent i.e., ACK-4 and retransmits Block-5. Same thing happens in the case of ACK-6. During transmission B becomes busy and unable to accept any more data, it sends a busy signal called WACK. A now sends ENQ to know whether B is still busy. If B is free it sends an acknowledgement which would have been sent if B was not busy. At the end of transmission, A sends EOT signal. If the destination does not want to receive, it may continuously send NAK after every ENQ transmitted. After a preset retry counter is exceeded the master sends EOT or else it may happen that ENQ is not received at the destination and after timeout the master will send ENQ. If this goes on repeatedly then after the preset retry counter is exceeded, EOT is sent by master. ENQ

ACK-O Block-1 ACK-1 Block-2 ACK-2 Block-3 ACK-3 Block-4 ACK-4 Block-5 ENQ ACK-4 Block-5 ACK-5 Block-6 ACK-6 ENQ ACK-6 Block-7 WACK ENQ ACK-7 Block-8 ACK-8 EOT 7.1 Point to Point Block Transfer.

7.2 Multipoint: In this system one station is designated master or control and the others are slave or secondary, which can transmit only when master permits. The data flow on the line is controlled by the master through a technique called polling, which is a process by which the sales are allowed to transmit data. Generally each of the salve station is asked sequentially whether it has got anything to transmit. The station transmits slave station is to have a unique address and priority can be assigned to the stations as desired. A poll request floated on the line will be available to all terminals connected the bus, but only the addressed one will respond to it. Polling needs a finite time to poll a terminal, receive NTR (which is normal if data is not there) and get ready to poll the next terminal. Thus ofter a station is polled, it takes some time to get a second poll for it. Naturally, when a station is ready for data transmission and when it gets polled is separated by some time delay which is known as polling delay Besides this, there may be a queuing delay, which is non-linear and increases exponentially when line load increases. This is due to message transactions by other terminals in the same poll. So, different terminals will have different polling delays. Fig. 7.2 shows a multi drop line.

Fig. 7.2 Multi drop line. If the number of terminals become many, then the system of specific polling i.e., polling the terminals individually will cause a much long polling delay. In this case, all the terminals clustered in a group are polled together. The group address is recognized by all the terminals of the group. The terminals who have messages to transmit informs the cluster controller, which then allows one terminals at a time to send messages. Thus only one poll is needed. The cluster controller may operate with an Intelligent Terminal Control Unit or through Daisy Chain principle. In the former system a flag is reserved to save the status of each terminal and whenever any terminal wants to transmit, its corresponding flag is set. Cluster controller transmits after checking the flags. When the master wants to transmit, it selects the terminal by an address which proceeds data. It can be done via fast selection process, in which the terminal must accept the message. But sometimes, this creates problem. If the terminal is already busy with some other job, it may be interfered with by the fast select data. So, a system of message waiting is to be employed. Computer EOT Poll Message NAK Message ACK EOT EOT Message Waiting ACK EOT Poll Send Message Waiting EOT Message ACK EOT b) Message waiting

a)

Input message transfer procedure for For terminal

ComputerTerminals

message to terminals.

Fig.7.3 Multi drop Half duplex. The terminal will know when a data comes from the master by an indicator and presses a message waiting button, when it is ready to receive. In the next poll after this button is pressed, computer gets send message waiting signal and transmits data by fast selection process.

Both the polled responses from the terminals and the select data from the master will be responded by ACK and NAK signals and the transmission will end with EOT as in the case of point communication. Half duplex operation for multidrop configuration can work in single thread or multithread system. In the former the communications line is held during the time when CPU processes information, so that output message can be immediately sent. After transaction is over for input 1, then only input 2 is taken. So, a lot of idle time is there for the transmission on line during processing and for computer during message transaction. In a multithread system, line and CPU operations are overlapped and naturally throughput is greater. The line is released during processing time, so that other inputs or outputs on the line can be handled. Another problem may arise in data transmission if the terminal is incapable of receiving data at a rate transmitted by CPU, data congestion would occur on line and this is the problem of flow control. Various data flow controls are available. One way is to have a message buffer in the terminal where fast select data will be stored. But this is limited by the buffer size. If the data is too long, the buffer will overflow and a NAK will be returned, until the buffer has a space, ACK will not come. The problem does not end here. There are dumb terminals which do not have a protocol. These can work by XON/XOFF technique or V.24 flow control. Former wants a full duplex line to enable the terminal to send control information while receiving data. When the terminal wants host to stop transmitting data, it send XOFF. Then when it is again ready to take data, it sends XON. V24 interface has signals Data Terminal Ready (DTR) and clear-to-send (CTS) which can be made ON/OFF to temporarily stop data from computer to terminal. 7.3 Full Duplex: If two independent communication links are available, then full duplex protocol can be used. Overlapping of messages in to and from directions are possible because there is no change contention of the line. Naturally, the throughput is much better compared to half-duplex variety. Loop delay has negligible effect on data transmission. Most multipoint lines prefer 4 wire lines and employ full duplex working. If acknowledgement signal comes for every block of data from terminal then speed will reduce because a block cannot be transmitted until acknowledgement comes for the earlier block. So, full duplex working is better utilised without acknowledgement signals. Several message blocks may also be sent before any response comes back. As in this case the data block and its response are offset, they should be numbered to match them. In case of error in a block, either the data can be retransmitted starting with the error block or simply the error block only can be sent. If the second channel is used to send acknowledgement signals only, then it is not used properly. Economically it is better to use both the channels to send data one in each direction. There we use full duplex protocols like SDLC and HDLC