Desktop version

Home arrow Computer Science arrow Real-Time and Distributed Real-Time Systems: Theory and Applications

Communication Protocols

In order that a distributed real-time system (DRTS) composed of a number of subsystems delivers a specified real-time response, the communication between the subsystems must have a finite latency. This has given rise to a number of communication protocols. In this chapter, a few of these protocols used for implementing a DRTS for various applications are reviewed.

Basic Concepts

In this section, the basic concepts and terminologies associated with communication protocols are presented.

Efficiency Latency and Determinism

The constituent subsystems in a DRTS communicate through messages. Sending or receipt of a message constitutes an event. A message has a generic format as shown in Figure 3.1.

The different fields of the generic message format represented by Figure 3.1 may be explained as follows:

SYNC

This marks the start of the message and is used for synchronization between the sender and the receiver. A typical example is the start bit in asynchronous serial communication.

HEADER

This field contains routing data, for example, source and destination addresses, priority information, and information regarding size of data being sent.

DATA

This is the actual data content of the message. It is called the payload.

ERROR CODE

Error detection code.

END

End of message. A typical example is the stop bit in asynchronous serial communication.

If the total size of the message is H bytes and the payload is D bytes, then the bitwise efficiency of the protocol is D/H.

Again, as seen from Figure 3.1, a message can also contain information to control the communication and such control messages are not useful for an application. Therefore, the message efficiency becomes very important and is

FIGURE 3.1

Generic message format.

defined as the fraction of the total number of messages useful for an application. Ideally, the bitwise efficiency and the message efficiency should both be high for an efficient communication protocol.

A protocol is usually implemented over a shared communication network and the latency of the message transmission is an important parameter. The latency is defined as the interval between the instant at which a message is queued at the source and the instant at which it is completely received (until the last bit) by the receiver. The variation in latency is known as jitter, as stated in Chapter 2. Another network parameter that is very important from the point of view of a DRTS is the sustained maximum capacity that the communication network can handle, and this is defined as the number of messages per second. Clearly, this is a function of the network bandwidth. The sustained maximum capacity must be more than the peak demand of the DRTS.

The next important attribute associated with a communication protocol is media access control, which determines how the shared network is accessed and shared between the constituent subsystems in a DRTS adhering to the protocol. Different approaches are collision sense multiple access/colli- sion detect (CSMA/CD), collision sense multiple access/collision avoidance (CSMA/CA), and time division multiple access (TDMA). These are discussed with the individual protocols that use them.

Coupled with media access is the concept of coding or the manner in which the bits are sent over the network. Two basic schemes are return to zero (RZ) and nonreturn to zero (NRZ) coding. Usually a logical 1 and a logical 0 are represented by two distinct states of an electrical signal, and an RZ code forces the data to logical 0 at predefined intervals in order to synchronize between the sender and the receiver. A typical example is the stop bit, which is always a logical 1, and the following start bit, which causes a transition to a logical 0 in asynchronous serial communication. Referring to Figure 3.1 an RZ code can be achieved in the simplest case by assigning the SYNC and END bits to be complements of one another. Manchester coding is a typical example of RZ coding. In Manchester coding, a logical 0 is represented by a transition from 1 to 0 at the center of a bit time and a 1 is represented by a complementary transition, that is, a transition from 0 to 1. Figure 3.2 shows the signals for a sequence 0100.

A technique followed in NRZ coding to force synchronization in long sequences is known as bit stuffing, where a complementary bit is inserted

FIGURE 3.2

Manchester coding for sequence 0100.

after a sequence of finite predetermined length of a bit of a particular logic level. This, however, reduces the bitwise efficiency of the protocol.

With a bounded response time requirement, it is clear that determinism in a DRTS can only be ensured with a real-time communication protocol that ensures a bounded latency of message passing.

 
Source
< Prev   CONTENTS   Source   Next >

Related topics