From: Patrícia B. F. <pat...@ya...> - 2010-04-14 21:08:22
|
I read the article: Anthony Sulistio, Gokul Poduval, Rajkumar Buyya, Chen-Khong Tham. On incorporating differentiated levels of network service into GridSim. Future Generation Computer Systems 23 (2007) 606–615. ".....A packet scheduler is responsible for deciding the order in which one or more packets will be sent downlink. Implementing a packet scheduler requires extending from class PacketScheduler. In Gridsim, three implementations of the packet scheduler are provided i.e. class FIFOScheduler, SCFQScheduler and RateControlledScheduler." I followed the directions and created a class LIFOScheduler for tests. The LIFOScheduler class is equal the FIFOScheduler class only with an alteration, as below. 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; } When I executed it didn’t function, enter into the loop. Please can someone help me? Regards,Patrícia |