1 / 24

Chapter 7

Chapter 7. Queue Management and Packet Scheduling 696430068 曾敬任. Outline. Queue Class (queue.cc) PacketQueue Class (queue.h) Example : Drop-Tail Queue objects 種類介紹 JoBS 簡介 抽考. Outline. Queue Class (queue.cc) PacketQueue Class (queue.h) Example : Drop-Tail Queue objects 種類介紹

harper
Télécharger la présentation

Chapter 7

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. Chapter 7 Queue Management and Packet Scheduling 696430068 曾敬任

  2. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBS 簡介 • 抽考

  3. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBS 簡介 • 抽考

  4. Packet Scheduling & Buffer management • Packet Scheduling:決定哪個封包該被服務或drop 的過程 • Ex:FIFO、RR • Buffer management:管理封包在queue中存取的方式 • Ex:RED Buffer management- ▪ Probabilistically discard packets ▪ Probability is computed as a function of average queue size

  5. Queue class • Public: • virtual void enque(Packet*) = 0; • virtual Packet* deque() = 0; • virtual void recv(Packet*, Handler*); • void resume();

  6. Queue class • protected: • Queue(); • ~Queue(); • void reset(); • int qlim_; • int blocked_; /* blocked now? */ • int unblock_on_resume_; /* unblock q on idle? */

  7. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBS 簡介 • 抽考

  8. PacketQueue class • Queue class管理 buffer management 和 scheduling • PacketQueue 則管理如何實際 enque deque 等等的low-level operations ( 封包在 queue 裡頭的順序)

  9. PacketQueue class • public: • PacketQueue() • virtual int length() • virtual Packet* enque(Packet* p) • virtual Packet* deque() • Packet* lookup(int n) • virtual void remove(Packet*); • void remove(Packet *, Packet *);

  10. PacketQueue class • protected: • Packet* head_; • Packet* tail_; • int len_; // packet count • int bytes_; // queue size in bytes

  11. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBS 簡介 • 抽考

  12. Drop-Tail Class • class DropTail : public Queue { • protected: • void reset(); • void enque(Packet*); • Packet* deque(); • void shrink_queue(); // To shrink queue and drop excessive packets. • PacketQueue *q_; /* underlying FIFO queue */

  13. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBS 簡介 • 抽考

  14. Different types of Queue objects • 所有Queue objects都會使用的結構參數: limit_ queue容納封包的數目 blocked_ 初始值為false unblock_on_resume 初始值為true,當指定的queue裡頭最後一個封包送出即可設為1(不用等到封包received)

  15. Different types of Queue objects • Queue objects包含以下不同的種類: • Drop-Tail objects-FIFO queue,沒有特別的methods 結構參數或狀態變數 • FQ objects-Fair Queuing,結構參數: secsPerByte • SFQ objects-Stochastic Fair queuing,  結構參數:maxqueue_ buckets_ • DRR objects-deficit round robin scheduling 有deficit counter用來表示這個round有多少service可以使用,如果packet size比deficit counter大,那麼在下一輪就會在這個deficit size增加quantum size。結構參數: buckets_ blimit_ quantum_ mask_

  16. Different types of Queue objects • RED-Random Early Dection 透過計算平均queue size偵測起始的congestion,當平均queue size超過預設的threshold,gateway就會根據機率對接下來每個到達的封包進行drop或mark;機率跟平均queue size有關。當封包塞滿的時候,RED會將平均queue size保持在較低的狀態。 • RED通常伴隨一個有congestion control的protocol。RED可以用來解決例如全局同步的問題。   結構參數:bytes_ queue-int-bytes_ thresh_ maxthresh_ mean_pktsize_ q_weight_ wait_ linterm_ setbit_ drop-tail_

  17. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBS 簡介 • 抽考

  18. JoBS 簡介 • Joint Buffer Management and Scheduling • 目的:根據流量分類對每個節點提供絕對和相對的loss和delay的獨立區分 • QoS constraint: • Class-1 Delay ≈ 2∙Class-2 Delay • Class-2 Loss Rate ≈ 10-1∙Class-3 Loss Rate • Class-3 Delay ≤ 5ms

  19. JoBS 簡介 • JoBS constraints: • Relative delay constraints (RDC) • Absolute delay constraints (ADC) • Relative loss constraints (RLC) • Absolute loss constraints (ALC) • Absolute rate constraints (ARC) • ALC > ADC,ARC > Relative Constraints

  20. Outline • Queue Class (queue.cc) • PacketQueue Class (queue.h) • Example:Drop-Tail • Queue objects種類介紹 • JoBs 簡介 • 抽考

  21. 抽考-模擬環境

  22. 抽考-模擬環境 • 設定兩條TCP連線,並且在TCP連線之上建立FTP應用程式,兩者速率皆相同。 • 將r到d之間的queue limit設為9 • 皆使用Drop Tail演算法 • n0從第0.1秒開始傳送封包到d,在第30秒停止 • n1從第10秒開始傳送封包到d,在第30秒停止

  23. 抽考-模擬結果 • 結果: • n0 sent packet :5367 • loss packet :0 • n1 sent packet :3 • loss packet :3

  24. 抽考-題目 • 抽考題目:透過更改queue objects ( 不更改queue limit、速率和時間等等的其他參數 ) ,使n1傳送封包的效率有顯著的提升。 • 提示:更改Drop-Tail演算法

More Related