Presentation is loading. Please wait.

Presentation is loading. Please wait.

Scheduling Mechanisms Applied to Packets in a Network Flow CSC 4320 4/15/03 By Chris Hare, Ricky Johnson, and Fulviu Borcan.

Similar presentations


Presentation on theme: "Scheduling Mechanisms Applied to Packets in a Network Flow CSC 4320 4/15/03 By Chris Hare, Ricky Johnson, and Fulviu Borcan."— Presentation transcript:

1 Scheduling Mechanisms Applied to Packets in a Network Flow CSC 4320 4/15/03 By Chris Hare, Ricky Johnson, and Fulviu Borcan

2 Goals To examine various Scheduling algorithms as applied to packets in a Network flow and determine the advantages and disadvantages of each. To examine various Scheduling algorithms as applied to packets in a Network flow and determine the advantages and disadvantages of each. To introduce a new algorithm which might reduce some of the disadvantages found. To introduce a new algorithm which might reduce some of the disadvantages found.

3 Procedure Research and Understand Scheduling algorithms. Research and Understand Scheduling algorithms. Design code to simulate a Packet generator and a Packet transmitter. Design code to simulate a Packet generator and a Packet transmitter. Include 4 different scheduling algorithms including one we created. Include 4 different scheduling algorithms including one we created. Develop code which outputs the Turnaround times and Waiting times for packets generated with respect to each scheduling algorithm. Develop code which outputs the Turnaround times and Waiting times for packets generated with respect to each scheduling algorithm. Examine and discuss the results. Examine and discuss the results.

4 Packet Transmission Packets are transmitted through various protocols Packets are transmitted through various protocols Important characteristic of Packets: Important characteristic of Packets: Size – may be fixed or variable Size – may be fixed or variable We use 64k for Max Packet size and 10M for Max DataStream We use 64k for Max Packet size and 10M for Max DataStream Type of Service – (e.g. HTTP, FTP, TELEPHONY, MPEG, ETC)- We use these types to differentiate between the different queues. Type of Service – (e.g. HTTP, FTP, TELEPHONY, MPEG, ETC)- We use these types to differentiate between the different queues. Other Schemes can use the following to differentiate the queues: Other Schemes can use the following to differentiate the queues: Source Source Destination Destination Bandwidth requested – the speed of transmission(bits per second) Bandwidth requested – the speed of transmission(bits per second)

5 Packets can be sent to a central router which can then be sent to selected destinations. Packets can be sent to a central router which can then be sent to selected destinations. The Quality of Service delivered to the packet flow is a function of many factors including: The Quality of Service delivered to the packet flow is a function of many factors including: Limitations of sender Limitations of sender Bandwidth limitations due to network congestion Bandwidth limitations due to network congestion Limitations of the router Limitations of the router Scheduling Algorithm utilized by the scheduler Scheduling Algorithm utilized by the scheduler Unlike “processes” which can be split up by the CPU in terms of time, packets must be kept together and can not be split up. Unlike “processes” which can be split up by the CPU in terms of time, packets must be kept together and can not be split up. Packets can also be lost or dropped due to Network congestion. Consequently, retransmission can cause slower service. Packets can also be lost or dropped due to Network congestion. Consequently, retransmission can cause slower service.

6 Scheduling Mechanisms Many algorithms used to select among the waiting packets include: Many algorithms used to select among the waiting packets include: FIFO(first in first out) FIFO(first in first out) Priority Priority Round Robin Round Robin Including Weighted Fair Queuing variations Including Weighted Fair Queuing variations Allows for weighting of queues in order to give differential amount of service in any interval of time Allows for weighting of queues in order to give differential amount of service in any interval of time

7

8

9 FIFO Packets are sent based on Arrival Time Packets are sent based on Arrival Time First packet in is the first packet out First packet in is the first packet out Only one queue is used Only one queue is used Priority is ignored Priority is ignored “Unfair” in terms packet size “Unfair” in terms packet size Large packets inhibit traffic flow Large packets inhibit traffic flow Can not guarantee bandwidth requests Can not guarantee bandwidth requests

10 Priority Involves more than one queue Involves more than one queue Packets are sent based on their priority Packets are sent based on their priority Packets are placed in queues based on their TOS (Type of service) ; each queue is then assigned a priority. Packets are placed in queues based on their TOS (Type of service) ; each queue is then assigned a priority. Many priority schemes are possible Many priority schemes are possible Packets in high priority queues sent first Packets in high priority queues sent first High priority packets receive fastest service High priority packets receive fastest service Unfair towards low priority packets Unfair towards low priority packets Low priority packets are completely starved if high priority packets exist continuously Low priority packets are completely starved if high priority packets exist continuously

