Lecture
The concept of acknowledgment (from the Latin "quittare" — to release, to clear) — is the process of confirming the receipt of a signal, message, or event, indicating that the given signal has been received and processed. Acknowledgment is often used in automation, monitoring, and control systems to keep track of critical events or errors.
The essence of acknowledgment: Acknowledgment is confirmation that an operator or system has received and processed information about an event. This is necessary to prevent a repeated reaction to the same event and to provide assurance that the incident has been noticed and/or acted upon.
Application in various systems:
The acknowledgment process:
Types of acknowledgment:
The importance of acknowledgment:
In data networks, telecommunications, and computer buses, an acknowledgment (ACK) — is a signal that is transmitted between interacting processes, computers, or devices to indicate confirmation or receipt of a message within a communication protocol. Correspondingly, a negative acknowledgment (NAK or NACK) — is a signal that is sent to reject a previously received message or to indicate some kind of error. Acknowledgments and negative acknowledgments inform the sender of the state of the receiver, so that it can adjust its own state accordingly.
The ASCII code point for ACK is 0x06 (binary 0000 0110). By convention, the receiving device sends ACK to indicate that it has successfully received the message. ASCII also provides the NAK code point (0x15, binary 0001 0101), which can be used to indicate that the receiving device cannot or will not execute the message. Unicode provides visible symbols for these ASCII characters, U+2406 (␆) and U+2415 (␕).
ACK and NAK symbols can also take the form of individual bits or bit fields depending on how the data link layer of the protocol is defined, or even as a dedicated wire at the physical layer.
Many protocols are acknowledgment-based, meaning they positively confirm receipt of messages. The Transmission Control Protocol (TCP) on the Internet is an example of an acknowledgment-based protocol. When computers communicate over TCP, received packets are acknowledged by sending a response packet with the ACK bit set.
While some protocols send an acknowledgment for every packet received, other protocols, such as TCP and ZMODEM, allow many packets to be transmitted before sending an acknowledgment for their entire set, which is a procedure necessary to fill channels with high bandwidth and transmission delay for a large number of bytes.
Some protocols are NAK-based, meaning they respond to messages only if problems occur. Examples include many reliable multicast protocols, which send a NAK when the receiver detects missing packets, or protocols that use checksums to verify the integrity of the payload and header.
Other protocols use both NAK and ACK. Examples are Binary Synchronous Communications (Bisync) and Adaptive Link Rate (for Energy-Efficient Ethernet).
The acknowledgment feature is used in the automatic repeat request (ARQ) feature. Acknowledgment frames are numbered according to the frames that were received and then sent to the transmitter. This allows the transmitter to avoid overflow or underrun at the receiver and to learn of any missed frames.
In IBM Binary Synchronous Communications, NAK is used to indicate that a transmission error was detected in a previously received block and that the receiver is ready to accept a retransmission of that block. Bisync does not use a single ACK character, but has two control sequences for alternating even/odd block acknowledgment.
ACK- and NAK-based methodologies are not the only protocol design paradigms. Some protocols, such as RC-5, the User Datagram Protocol (UDP), and X10 protocols, perform blind transmission without acknowledgment, often transmitting the same message multiple times in the hope that at least one copy of the message will be delivered.

