RFC 642 UNKNOWN ARPANET · INTERFACES

Ready line philosophy and implementation

How a host and its IMP should use the ready line to recover cleanly after either one loses its place.

On rfc-editor.org ↗
PUBLISHED
July 1974
AUTHORS
J.D. Burchfiel
STREAM
Legacy
READY-LINE SETTLE TIME
1/2 second
RESET MESSAGE TO NCP
Type 10 IMP-to-host message
ERROR FLOPS
One or two (Input and Output)
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 ]

AI ELI5

On this page
PROBLEMReviewers of PDP-11 host interfaces found total chaos, confusion and misunderstanding about how the Host-IMP ready line should behave, because BBN Report 1822 only described the IMP's behaviour and suggested similar behaviour for hosts.
MECHANISMA dropped ready line, from either side, sets error flops in the host interface. The driver then throws away the message in transit and starts over, and a half-second delay lets the line settle after contact bounce.
WHY IT MATTERSThe note gives implementors a simple recipe that resynchronizes message flow without involving the NCP. It is a 1974 recommendation, not a formal standard.

§1Why the Ready Line Needed Spelling Out

BBN Report #1822 gives the full specification of the Host-IMP interface, but its authors avoided issuing directives and described the IMP's implementation, suggesting similar behaviour for the host. ARPA appointed a PDP-11 local host interface standardization committee, which found total chaos, confusion and misunderstanding in the interfaces it reviewed.

RFC 642 makes the implicit recommendations of that report explicit, as a cookbook of do's and don't's for interface implementors. It says it was reviewed and approved by the BBN IMP group.

The rule book for the plug between a computer and the network box was vague, so people built it in many different ways. This note says plainly how to do it.

§2The Ready-Line Plan

The plan has two objectives: reliably resynchronize and resume transmission after a temporary lapse of service and possible loss of state by either system, and keep host interface programming as simple as possible, which minimizes bugs and allows a small ROM network-bootstrap loader.

When the IMP ready line drops, the IMP may have lost state, so the message in transit in either direction is likely to be incomplete. Both sides must recognize this explicitly. Each sends a message intended to be thrown away (by convention the host-IMP NOP message) and discards the message currently being received.

The host gets this as an error status on two processes, one sending and one receiving. Using an Input Error flop and an Output Error flop, both set by a drop of the IMP ready line, lets each process clear its condition independently. A single flop can be shared if software flags and an interlock such as a mutual exclusion semaphore are used.

When the IMP raises its ready line, contact bounce sets the error flops again. The IMP therefore delays its "there's your IMP bit" and "ready for next host bit" signals until the line has stabilized.

If the line blinks off, both computers assume their half-sent message is ruined and throw it away. Then they wait a moment for the signal to calm down before trying again.

§3The Driver Processes and Restart

The note describes the interface driver as two simple processes. The input process waits for a buffer and for the IMP to be ready, starts input and waits for it to finish. If Input Error is set, it clears the flag and reuses the buffer, otherwise it queues the message. The output process mirrors this: if Output Error is set the smashed message is flushed, otherwise the message is removed from the output queue.

The only initialization needed at startup or restart is clearing the host READY flop, waiting 1/2 second and setting it again. Starting the two processes then resynchronizes host-IMP communication. As explained in RFC 636, the ready line and error flops should affect only these two processes, invisibly to the NCP and without touching the connection data base. The NCP is resynchronized or reinitialized by the type 10 IMP-to-host message "interface was reset."

One helper sends, one helper receives. If either gets a "something went wrong" flag, it tosses the broken message and carries on with the next one.

§4The Host Side and the Summary of Controls

When the host drops and raises its ready line, the IMP behaves symmetrically, and setting the error flops makes the same processes resynchronize in both directions. The host must delay transmission until its own ready line has stabilized, either in hardware with an integrating one-shot ANDed with "there's your host bit" and "ready for next IMP bit", or in software with a 1/2 second wait after setting the host ready flop.

The summary lists the required controls. The host needs a program settable and clearable host READY flop that drives a relay closure to the IMP, and a program-readable IMP ready status (not an interrupt). It also needs one or two ERROR flops, set when either ready signal is off, readable and clearable by program, and not cleared by system initialization.

The computer follows the same rule when its own signal blinks: it waits half a second before sending anything.

§5References

[RFC 636]RFC 636RFC 636, cited for how the IMP ready line should affect only the interface driver processes and not the NCP.June 1974
[BBN 1822]BBN Report #1822, "Specifications for the Interconnection of a Host and an IMP".