1 / 87

Lab 3. DBA Algorithm

Lab 3. DBA Algorithm. Chuan- Ching Sue DCNLAB, CSIE NCKU suecc@mail.ncku.edu.tw. Outline. Dynamic Bandwidth Allocation Algorithm Objective of DBA Interleaved Polling with Adaptive Cycle Time (IPACT) IPACT Services Implement DBA algorithm Conclusion.

hagen
Télécharger la présentation

Lab 3. DBA Algorithm

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lab 3. DBA Algorithm Chuan-Ching Sue DCNLAB, CSIE NCKU suecc@mail.ncku.edu.tw

  2. Outline • Dynamic Bandwidth Allocation Algorithm • Objective of DBA • Interleaved Polling with Adaptive Cycle Time (IPACT) • IPACT Services • Implement DBA algorithm • Conclusion

  3. Dynamic Bandwidth allocation algorithm

  4. Maximum Transmission Window • If the OLT authorizes each ONU to send its entire buffer contents in one transmission, ONUs with high data could monopolize the entire bandwidth. • To avoid this situation, OLT will limit the maximum transmission size • Too large: increase delay for all packets • Too small: guard times will waste bandwidth

  5. Maximum Transmission Window (Cont’d) • Each ONU have the maximum bandwidth to transmit the data.

  6. Two Categories of Bandwidth Allocation • Static bandwidth allocation (SBA) • OLT allocates a fixed timeslot to each ONU in every cycle. • Dynamic bandwidth allocation (DBA) • OLT allocates the timeslot depend on the REPORT of each ONU in every cycle.

  7. Comparison of the Two Mechanisms • Static bandwidth allocation (SBA) • The algorithm is much simpler. • The average packet delay is longer than DBA. • Dynamic bandwidth allocation (DBA) • The algorithm is more complex than SBA. • The average packet delay can be shorter.

  8. Objective of DBA

  9. Objective of DBA • A good bandwidth allocation algorithm can let the data transmitting efficiently. • Decrease the average packet delay • Increase the throughput • Decrease the drop probability • The DBA algorithm for example here is based on the interleaved polling with adaptive cycle time (IPACT) method [1].

  10. Interleaved Polling with Adaptive Cycle Time (IPACT)

  11. Sequential Timeslot Assignment • The OLT assigns a timeslot to ONU i only after the data from ONU i-1 have been received • The scheme is very inefficient, because after a GATE has been sent, the channel would remain idle for the entire round-trip time. • In EPON, the distance between the OLT and an ONU can reach 20 km, so the walk-time could be as high as 200 μs.

  12. Pipelined timeslot assignment • To eliminate the walk-time overhead, MPCP allows a pipelined timeslot assignment. • In this mode, the OLT may send a GATE to ONU i before data from ONU i-1 have arrived. • The pipelined mode requires the OLT to know the round-trip time to each ONU. The OLT is able to calculate future time when all pending transmissions will complete and the upstream channel will become idle, and to schedule the following timeslot to start at that time.

  13. Example - IPACT • Initially, OLT keeps how many bytes are waiting in each ONU’s buffer and round-trip time (RTT) in a polling table. • OLT sends a GATEto ONU1, allowing it to send data. • A Grant should contain the ID of the destination ONU, the size of the granted window.

  14. Example – IPACT (Cont’d)

  15. Example – IPACT (Cont’d) • The OLT can calculate the time when the last bit from ONU1 will arrive. Hence, it will know when to send the GATE to ONU2 so that its data is tailed to the end of ONU1’s data. • By keeping track of times when GATE s are sent out and data is received, the OLT constantly updates the RTT entries for the corresponding ONUs.

  16. Example – IPACT (Cont’d)

  17. Example – IPACT (Cont’d) • Upon receiving the Grant from the OLT, ONU1 starts sending its data up to the size of the granted window. • At the same time the ONU keeps receiving new data packets from users • At the end of its transmission window, ONU1 will sent Request tells the OLT how many bytes were in ONU1’s buffer and The OLT will update new request in polling table

  18. Example – IPACT (Cont’d)

  19. Example – IPACT (Cont’d) • If an ONU emptied its buffer completely, it will report 0 bytes back to the OLT. • In the next cycle, the ONU will be granted 0 bytes, that is, it will be allowed to send a new Request, but no data.

  20. IPACT Services

  21. IPACT Services • Fixed service • Gate service • Limited service • Constant credit scheme • Linear credit scheme • Elastic service

  22. IPACT-Fixed Service • This scheduling discipline ignores the requested window size and always grants the maximum window. • This approach Corresponds to the fixed TDMA PON system • Formula:

  23. IPACT-Gated Service • This scheduling discipline ignores the requested window size and always grants the ONU’s demand. • Formula:

  24. IPACT-Limited Service • It grants the requested number of bytes, but no more than Wmax. • It is the most conservative scheme and has the shortest cycle of all the schemes. • Formula:

  25. IPACT-Constant Credit Service • This scheme adds a constant credit to the requested window size • This service assume that an ONU will receive some packets between the ONU sent a Request and received the Grant. • The granted window size equals requested window + credit, these packets will not have to wait for the next grant. They will be transmitted with the current grant, and the average packet delay will be lower than non-credit service. • Formula:

  26. IPACT-Linear Credit Service • This scheme uses a similar approach to the constant credit scheme. • The size of the credit is proportional to the requested window. • The reason is that if we observe a long burst of data, then this burst is likely to continue for some time into the future. The arrival of more data during the last cycle time may signal that we are observing a burst of packets.

  27. IPACT-Elastic Service • The maximum window is granted in such a way that the accumulated size of last N Grants (including the one being granted) does not exceed N x BMAX bytes (where N is the number of ONUs).

  28. Implement DBA algorithm

  29. Simulation Configuration • Simulation environment is set as below. • EPON upstream transmission rate: 1 Gbps • Number of ONUs: 16 • Transmission cycle: 2 ms • Guaranteed bandwidth for all ONUs: 24952 bytes • Guard time: 1 μs (125 bytes) • OLT/ONU queue size: 10Mbytes • Distance from the OLT to each ONU: 20km • RTT: 100 μs (12500 bytes) • Upstream traffic: self-similar [5] with Hurst parameter = 0.8.

  30. Rangeof Lab 3 • Since some modules have been implemeted in the previous labs. • The network topology is followed the deployment of EPON in lab 1. • Knowing that the user module has be done in lab 2. • The undefined modules such as the OLT, the ONU and the splitter will be defined in lab 3. • Moreover, a simple MPCPDU will also implemented in lab 3.

  31. Steps for Lab 3 • Create MPCP message • Create Splitter module • Create ONU module • Create OLT module • Reuse User module from lab 2

  32. MPCP • In lab 3, we use a reduced Multi-Point Control Protocol. Only Gate and Report will be used in this simulation. • A Gate contains • LLID, start time, length • A Report contains • LLID, bandwidth requirement

  33. Create MPCP Message • Open the EPON project in lab 1. • Create a msg file in the folder to define the MPCP message

  34. Input msg File Name • Here we take “mpcp.msg” as an example

  35. Edit mpcp.msg • The Gate message containLLID, start_time and length • The Report message contain LLID and require_bandwidth

  36. Create C++ code for MPCP • Build the project and it will create two files • mpcp_m.h • mpcp_m.cc

  37. Create Splitter Class • Create Splitter.h and Splitter.cc in src folder

  38. Input Splitter Class Name • Input class name “Splitter” • Note that the class mustbe the same as the name of splitter in device.ned file. • case sensitive

  39. Edit Splitter.h • The Splitter module should • broadcast all messages from the OLT to all ONUs • pass messages and data from all ONUs to the OLT

  40. Create ONU Module • Create Onu.h and Onu.cc in src folder • Note that the class mustbe the same as the name of ONU in device.ned file. • case sensitive

  41. Edit Onu.h • A ONU module should contain • a buffer to restore data packet temporarily. • cached start time and length to know when to transmit data and report message. • maximum buffer size and maximum windows size for DBA agent

  42. Handling Gate Message • When an ONU received a Gate Message • First, the ONU should check the Gate is belong to the ONU. • Second, the ONU should cache the start time and length from the Gate message and wait to the start time to transmit data.

  43. Handling Data Packet • When an ONU received a data packet • If the ONU’s buffer has space to contain the income packet, then the ONU will buffer it. • Otherwise, the packet will be dropped.

  44. Handling Self-Event • The self-event “send_event” is used to notify the ONU itself to send data packet • ie. it’s the time slot of the ONU • If the remainder slot size is big enough to transmit data packet, the ONU will transmit data packet from its buffer. • Otherwise, the ONU will transmit a report message to the OLT

  45. Sending Report Message • The Report message should carry the ONU’s state • Llid • bandwidth requirement

  46. Create OLT Module • Create Olt.h and Olt.cc in src folder • Note that the class mustbe the same as the name of OLT in device.ned file. • case sensitive

  47. Edit Olt.h • A OLT module should contain • knowing the number of ONU, available time, maximum window size. • a buffer to contain incoming traffic like report message.

  48. Handling Data Packet • Because upstream traffic terminated at the OLT in the simulation. • When the OLT receive a data packet, the packet can be dropped immediately.

  49. Handling Report Message • When the OLT receive a report message, the OLT should process the report message immediately if the OLT is not processing other report message. • Otherwise, the OLT should finish the previous report process first.

  50. Handling Self-Event • The self-event “gate_event” is to process the gate message sending. • The OLT should check the previous available time is still available or not. • if the previous available time is out of date, then update the available time. • Second, the OLT should compute the grant length according to its DBA agent’s service. • Finally, the OLT record the start time(available time) and length into the gate message and send it to the ONU.

More Related