fig. Suppression of acknowledgments performed by LLE-TCP.
The figure shows the modifications made by LLE-TCP compared to standard TCP functionality across the three main phases of a TCP connection: connection establishment, data transfer, and connection termination. The connection establishment phase, also called the «three-way handshake», performs important tasks such as synchronizing sequence numbers and negotiating the contention window size. For this reason, the ARQ agent performs ACK suppression only for the third handshake in connection establishment, and full ACK suppression for the data exchange and connection termination phases. In the case of bidirectional data exchange, TCP encapsulates the ACK in outgoing data packets. The receiving node does not suppress ACKs from packets of this type. However, suppression is performed on the sender's side by the ARQ agent, which tracks the number of the last acknowledged TCP segment. If an incoming packet acknowledges a segment with a number lower than or equal to one already acknowledged, the ACK flag is cleared.
To ensure proper functioning of fast retransmit [23], introduced in TCP Reno, duplicate ACKs are never suppressed either by the ARQ agent at the receiving node or at the sending node.
Packets are used to build transactions. A transaction is a logical unit of data exchange. Transactions, like packets, have structure and exist at a higher level of abstraction. Transactions take place within time windows, which have already been discussed. Every transaction must begin and end within a single window, and it is not permitted for a transaction to begin in one time window and end in another. Recall that the start of a time window is marked by an SOF packet and ends with the special EOF bus state.
There are 4 types of transactions: interrupt, bulk transfer, isochronous transfer, and control. Channels connecting an endpoint to the host have been mentioned. A stream of transactions constitutes a channel. Transactions for different transfer types have protocol differences arising from whether or not bandwidth, response time, delivery reliability, and input/output synchronization are guaranteed. For example, isochronous transfer transactions guarantee the exchange rate, but do not ensure delivery reliability. When corrupted packets are received, the corrupted packet is not retransmitted, whereas interrupt transactions provide a guaranteed response time for the USB device to a host request, but are not intended for transferring large volumes of data.
Let us consider an interrupt read transaction. Any transaction is initiated by the host by transmitting an IN token packet, which was described earlier. The token packet describes the transaction type, the USB device address, and the endpoint number. The address is recognized by the USB device, and it returns a data packet. The host then responds with an acknowledgment. There can be only one data packet in an interrupt transaction. Additional transactions are used to transmit multiple packets. The token packet is protected from corruption, and if the USB device receives a corrupted token packet, the USB device waits out a timeout, signaling to the host the need to retransmit the token packet. If data is not ready to be transmitted, a NAK packet is sent. A typical USB device, having recognized an IN packet received from the host, fills the endpoint buffer with data and, by changing the value of some flag, triggers sending of the buffer's contents to the host. But until the data is sent, the SIE automatically sends NAK packets to the host. If the USB device requires significant time to wait for data readiness, bus bandwidth will be wasted receiving a stream of acknowledgment packets. In this case, the USB device's firmware puts the endpoint into a stalled state. In the stalled state, the endpoint responds to an IN packet from the host with a STALL handshake packet. Upon receiving this packet, the host learns that the endpoint is in a stalled state. This packet informs the host of the need for a long wait. If a data packet transmitted by the USB device is received corrupted by the host, the host waits out a timeout, signaling to the USB device the need for retransmission. The figure illustrates the above.
In an interrupt write transaction, the host sends an OUT token packet for the write transaction and a data packet. If the token packet or the data packet transmitted by the host is corrupted, the USB device waits out a timeout, indicating an error. Upon successful receipt of the data, the USB device returns a positive ACK handshake packet. If the buffer is not yet empty, a NAK is returned.
The logic of bulk transfer transactions is similar to the interrupt transaction discussed above. It is understood that bulk transfer transactions use their own token packet. The differences mainly concern how the host schedules bulk transfer transactions. Simply put, bulk transfer transactions are sent last.
Isochronous transfer transactions are arranged quite simply: the host sends a token packet, then receives or sends a data packet. Handshake packets are not used; corrupted packets are simply discarded.

Some computer buses have a dedicated acknowledgment wire in the control bus, used to confirm bus operations: DACK is used for ISA DMA; DATACK is used in STEbus, the data transfer acknowledge pin of the Motorola 68000, which inspired the name DTACK Grounded, etc. Some computer buses do not wait for acknowledgment of every transfer.
The I²C serial bus has a time slot for an acknowledge bit after every byte.
The concept of acknowledgment is important for reliable control and monitoring in any system where critical events can affect safety, performance, or operational stability.

fig. I2C address packet format
fig. Data is transmitted over the I2C bus together with service information. Together this is called a packet. There are address packets and data packets. Address packets consist of a 7-bit address, an R/W control bit, and an acknowledge bit (the entire packet is 9 bits). An address packet is needed to address a specific device.
Comments