RFC 642 UNKNOWN ARPANET · INTERFACES

Ready line philosophy and implementation

How the Host-IMP ready lines help an interface discard incomplete messages and restart safely.

On rfc-editor.org ↗
PUBLISHED
July 1974
AUTHORS
J.D. Burchfiel
STREAM
Legacy
READY-LINE STABILIZATION WAIT
One-half second
IMP RESET MESSAGE TYPE
Type 10
INTERFACE ERROR STATUS
Input and output errors
DOI
10.17487/RFC0642

RFC text

Contents
Original text · RFC Editor View on rfc-editor.org ↗
Network Working Group                                    Jerry Burchfiel
Request for Comments: 642                                            BBN
NIC: 30872                                                  July 5, 1974


                Ready Line Philosophy and Implementation

I.  Introduction

   BBN Report #1822, Specifications for the Interconnection of a Host
   and an IMP, gives a complete specification of the Host-IMP interface.
   However, the authors of this document bent over backward to avoid
   issuing arbitrary dictatorial directives to host interface
   implementors.  They succeeded admirably in this goal by describing
   the IMP implementation, and suggesting similar behavior on the part
   of the host.

   ARPA has appointed a PDP-11 local host interface standardization
   committee composed of myself, Dave Retz of SCRL, and Yuval Peduel of
   MIT Lincoln Labs.  During our review of various interfaces designed
   by the ARPA community, we have found total chaos, confusion and
   misunderstanding about the recommended host interface implementation.

   This note is an attempt to make explicit the recommendations which
   are implicit in Report #1822.  It provides a cookbook for interface
   implementors, including a set of recommended do's and don't's in the
   common problem areas.  This document has been reviewed and approved
   by the BBN IMP group.

II.  Ready-line Philosophy

   The following is an attempt to spell out in detail a consistent plan
   for operation of the IMP ready line and host ready line with the
   following objectives:

      1.  Reliably resynchronize and resume transmission after a
          temporary lapse of service and possible loss of state
          information by either system.

      2.  Make the programming of the host interface as simple as
          possible.  This will minimize bugs, and make it possible to
          create a small ROM network-bootstrap loader.

   First, consider the IMP ready line.  When it drops, the IMP has
   suffered a possible loss of state, so the message in transit from the
   IMP to the host (if any) is likely to be incomplete.  Similarly, the
   message in transit from the host to the IMP (if any) is likely to be
   incomplete.  Both the host and the IMP must recognize this explicitly
   by sending a message intended to be thrown away* (which may he
   appended to the current message) and throw away the message currently
   being received.  (Both the host - IMP message and the IMP - host
   message).

   The simplest arrangement for the host's interface driver is a pair of
   processes, one sending messages and the other receiving messages.
   This drop of the IMP's ready line must be provided as an error status
   bit to each process.  However, the two processes will need to clear
   this condition independently: the simplest implementation is an Input
   Error flop and an Output Error flop.  Both flops are set by a drop of
   the IMP's ready line, and they are cleared independently under
   program control.

   When the IMP raises its ready line, each contact bounce will again
   set the Error flops in the host's interface.  To insure that messages
   are not flowing across the interface at this time, assertions of the
   signals "there's your IMP bit" and "ready for next host bit" have
   been delayed sufficiently in the IMP to guarantee that the IMP ready
   line has stabilized.

III.  Programming

   The interface driver processes can be described simply:

   INPUT:  Wait until an input buffer is available
           Wait until IMP ready
           Start input
           Wait until input is complete
           IF Input Error
           THEN clear Input Error  // Flush smashed message.  Input
                                   // buffer will be reused.
           ELSE queue message on input queue
           GOTO INPUT

   OUTPUT: Wait until a message is present on output queue
           Wait until IMP ready
           Start output
           Wait until output is complete
           IF Output Error
           THEN clear Output Error  // smashed message is flushed
           ELSE deque message from output queue  // Free up
                                                 // output buffer
           GOTO 0UTPUT

   ----------
   *The standard convention uses the host-IMP NOP message.

   The only initialization required for system startup or restart is
   clearing the host READY flop, waiting 1/2 second, and setting the
   host READY flop.  Simply starting (or restarting) the above processes
   will properly resynchronize host-IMP communication.  As explained in
   RFC #636, the IMP ready line (and error flops) should only affect the
   two processes above: this resynchronization should be invisible to
   the NCP, and should have no effect on the connection data base.  The
   NCP will be resynchronized or reinitialized by the type 10 IMP-to-
   host message "interface was reset."

   Actually, it is possible to share a single Error flop between the
   input and output processes by implementing Input Error and Output
   Error as software flags.  A process testing for error must test both
   the Error flop and its own flag.  An interlock is required (e.g.  a
   mutual exclusion  semaphore) to guarantee that only one process at a
   time is testing and modifying the flags.  If the Error flop is set,
   the process must copy it into the other process' flag before clearing
   the flop and its own flag.

