The Asynchronous Environment
Which of these protocols is best for the asynchronous environment? This depends on the definition of "best", of course. One means of judging is to compare the amount of overhead that each protocol would add to each frame sent.
We will examine the overhead costs in two groups:
framing/transparency/error checking,
and addressing/control.
The two groups of functions are independent of each other, even though the protocols mentioned above use specific combinations of techniques from these two groups. Also, hardware available on minicomputer-class and larger machines today supports the first group of functions completely for these standard protocols; this fact should allow for far greater performance from the gateway machine. To the extent that such hardware becomes available for personal computers, it can also be used there to reduce the protocol processing overhead. Here's a breakdown of framing costs in characters. RATP is also included for comparison.
Protocol Frame Check Transp. Total F+C
char-or. 4 2 2 8 6
bit-or. 1 2 2 5 3
DDCMP 4 4 0 8 8
RATP 2 3 0 5 5
The transparency column indicates the anticipated cost in inserted characters to achieve transparency across a 256-byte frame. The figure for bit-oriented protocols is a pessimistic guess, because I don't know the exact answer; it is between 0 and 8 characters, with the worst case occurring when the data is all one bits. For character-oriented protocols, we would expect on average one DLE character in a 256-byte frame; the worst case overhead (256 DLEs) is 256 bytes.
Because transparency is so much a function of the user data, and because we have ignored the cost of loss of frame synchronization in the counting protocols (DDCMP and RATP), I argue that we should base the comparison on the frame and checksum costs only. For these two columns, character-oriented framing costs one more character per frame than RATP. This, plus its wide use and hardware chip support, create a strong case for its use in preference to RATP for framing.
Bit-oriented framing, as noted previously, is appropriate only on synchronous links. The character oriented variant I postulated above would have the same costs, but as it is not a standard, it is not proposed here. So we now have constructed the following frame format:
DLE STX <control and data ...> DLE ETX CRC CRC
One objection to using character-oriented protocols as opposed to character-count protocols is that it is necessary to examine every character as it arrives. I respond to this objection as follows:
-
Under some circumstances, such as when a header has been hit with an error, it will be necessary for the receiver to look at every character anyway.
-
The environment for this protocol is a 1200 baud link; thus 120 characters per second need to be examined at a maximum. Even on a relatively slow personal computer, this should not present a problem.
We now turn our attention to the content and format of the control information preceding each link frame. There are three components to this cost, control, address, and acknowledgment. The address field allows multipoint configurations and is superfluous for the point-to-point environment proposed, but it is present in the public standards and we restrict ourselves to those.
Acknowledgments are shown if they are required explicitly by the protocol. A "0" indicates that the acknowledgments may be included in the control information for traffic in the opposite direction, and only need be sent explicitly when no reverse traffic is present (and thus are assumed to take no required overhead). Only character-oriented protocols have required acknowledgments.
Cont. Addr. Ack Total
char-or. 0 3 2 5
bit-or. 1 1 0 2
DDCMP 3 1 0 4
RATP 1 0 0 1
Again, the bit-oriented procedures provide the lowest overhead among the public standards, but in this case there is no conflict in using them in the asynchronous environment. In fact, even if all the other aspects of RATP were to be adopted, I believe the control field codings of the bit- oriented procedures represent a more efficient use of the channel, are widely implemented, and allow for addition of more functions later if desired. As stated above, there are several protocols in the bit-oriented family. I would recommend use of LAPB, since this is the most widely known of the family.
For those not familiar with bit-oriented control procedures, I have included a quick summary of these procedures in Appendix A. Refer to the standards listed at the end of this note for more detail.