Priority Based Message Stack
MetadataShow full item record
To enable deterministic scheduling in a distributed embedded system an existing open source embedded TCP/IP stack has been modified to support strict priority queuing. The embedded target system has a fully switched closed Ethernet backplane used for internal communication. The problem is that high-volume configuration file downloads interfere with low-volume internal signaling, such as alarms, status reports, performance data and other statistics. The network was already designed using a type of switches which could support several Quality of Service schemes. An open source embedded TCP/IP stack, lightweight IP (lwIP) was evaluated, and found to be a suitable foundation for the developed application; the Priority Based Message Stack (PBMS). PBMS is a modification of lwIP with support for selective packet forwarding and reception based on the IPv4 Type-of-Service (TOS) field. Support for the BOOTP protocol, as well as a nonblocking send operation, was also implemented. PBMS is easily portable in the sense that it only requires a clearly defined basic set of generic OS functions in order to be ported to new systems. A generic interface to Ethernet drivers must also be developed. The implementation was desktop tested on a Linux platform for correct functionality in the IP, UDP and BSD Socket modules. The performance of the priority scheme compared to a best-effort strategy was also measured. These tests showed that stack-internal strict prioritization based on the IPv4 TOS precedence bits have a clear potential for offering deterministic transfer times in Nera s distributed embedded system. Without prioritization, with contention for the network link, an average output time of 480 microseconds was measured from the time the socket sendto function was called until the IP output function had been executed. Using strict prioritization under the same conditions this sequence of functions executed in only 15 microseconds in 99 percent of the test runs. The proper prioritization within the TCP/IP stack is only one of several queuing points in the target network. The existing switches, along with the proper TOS marking of each packet, will ensure an unbroken chain of priority queueing all the way to the destination. Some network endpoints might have variable latencies, which will affect the round-trip time (RTT). A measurement methodology to determine this has been described. A test methodology for round-trip and one-way delay time measurement will be used to validate PBMS in the target system. These tests can also be used to estimate the latencies in those network endpoints mentioned above. With this data at hand a worst-case RTT for the entire system can be calculated. The target system integration and validation will be carried out immediately after the completion of this thesis.