CS610 Computer Network GDB Solution Spring 2013

Generally, User Datagram Protocol (UDP) is not considered as a reliable data transfer protocol, real time applications running on this protocol may have to face some loss, errors or duplication of data due to absence of control messages. Do you think that to avoid such problems, we should use control messages in real time applications running on UDP? Justify your opinion with solid reasoning

A concise, coherent and to the point comment is preferred over lengthy comment having irrelevant details. Your comment must not be more than 5-7 lines. Comments, posted on regular Lesson’s MDB or sent through email will NOT be considered in any case. Any request about such an acceptance will not be catered.

Solution: Short messages in real time systems are usually used for managing hardware devices, data auditing and closed-loop communications (controlling device behavior based on the data that the device produces in real time). Due to the real time nature of the data, short messages must be delivered and reach their destination within few milliseconds. The transport protocol that may stand within this latency is UDP. Indeed, observe round trip time (RTT) of message from user space of its source to the user space of destination and back. The RTT of a message over UDP protocol highly depends on hardware and on operating systems of communicating peers. Nevertheless, even 100Mb network and non-real time OS, such as Window XP™, provide average RTT of one millisecond. Usage of real time OS and more advanced network cards may reduce it to microseconds.
Of cause, UDP is non-reliable protocol, so to use it we must add reliability features at the application level. This is complicated task, but if you have a fair big system, you should have the UDP alternative implemented. There are numerous UDP based protocols, which provide reliability feature (RDP, for example), but none of them has been found suitable for real time communications in heterogeneous systems.

The advantages of TCP over UDP are quite clear, as TCP guarantees that the sent data actually arrives, that it arrives in order and that there are no duplicates, while UDP provides none of these guarantees (only offers “best effort” policy). Unlike TCP, UDP does not provide any flow and congestion control.
On the surface, an unreliable transport protocol like UDP may not seem very worthwhile or desirable. But in fact, UDP can be very useful in certain situations, and it enjoys one key advantage over TCP – speed. The reliability features built into TCP can be expensive in terms of overhead at execution time.