Question
- In this assignment you will implement a queue structure that emulates what goes on inside many modern routers.
- We will implement an output port that supports 4 traffic classes and random early detection (RED) of queue congestion.
- Refer to the next diagram
In this assignment you will implement a queue structure that emulates what goes on inside many modern routers. We will implement an output port that supports 4 traffic classes and random early detection (RED) of queue congestion. Refer to the next diagram Packets arrive at random intervals and are added to the appropriate queue (subject to RED) The scheduler is called at regular intervals and removes the first packet from the scheduled queue The scheduler keeps track of the next queue to check If a scheduled queue is empty, the next queue is checked (watch for infinite loops!) Each traffic class has a counter that is the current number of packets in the queue This counter can be queried at regular intervals to derive the mean queue length A simplified RED algorithm does this: Checks the current queue size before inserting a packet If the size > 90% maximum size, the packet is dropped with probability p Each class queue should also keep a counter of the number of dropped packets Each queue element is a integer that represents the packet size in bytes We will assume the packet sizes do not affect anything Use pthreadsto make this project easier What you implement A set of C functions to: Create a set of 4 queues of maximum size N A function to remove a packet from the head of a queue, if it is non empty A function to insert a packet at the tail if the RED criteria are not met, otherwise the packet is not inserted and the dropped counter is incremented A round robin scheduler Does this project require dynamic lists? Does it require random access? Does it require static data storage? Why? What is the exact definition of your queue tail pointer? (points to last element or next available slot?) Can these queues ever overflow? How is this handled?
Explanation / Answer
i dont know c++