01423642

Upload: saranyababy

Post on 09-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 01423642

    1/4

    A Switched Ethernet Protocol for Hard Real-Time

    Embedded System Applications

    Alimujiang Yiming and Toshio Eisaka

    Kitami Institute of Technology, Kitami, Hokkaido, [email protected]

    Abstract

    This paper presents a protocol to support traffic for

    hard real-time applications over non real-time LANtechnology, with a switched Ethernet based network

    concept without any modifications of existing Ethernet

    hardware. Simulation results demonstrate the proposed Ethernet protocol has better real-time performances,higher bandwidth and a larger data frame, and meets the

    requirements of reliability for hard real-time systems.

    1. Introduction

    High bandwidth and determinism are the criticalnecessary conditions for any hard real-time applications.

    For the real-time systems that need high-bandwidthcommunications, Ethernet becomes the communications

    link most designers think of first today [1]. Unfortunately,Ethernet uses a non-deterministic arbitration mechanism

    (CSMA/CD) that makes it unsuitable for real-timecommunications. In spite of this, the advantages of Ethernet

    (popularity and high-bandwidth, etc.) still attract the needto make it suitable for real-time applications [2-6].

    Protocols which enable hard real-time communicationon Ethernet have also been proposed in [7-9]. However,

    these protocols either change the existing Ethernet

    hardware or bring to additional time consumption.In this paper, we aim to provide a better way of design

    and implementation of a switched Ethernet protocol for

    hard real-time applications, without modifications of

    existing Ethernet hardware. In the proposed protocol, thereal-time communication supports in end-nodes and

    switches according to a real-time dynamic schedulingalgorithm -- EDF (Earliest Deadline First) algorithm, by

    software added between the Ethernet protocols and theTCP/IP suite in the OSI reference model [10]. Real-time

    traffic from an end-node bypasses the TCP/IP stack andthus considerably reduces the dwell time in the nodes, and

    increases the achievable frame rate.Compared to the conventional hard real-time

    communication protocols, the proposed Ethernet protocolhas better real-time performances, higher bandwidth and a

    larger data frame, and meets the requirements ofreliability for hard real-time systems, without anymodification of the original Ethernet hardware.

    2. Real-time communication support

    In this section, network configuration, real-time

    channel establishment and traffic scheduling are discussedrespectively.

    2.1 Network configuration

    We applied a full-duplex switched Ethernet for thenetwork configuration, and both switch and end-nodes use

    a real-time dynamic scheduling algorithm -- the earliestdeadline first (EDF) algorithm for hard real-time traffic

    control. The advantage of using EDF in hard real-time

    traffic was shown in [11-12], as it is the optimal and

    dynamic-priority scheduling algorithm. MAC function,frame buffering and centralized transmission arbitration isincluded in the switch. In addition, we have used anintelligent switch in our work for which provides better

    performance (shorter latency and higher utilization) than

    using the ordinary switches, and provide controls toenhance multi-point operations of the network.

    2.2 RT channel establishment

    Before the real-time traffic is transmitted, the real-timechannel should be established. The establishment of the

    real-time channel (RT channel) is including request and

    recognition communication, after the source nodes,

    destination nodes and switches have agreement withchannel establishment.

    We built real-time channels between source nodes and

    destination nodes. Each node can connect to more thanone sending and receiving real-time channel.

    When receiving RT channel establishment requestframes, the switch calculates the total utilization of all the

    Proceedings of the 19th International Conference on Advanced Information Networking and Applications (AINA05)550-445X/05 $20.00 2005 IEEE

  • 8/8/2019 01423642

    2/4

    request frames, namely, the feasibility of traffic schedule

    between requesting nodes and switch and the destinationnodes (called admission control process). If the schedule

    is feasible, the switch responses with the network

    schedule parameters to the requesting nodes. If theschedule is not feasible, the switch sends out a set ofrecommended control parameters to the requesting nodes.

    These control parameters are suggested based on thestatus of switch queue and the active queue control law.

    Our purpose in this work is to create a protocol for

    switched Ethernet by scheduling hard real-time trafficusing EDF algorithm. Between different nodes, we can

    get information about the other real-time data frames bysending the absolute deadline messages of the next traffic.According to this deadline information, we sort real-time

    data frame on each node with EDF algorithm, andestablish a deadline table which including the absolute

    deadlines of each node. The determination of sends

    real-time traffic will be obtained on the table which gives

    a reference of the traffic deadline of other nodes.According to this dynamic table, real-time traffic from theend-node must have lowest deadline than other traffic inthe same node and in the other nodes, and bypasses the

    TCP/IP stack and put in a deadline-sorted queue in the RT

    layer. The function of bypassing the TCP/IP stack of eachnode is implemented by software added between the

    Ethernet protocols and the TCP/IP suite. The processes ofreal-time traffic transmission are describing as follows:

    1. If a real-time traffic data frame sent from an

    end-node has the lower deadline comparing with deadline

    in the table, the data frame skip to use the services of theTCP/IP protocol suite and the EDF traffic-scheduling

    algorithm is applied to directly put the data frame as adeadline-sorted queue in the RT layer.

    2. Update the table by the deadline according to thereceived data frame. The real-time data frame to be sent

    should include the deadline of the next data frame in localqueue if there are some following data frames. If not, then

    send a deadline with maximum value.Figure 1 describes the establishment of an RT channel.

    When an end-node wants to setup an RT channel, it will

    directly deal with the RT layer. The RT layer then sendsan RT channel establishment request to the RT channeltraffic management software in the switch. Real-time

    traffic from the end-node bypasses the TCP/IP stack andthus considerably reduces the dwell time in the nodes, and

    increases the achievable frame rate by evasion of thenon-deterministic behavior inherent in the TCP and IP

    stack. This is important for the proposed Ethernetprotocol has better real-time performances, and meets therequirements of reliability for hard real-time systems. Nonreal-time traffic from the end-node uses TCP/IP stack and

    put in an FCFS-sorted (First Come First Serve) queue inthe RT layer.

    The switch has two MAC addresses: one is for control

    traffic (e.g., Request Frames); and another is for real-time

    traffic over RT channels. Therefore the switch will beable to recognize the different kinds of frames: control

    frames, real-time data frames and non-real-time.

    Intelligent

    Node1 Switch Node N

    Figure 1. Real-Time channel establishment

    2.3 Scheduling of real-time frames

    We assume that Node 1 (source node) wants to send

    real-time traffic to Node 2 (destination node). Thereal-time guarantee is supported by RT channel, and the

    scheduling of real-time frames in the switch and end-node

    is made according to EDF theory. According to basicEDF theory, the utilization factor of real-time traffic is

    defined as:

    ,

    ii

    p d i

    CU T (1)

    where Tpd, i is the RT channel period duration, Ci is theamount of data per period. In order to satisfy all deadlines,

    the utilization of real-time traffic link has to be less thanor equal to a certain level:

    ,

    1ii pd i

    CU

    T (2)

    For all RT channels, the maximum transmission latencyis characterized by:

    _ , 1, 2,m lat i n i n i l T T T T (3)

    where Tl is the worst-case latency which is defined as:

    _ _l n s s d ct T T T T (4)

    In the equation, Tn_s is the latency from source nodes to

    switch; Ts_d is the latency from switch to destinationnodes, and Tct is the corner-turn latency inside the

    intelligent switch.The source node latency is: Tn_s = QTf where Q is the

    Best

    effort

    Real

    Time

    Real

    Time

    Best

    effort

    TCP

    UDP

    TCP

    UDP

    IP

    Traffic managing

    &

    Frame Reorganizing

    IP

    RT layer R T R T RT layer

    M AC M A C M A C M AC

    PH. L. PH . L .

    .

    .

    . P H . L . PH . L.

    Proceedings of the 19th International Conference on Advanced Information Networking and Applications (AINA05)550-445X/05 $20.00 2005 IEEE

  • 8/8/2019 01423642

    3/4

    0

    200

    400

    600

    800

    1000

    1200

    1400

    1600

    1 10 100 500 1000 1498 1538

    Data frame size (bytes)

    Transm

    issionlatency(s)

    1553BRTCCProposed

    number of the frames which is storable on NIC (Network

    Interface Card). The switch latency is described as:

    _ ,s d f f T MAX T QT (5)

    The first term in the MAX expression is the wait timeof maximal sized frames Tf. The second term shows thesame thing as for the source node latency.

    Besides utilization and worst-case latency, anotherimportant performance evaluation standard of a real-time

    data frame is a runtime overheadRi. It is defined as:

    ,

    ,

    8 /

    100

    pd i i

    i

    pd i

    T L BR

    T

    (6)

    where Li is the length of data in a message frame, for

    example, the data length a frame can be able to transmit;Li 8 is the number of bits in the frame, and B represents

    the Ethernet bandwidth.According to the utilization, transmission latency and

    runtime overhead that we discussed above, an EDF traffic

    scheduling is proposed, which can guarantee all the aboverequirements:

    1. If it is a hard real-time traffic data frame, the EDF

    traffic-scheduling algorithm is used in order to guarantee thedynamic absolute deadline in earliest priority of the traffic.

    2. Transmission of hard real-time traffic is alwaysguaranteed first in the EDF algorithm. Then, transmit

    other traffics (for example, soft real-time traffic).

    3. A non real-time traffic which come from other best-effort protocols (like HTTP, SNMP, FTP etc.), ituses the services of the TCP/IP protocol suite and put in

    an FCFS-sorted queue in the RT layer, then transmit the

    traffics at the idle time of the schedule.The real-time traffic schedule is performed according

    to EDF algorithm with dynamic-priority scheduling,therefore it is flexible and efficient, and can be adopted inhard real-time traffic applications.

    3. Performance evaluation

    We made a local area network (LAN) with a

    full-duplex switched Ethernet and end-nodes, by usingdesktop computer and several embedded Ethernet

    development boards which produced by YDKTechnologies Inc. that provides a hardware platform to

    immediately start developing embedded systems based on

    Altera ACEXTM

    devices (see Figure 2).We use a 100 Mbit/s Ethernet switch with Ethernet

    frames that has the data field maximized (1538 bytes inIEEE 802.3 standard). Real-time traffic from the

    end-node bypasses the TCP/IP stack and put in adeadline-sorted queue in the RT layer, the intelligent

    switch scheduler applied with the EDF algorithm alwaystransmits the message frame according to the closeness oftheir absolute deadline. In the proposed work, there are no

    modifications in the Ethernet hardware on the NIC. This

    allows connecting the proposed switched Ethernet LANto the existing Internet network.

    Desktop

    Figure 2. LAN with full-duplex switched Ethernet

    Data frame transmission latency and the frame runtime

    overhead can be obtained by implementing the proposedprotocol to hard real-time communications.

    Figure 3a shows the comparison of data frame

    transmission latency of three kinds of hard real-time

    communication protocols: MIL-STD-1553B protocol, realtime communication control (RTCC) protocol and the

    proposed Ethernet protocol. Runtime overhead of data

    frame of the three protocols is demonstrated in Figure 3b.

    Table 1 listed some main performance parameters of these

    hard real-time communication protocols. Figures andtable shows that the proposed protocol provides betterreal-time performance, higher bandwidth, and a largerdata frame than the other hard real-time communication

    protocols.

    Figure 3a. Transmission latency of data frame

    I n t e l li g e n t S w i tc h

    E n d n o d e s

    1 0 / 1 0 0 B a s e - T X

    B e s t

    e f f o r t

    R e a l

    T i m e

    T C P / U D P

    I P

    R T l a y er

    M A CSRAM/

    FROM

    P h L

    Proceedings of the 19th International Conference on Advanced Information Networking and Applications (AINA05)550-445X/05 $20.00 2005 IEEE

  • 8/8/2019 01423642

    4/4

    0

    0.2

    0.4

    0.6

    0.8

    1

    1 10 100 500 1000 1498 1538Data frame size (bytes)

    Frameruntimeov

    erhead%

    1553BRTCCProposed

    Figure 3b. Runtime overhead of data frame

    Table 1. Parameters of hard real-time networks

    MIL-STD

    -1553BProtocol

    Real Time

    Ethernet(RTCC)

    Proposed

    EthernetProtocol

    Speed (bps) 1M 10M 100M

    Determinism Best Good Good

    Length (km) < 0.09 < 2.5 < 2.4

    Max nodes 32 1024 1280

    Frame 1-32(16bits)

    1-1498(8bits)

    1-1538(8bits)

    4. Conclusion

    In this paper, we have presented a protocol to support

    traffic for hard real-time applications over non real-timeLAN technology, with a switched Ethernet based networkconcept. For the network configuration, both switch andend-nodes use the earliest deadline first (EDF) algorithm

    for hard real-time traffic control; both switch and

    end-nodes have an RT layer added to support hardreal-time traffic. Real-time traffic from the end-node

    bypasses the TCP/IP stack and put in a deadline-sortedqueue in the RT layer, and the switch always transmits the

    data frame according to the closeness of their absolutedeadline that has stored in the switch when establishing

    their RT channel. Non real-time traffic from the end-nodeuses TCP/IP stack and put in an FCFS-sorted queue in the

    RT layer, and transmit the traffics at the idle time of the

    schedule.Simulation results comparing with some conventional

    hard real-time protocols has demonstrate that the proposed Ethernet protocol has better real-timeperformances, higher bandwidth and a larger data frame,

    and meets the requirements of reliability for hardreal-time systems.

    Furthermore, we have used an intelligent switch in our

    work, for which provides better performance (shorterlatency and higher utilization) than using the ordinary

    switches. Also, the intelligent Ethernet switches providecontrols to enhance multi-point operations of the network.

    This is useful for many applications with high demandson multi-point communication performance. Example for

    this should be the application in industry distributed hardreal-time communications, robotics, and in parallel signal

    processing applications such as radar signal processing.

    References

    [1] Jan Axelson, Embedded Ethernet and Internet Complete,

    Lakeview Research, September 2003. ISBN: 1-931448-00-0.

    [2] C. Venkatramani and T. S. Chiueh, Supporting real-timetraffic on Ethernet, Proc. IEEE RTSS94, pp. 282-286, Dec.

    1994.

    [3] D. W. Pritty, J. R. Malone, S. K. Banerjee and N. L. Lawrie,

    A real-time upgrade for Ethernet based factory networking,Proc. IECON, pp. 1631-1637, 1995.

    [4] Malcolm, N. and Zhao, W., The timed token protocol for

    real-time communication, Proc. IEEE Computers, 27(1): 35 41,

    1994.[5] S. Varadarajan and T. Chiueh, "EtheReal: A host-transparent

    real-time Fast Ethernet switch", Proc. ICNP, Oct. 1998.

    [6] H. Hoang and M. Jonsson, "Switched Real-Time Ethernet

    with Earliest Deadline First Scheduling - Protocols and Traffic

    Handling", Proc. WPDRTS2002, Fort Lauderdale, Florida,

    USA.[7] Z.P. Wang, G.Z. Xiong, J. Luo, M.Z. Lai and W. Zhou, A

    hard real-time communication control protocol based on the

    Ethernet, Proc. PART2000) pages 161170, Sydney, Australia,Nov. 2000. Springer-Verlag. ISBN 962-430-134-4.

    [8] J. Loeser and H. Haertig, Low-latency hard real-time

    communication over switched Ethernet Proc. 16th Euromicro

    Conference on Real-Time Systems, Catania, Sicily, July 2004.[9] S. Ouni and F. Kamoun, Hard and soft real time messagescheduling on Ethernet networks, Proc. 2002 IEEE SMC, vol. 6,

    October 6-9, 2002, Hammamet, Tunisia.

    [10] C. Bergenhem and M. Jonsson, Fiber-ribbon ring network

    with inherent support for earliest deadline first messagescheduling, Proc. WPDRTS'2002 in conjunction with

    IPDPS'02, Fort Lauderdale, FL, USA, April 15-16, 2002.

    [11] C. L. Liu and J. W. Layland, "Scheduling algorithms for

    multi programming in hard real-time traffic environment",Journal of the Association for Computing Machinery, vol. 20, no.1, Jan. 1973.

    [12] Phillip A. Laptane, Real-Time System Design and Analysis,

    IEEE Press, third edition 2004. ISBN: 0-471-22855-9.

    Proceedings of the 19th International Conference on Advanced Information Networking and Applications (AINA05)550-445X/05 $20.00 2005 IEEE