From: Patrícia B. F. <pat...@ya...> - 2010-04-07 14:22:51
|
I'm trying to implement another packet scheduler, but before I decided to do some tests. I created a classe FIFOModifyScheduler with the following changes. Then I ran the example: Network - example03, but it didn't function. FIFOModifyScheduler.java public synchronized Packet deque() { if (pktList.size() == 0) { return null; } // Packet p = (Packet) pktList.remove(0); // original Packet p = (Packet) pktList.remove(pktList.size()-1); // my test return p; } How do I implement the modified algorithm? Regards, Patrícia |