text
stringlengths
0
99.6k
packets. S_Get_DLE
Note: "Aborting" means that a Failure Packet has been sent. If
Failure Packet has been sent, all outstanding packets are
assumed to be ACKed.
22
H. Packet Send Ahead
One of the most useful features of the B Plus Protocol, from
the user's point of view, is its ability to send more than
one packet ahead of receiving the acknowledgment of the
oldest one. This improves thru-put by overlapping the I/O
performed on both the Initiator and Responder computers,
including the time required for the Responder computer's
acknowledgement to arrive at the Initiator and wake up the
Initiator's application program.
The Packet Send Ahead is accomplished by keeping a set of
buffers in memory, one for each permitted outstanding
packet. Each buffer contains the corresponding packet's
<Sequence>, count, and the data itself. In addition a
counter of outstanding packets (ie, not yet ACKed) is
maintained and incremented whenever a packet is sent for the
first time.
Two indicies into the set of buffers are used to keep track
of the Send Ahead status. One keeps track of which buffer
holds the oldest packet and the other which buffer may be
filled with new data.
When a packet is about to be sent, the outstanding count is
checked to see if the maximum number of outstanding packets
has been reached. If so, a routine (GetACK) is invoked
which waits for the ACK to arrive for the oldest outstanding
packet. Several possibilities exist:
o The oldest packet is ACKed. In this case, move the
Oldest Outstanding index to point to the next oldest
packet and decrement the outstanding packet count.
o Some other packet in the buffer pool has been ACKed.
This implies an ACK has been missed. Move the Oldest
Outstanding index to point to the buffer following the
received ACK, and decrement the Outstanding Count
accoringly.
o A NAK is received. Retransmit all packets which are
outstanding.
If the Outstanding count is still at the maximum, stay in
GetACK.
Finally, a procedure is necessary which calls GetACK until
either a failure occurs or the Outstanding count is zero.
23
The Send Ahead Process proceeds as follows:
Receiver's
Packet Sequence Buffer Outstanding Response
1 `1' 0 1 ...
2 `2' 1 2 ...
3 GetACK ACK `1'
`3' 0 2 ...
4 GetACK ACK `2'
`4' 1 2 ...
5 GetACK ACK `3'
`5' 0 2 ... (Last)
GetACK ACK `4'
1 ...
GetACK ACK `5'