>Not with Maarten's algorithm. He does not sent a new bit before the
previous
>one has been acknowledged by the receiving side. That is one of the big
>advantages of using a proper asynchronous algorithm.
This algorithm, called Idle RQ, has a big problem: performance. Using this
method the transfer rate is reduced a lot.
Normally it is used an algorithm like this. It has a name... but I don't
remember which.
- Each data block has an identifier.
- The master continuously sends data blocks, without waiting
acknowledgement.
- Also, the master saves a copy of the block sended into a retransmission
list.
- The slave receives data, and looks if it is correct (using a parity check,
for example).
- If it is correct, it sends to the master an ACK, with the identifier of
the block.
- If it is not correct, it sends an NACK, also with the identifier of the
block.
- If the master receives an ACK, it deletes the block of his retransmission
list.
- If the master receives an NACK, it transmit another time the block.
- If passed a certain time, the master has not received ACK nor NACK, it
resends the last block on the list.
- If the slave receives twice the same block, it sends twice the ACK, but it
saves only one time the info.
The algorithm can be like this:
Master:
1.- Send data block(i)
2.- Put block(i) into the retransmission list.
3.- If received ACK(n) then delete block(n) from the retransmission list.
4.- If received NACK(n) then send data block(n)
5.- If time is over then resend the last block in the retransmission list.
6.- i=(i+1) mod max_blocks.
7.- goto 1
Slave:
1.- Receive data block(j)
2.- If received block is ok, then send ACK(j) and save block.
3.- If received block is not ok then send NACK(j)
4.- If received block is already received then send ACK(j)
5.- j=j+1
6.- goto 1
This method has some problems: first, an identifier has to be added to all
tha data blocks. Also there is an overload of the system respect to the
other method. And the most important problem is that it is more difficult to
code.
The main advantage is that the master sends continuously data, so there is
not dead time.
Another method is to pressume that there are no errors in the transmission,
or assume that an error is very very infrequent. Then transmit the entire
file and look for errors once the file has been transmitted. If errors,
retransmit. Then, if there aren't errors the transmission will be faster.
And... what about using detection and correction codes?
Well, excuse if there are some errors, I'm not expert in communications.
+------------------------------------------------+
| Toni Burguera Burguera |
+------------------------------------------------+
| E-mail : [EMAIL PROTECTED] |
+------------------------------------------------+
| 9D - La Novena Dimensio |
| http://www.geocities.com/Area51/Dimension/9812 |
+------------------------------------------------+
****
MSX Mailinglist. To unsubscribe, send an email to [EMAIL PROTECTED] and put
in the body (not subject) "unsubscribe msx [EMAIL PROTECTED]" (without the
quotes :-) Problems? contact [EMAIL PROTECTED] (www.stack.nl/~wiebe/mailinglist/)
****