项目作者: JaturongKongmanee

项目描述 :
A simple tool to simulate a simple inter-process communication protocol.
高级语言: C
项目地址: git://github.com/JaturongKongmanee/heart-beating.git
创建时间: 2019-03-16T04:48:18Z
项目社区:https://github.com/JaturongKongmanee/heart-beating

开源协议:MIT License

下载


Heart-beating

Introduction

To simulate a simple inter-process communication protocol using CSIM.

  • There are five nodes in the network. Each node is fully connected to each others.
  • Each node generates a HELLO packet with the inter arrival time of exponential distribution (average 5 seconds).
  • A sending node transmits a HELLO packet to a randomly chosen receiving node. A receiving node replies a HELLO_ACK packet back after it receives packet.
    If the sending node receives the HELLO_ACK, the transmission is successful.
  • The transmission time is 0.1.
  • The transmission delay (e.g., local processing time) is 0.2.
  • The loss probabilities of packet are (0.1, 0.2, 0.3, 0.4, 0.5), due to the unreliable network quality.
  • The timeout period is 2 seconds. If sending node does not receive the HELLO_ACK packet within timeout period, it retransmits a HELLO packet.
    If sending node still does not receive the HELLO_ACK, then transmission is failed.

    Getting Started

    Prerequisites

    1. csim64.gcc project.c -o project
    2. ./project
  • Specify a loss probability of packet.
    1. Enter a loss probability value:
  • Example of statistical results.
    1. Statistics of loss probability: 0.300000
    2. Average number of successful transmissions 0.59
    3. Average number of failed transmissions 0.41
    4. Average roundtrip time 0.50
    5. Node 0 generates 108 packets
    6. Node 1 generates 120 packets
    7. Node 2 generates 90 packets
    8. Node 3 generates 110 packets
    9. Node 4 generates 116 packets

    Simulation Results

    • Sanpshot of events when packet loss probability is *0.3*
      image of simulation0


    • The performance metrics against the loss probabilities (0.1, 0.2, 0.3, 0.4, 0.5)
      image of successful vs failed transmission
      image of rtt

Author