11 Round-Robin Involves more than one queue Involves more than one queue Many schemes possible for creating queues: Many schemes possible for creating queues: Type of Service Type of Service Bandwidth Bandwidth Source Source Destination Destination Scheduler selects packets from each queue in sequence Scheduler selects packets from each queue in sequence Prevents starvation of any particular queue Prevents starvation of any particular queue No regard for priority or size No regard for priority or size Checking empty queue can cost time Checking empty queue can cost time

12 Suggest New Algorithm Priority-Round Robin Hybrid Priority-Round Robin Hybrid  Several Queues are created based on the type of service  Scheduler gives top priority to one. All others have second priority. Scheduler selects packet from highest priority. The selection of packets among the other queues is done in a round robin fashion.  In order to prevent starvation of any queue, top priority queue is limited to 4 consecutive turns

13 Top Priority Queue 2nd Priority If Packets exist in this queue it will be selected but only for 4 turns Then a turn is allocated to one of the other three queues in a round robin fashion

14 Packet Traffic Simulator Random Data Streams are created (0-1M) Random Data Streams are created (0-1M) Random TOS set to Data Stream Random TOS set to Data Stream Stream is cut into to packets of Max size 64 K Stream is cut into to packets of Max size 64 K Packets are given an arrival time Packets are given an arrival time Packets are then copied and placed in different queues so that the different scheduling algorithms can be tested Packets are then copied and placed in different queues so that the different scheduling algorithms can be tested Packet FIFO QUEUE PRIORITY QUEUES ROUND ROBIN QUEUES PRIORITY ROUND ROBIN QUEUES

15 Type of Service Queues FIFO QUEUE – only 1 queue FIFO QUEUE – only 1 queue Priority, Round Robin, and Priority RR: Priority, Round Robin, and Priority RR: Packets placed in 1 of 4 based on TOS: Packets placed in 1 of 4 based on TOS:  Telephony  HTTP  MPEG  FTP

16 Output Scheduler The queues are then polled according to the different algorithms and are subsequently dequeued The queues are then polled according to the different algorithms and are subsequently dequeued When they are selected for output their waiting times are computed When they are selected for output their waiting times are computed If the packet is the last packet for a particular data stream, a turnaround time can then be calculated If the packet is the last packet for a particular data stream, a turnaround time can then be calculated

17 2 Threads Run Simultaneously Traffic Generator enqueues a packet Traffic Generator enqueues a packet Output Scheduler dequeues a packet Output Scheduler dequeues a packet

18 Results FIFO tends to have the longest waiting times and turnaround times FIFO tends to have the longest waiting times and turnaround times The Round-Robins usually have the lowest (but not allways). Queues are generally prevented from starvation. The Round-Robins usually have the lowest (but not allways). Queues are generally prevented from starvation. Priority sometimes shows the shortest avg waiting times and turnaround times. However, this is usually due to biase towards the incredibly fast rate of the high priority queue. Unfortunately FTP queue is heavily starved and has the longest waiting times Priority sometimes shows the shortest avg waiting times and turnaround times. However, this is usually due to biase towards the incredibly fast rate of the high priority queue. Unfortunately FTP queue is heavily starved and has the longest waiting times The Priority Round Robin often has shorter average waiting times than most. Unlike regular priority no queue is starved. The Priority Round Robin often has shorter average waiting times than most. Unlike regular priority no queue is starved.

19 Implication for Future Algorithms While prioritizing queues allows for faster transmissions for some, other queues suffer While prioritizing queues allows for faster transmissions for some, other queues suffer Ideally, the aim should be at reducing the overall average waiting times while at the same time trying to be a “fair” as possible to all queues. Ideally, the aim should be at reducing the overall average waiting times while at the same time trying to be a “fair” as possible to all queues. Algorithms should take into account the speed at which data streams are received and the amount of data coming from different priority streams Algorithms should take into account the speed at which data streams are received and the amount of data coming from different priority streams


Download ppt "Scheduling Mechanisms Applied to Packets in a Network Flow CSC 4320 4/15/03 By Chris Hare, Ricky Johnson, and Fulviu Borcan."

Similar presentations


Ads by Google