IV.  Host Ready Line Implementation

   When the host drops and raises its ready line, the IMP behaves in a
   fashion symmetric to that outlined above.  Of course, this drop
   indicates that the state of the host's interface driver, as well as
   the current incoming and outgoing messages, are likely to be lost.
   The appropriate action is triggered by setting the Error flop or
   flops in the host interface, and the processes specified above will
   correctly resynchronize message flow in both directions.  Of course,
   to guarantee that messages are not flowing across the interface while
   the host ready line is undergoing contact bounce, the host must delay
   transmission until its ready line has stabilized.  This may be done
   in two ways:

      Hardware: an integrating one-shot driven by the host ready line
           flop is ANDed with "there's your host bit" and "ready for
           next IMP bit" to guarantee that message transfer will not
           start until the ready flop has been on for 1/2 second.

      Software: the initialization program executes a 1/2 second wait
           after setting the host ready flop before permitting input or
           output to begin.

V.  Summary

   This determines the specification READY line controls for the host's
   interface to the IMP:

      1.  It contains a program settable/clearable host READY flop which
          drives a relay closure to the IMP.

      2.  It detects the IMP's ready signal as a program-readable status
          condition.  (But not an interrupt condition)

      3.  It contains one or two ERROR flops set when either the host
          READY flop is off or the IMP ready signal is off.  The flop
          (flops) is a program-readable and program-clearable status
          condition.  (But not an interrupt condition).  These status
          flops must not be cleared by system initialization.

      4.  If hardware stabilization of the host's READY line is
          provided, it is a 1/2 second integrating one-shot driven by
          the host READY flop.  This signal is ANDed with "there's your
          host bit" and "ready for next IMP bit".











       [ This RFC was put into machine readable form for entry ]
       [ into the online RFC archives by Alex McKenzie with    ]
       [ support from GTE, formerly BBN Corp.           2/2000 ]

ISO Plain Language

On this page
PROBLEMBBN Report 1822 described the IMP side of the Host-IMP interface but left some recommended host behavior implicit, leading to confusion among implementors.
MECHANISMA drop in either ready line sets error status; the interface discards messages in progress and uses separate input and output processes to resume after the line stabilizes.
THE RECOMMENDATIONRFC 642 gives implementors a recommended procedure for resynchronizing message flow without involving the NCP in the ready-line recovery.

§1Making the Ready-Line Guidance Explicit

BBN Report 1822 specifies the Host-IMP interface, but focuses on the IMP's implementation and suggests that the host behave similarly. A committee reviewing PDP-11 host interfaces found confusion about what that meant in practice.

RFC 642 makes the recommendations explicit as a guide for interface implementors. Its goals are to restore communication reliably after temporary service loss and to keep host interface programming simple.

The interface report did not spell out every step for the host side. This memo gives implementors a consistent way to handle the ready signal.

§2Discarding Messages After a Ready-Line Drop

When the IMP ready line drops, either message in transit may be incomplete. Both the Host and IMP must recognize this and discard the message being received; the standard convention uses a Host-IMP NOP message intended to be thrown away.

The suggested host driver uses one process for input and another for output. A drop sets input and output error status, and the processes clear their errors independently. The input process flushes an incomplete message and reuses its buffer; the output process flushes an incomplete message rather than removing it as successfully sent.

If the ready signal drops during a message, the interface treats that message as incomplete and throws it away. Separate input and output processes then continue when the connection is ready again.

§3Restarting and Stabilizing the Line

At system startup or restart, the host clears its READY flop, waits one-half second and sets it again. Starting the input and output processes then resynchronizes Host-IMP communication. The NCP is resynchronized separately by the type 10 IMP-to-host message “interface was reset.”

The host must also avoid transmitting while its own ready line is settling. The RFC permits hardware stabilization or a software wait of one-half second after setting the host ready flop. The ready-line errors should affect only the interface processes, not the NCP or connection database.

After raising its ready signal, the host waits one-half second before sending or receiving. The interface restarts its own processes, while the NCP receives a separate reset message.

§4References

RFC 636RFC 636RFC 636, cited for the effect of the IMP ready line on interface processes and the NCP.June 1974
BBN Report #1822Specifications for the Interconnection of a Host and an IMP, BBN Report 1822.