Review and performance evaluation of FIFO, PQ, CQ, FQ, and WFQ algorithms in multimedia wireless sensor networks

The best service mechanism in multimedia wireless sensor networks can be achieved based on the multimedia traffic flow by developing a proper simulation algorithm process model, to be a trustable indication for real implementations, which is proposed in this article, together with the algorithm model outcome analysis. The quality estimation of the proposed mechanism is investigated by simulating real data transmission and obtaining the integral criterion of the processed mechanism, to determine the queue formation and loading control. Accordingly, it was proved that the first-in first-out algorithm is not useful as a flow algorithm; however, it is regarded as suitable to be considered as the benchmark algorithm when compared with the other algorithms such as priority queue, custom queue, fair queuing, and weighted fair queuing algorithms. Finally, each algorithm’s advantages and disadvantages were verified and the best usage conditions according to certain parameters, such as packet loss probability, average time delay, and jitter, were declared.


Introduction
There are several techniques used to achieve the required quality in multimedia wireless sensor networks (WSNs) and core communication networks, such as in Attar 1 where the traffic engineering was determined for a certain required quality of service (QoS) using the optimum traffic management, routing mechanism, and switching operation. In Alhihi et al., 2 a multipath routing algorithm was investigated, then the shortest path was evaluated, and the maximum flow that can meet the required QoS was provided, while in another study by Alhihi et al. 3 the performance impact of the routing methods was inspected. A valuable understanding of the routing strategies that is related to the QoS can be gained from Alhihi 4 and the references therein, where a comparative analysis was performed to obtain a satisfactory QoS, unlike the proposed work where a fixed required level of quality is used to determine the easiest service map that controls the queue formation and the transmitted load.
Several map modeling methods are adapted in the work proposed in this article, as in Pan and Yang, 5 and the modeling outcomes for an algorithm, namely, firstin first-out (FIFO), are shown using the easiest service map; however, in Pan and Yang, 5 the packet priority was not taken into account because the service was investigated over the Open Systems Interconnection (OSI) level as in Day and Zimmermann, 6 which justifies the reason why the values of the obtained quality parameters for each service are very similar, that is, neither the stream type nor setting the network flow parameters has any effect, which is the reason why this service algorithm is considered as improper to be used in the multiservice network. However, it can be used as an acceptable comparison algorithm for other more complicated algorithms. Network performance and adequacy were analyzed for a practical routing protocol in Alhihi,7,8 which optimized the traffic distributing multiple independent paths, based on the maximum flow and multipath delay.
In Mrena et al., 9 three implementations of priority queue (PQ), namely, are Fibonacci heap, Brodal queue, and strict Fibonacci heap, are practically investigated to find the shortest paths in Dijkstra's algorithm. The research work reported in Tabakov and Paznikov 10 presents more specific usage of PQ, where algorithms were designed for PQ selection optimization for insert/ delete operations and for balancing elements in queues. The research work reported in Strzęciwilk et al. 11 and Wu et al. 12 and the references therein present wide recent research work, mainly in PQ performance analysis using timed Petri Nets in Strzęciwilk et al., 11 and the design and implementation of an adaptive feedback queue algorithm over OpenFlow networks in Wu et al. 12 An efficient PQ with a constant response queuing time hardware architecture was presented in Kohutka et al. 13 and it was proved that it is applicable in realtime systems. Real-time research on more queuing algorithms was carried out in Proskochylo et al. 14 which investigated the real-time traffic QoS behavior, under the queuing algorithms in the process of load balancing. Indeed, Proskochylo et al. 14 provided such comprehensive study for FIFO, custom queue (CQ), PQ, weighted fair queuing (WFQ), class-based weighted fair queuing (CBWFQ), and low-latency queuing (LLQ) based on the parameters of traffic volume, traffic type, service of mixed traffic, and other parameters.
Moreover, network QoS was obtained by applying different techniques aimed to decrease the number of lost packets such as network coding technique as in Attar and colleagues [15][16][17][18] and the references therein. In this article, all the FIFO, PQ, CQ, FQ, and WFQ algorithms are investigated, evaluated, and compared. Hence, this article analyses and evaluates the traffic type parameters such as the number of lost packets, probability of packet loss, average delay, and jitter. Accordingly, the traffic types such as videoconference, IPTV (Internet Protocol television) multicast, web traffic, IP (Internet Protocol) telephony, video-on-demand, and the service data general flow are compared according to the applied traffic queuing algorithm, particularly, FIFO, PQ, CQ, FQ, and WFQ in multimedia for WSNs.
The outcome of the comparison mentioned above decides which algorithm is recommended to be implemented based on the proposed application. The rest of the article is organized as follows: section ''Methods and modeling'' shows the modeling method for the performed work to show the mechanism using which the network parameters were obtained and evaluated, and this section also presents the application of the FIFO, PQ, CQ, FQ, and WFQ algorithms over several communication applications and their outcomes; section ''Results and analysis'' shows the results and analysis of the investigated algorithms; and finally section ''Conclusion'' concludes the article and gives the recommended algorithm for different applications based on the values of algorithm parameters.

Methods and modeling
The proposed estimation parameter can be determined according to the following integral criterion formula where K Alg is the enhancement estimation of the quality parameter for the algorithm under evaluation (FIFO, CQ, PQ, FQ, and WFQ), A p-i is the initial value of the ith parameter quality (packet loss probability, delay time, and jitter), A i is the current value of the ith parameter quality for the algorithm under evaluation, k i is the importance coefficient of the ith parameter quality, and m is the parameter number that is compared. In the work proposed in this article, m = 3 for the three parameters; the algorithms are FIFO, CQ, PQ, FQ, and WFQ; and i is the name of the parameter (packet loss probability, delay time, and jitter). The queue services formulated in this article are simulated in a developed model based on the data priority proposed in Sonia et al. 19 for multiservice network queue services. A model comprehended using MATLAB was simulated in a problem-solving environment according to the operating model illustrated using the block diagram shown in Figure 1. It can be observed from the block diagram that the number of packets and the packet buffer size are essential when determining the other parameters. Hence, the results adopted in this article are collected by specifying a packet arrival loaded data file intensity for each network flow and then setting the observation time to time interval at 1 s. Each specific network flow packet that falls into the corresponding time interval is then classified and analyzed.
The analysis of the packet in the current time interval decides whether the packet is able to be served, registered at the buffer, or discarded. If the packet is confirmed not to be discarded, then the selection of the algorithm is performed and, based on the selected algorithm, the parameters are determined for each flow. Taking this into consideration, in this article, just five algorithms are simulated which are FIFO, PQ, CQ, FQ, and WFQ.
The parameters to provide the best QoS were presented in Sonia et al. 19 and Roger et al., 20 so the packet loss probability is given by equation (2) where P loss is the amount of lost packets to the total number of packets, that is, the packet loss probability; N is the total packet number; and n k is the number of lost packets within the period K. The delay time is identified as the sum of processing time, service waiting time in the buffer, and the time of the packet in and out to the bus. Accordingly, the delay time depends on the packet length and the speed of the packet in and out to the bus, which are assumed to be the same as shown in equation (3) where T S is the total service time, T b is the waiting time of the packet in the buffer, V bus is the speed of the packet input and output of the bus, R pack is the packet length, and T p is the packet processing time.
The jitter time is measured for an average jitter value for N packets, which is the average difference between the average delay value and the specific delay time for the N received packets, as shown in equation (4) where T j is the average jitter value for N packets, T i is the delay of the ith packet, and T ave is the average delay value.

Modeling outcomes for the FIFO algorithm
In the FIFO algorithm, data buffering is organized and manipulated based on the fact that the first entered data are processed first, that is, the first come, first served behavior. Hence, in this section, simulated data transmission using the MATLAB programming language was implemented using the FIFO algorithm, the results were analyzed for the received data flow, and the outcome of this study confirms that the packet loss is considered as high and inaccessible for multiservice data flow, telephony, and video communication. The reason for this impropriate behavior of the FIFO algorithm is the large average delay and the large average jitter as shown in Table 1, according to the standards indicated in the schedule below. The collected data shown in Table 1 match the results reported in Pan and Yang, 5 where all the traffic type flows show a similar behavior. This similarity enables FIFO to be the benchmark system in this article; accordingly, the rest of the algorithms for the traffic types are compared with FIFO.

Modeling outcomes for the PQ algorithm
In PQ, the data element is given a regular queue with a certain priority associated with it, where the element with high priority is processed before the one with low priority; in such scenario, when two elements have the same priority, the first to queue element is processed first.
The algorithm of PQ was used for four queues with the different priority traffic in Amit. 21 The entered service data packets were queued according to their priority, that is, the packet with the highest priority is the first to be entered. Accordingly, this article assumes that the highest priority is for videoconference and telephony, with an average priority for IPTV, while the lowest priority is given for the lower web traffic as assumed in Palkopoulou et al. 22 It can be concluded from the analysis of the obtained results that when ignoring the packet loss and taking the low delay and jitter into account, the most prioritized flows (service data, IP telephony, and video-ondemand) were served, and videoconference with low packet loss can be applied under the required quality assurance for these flows, but it blocks the lowprioritized flows (IPTV and web traffic), which means that the processor resource was mainly directed to the processing of the higher prioritized streams and was not released for the low-priority ones. Table 2 shows the QoS using the PQ algorithm.
Finally, when comparing Table 1 (FIFO) and Table  2 (PQ), the results show clearly that the traffic types with higher priority have better packet loss probability, less average time delay, and less jitter time. However, this improvement is in the cost of the low-priority traffic types as the packet loss probability becomes worse  and the same manner of performance degradation is noticed for the average delay time and jitter time.

Modeling outcomes for the CQ algorithm
In the CQ algorithm, each queue is given a certain weight, so the non-empty queues are processed based on their queue weights, where the queue weight is normalized by dividing the queue weight by the average packet size. Based on the above identification of CQ, it is clear that this algorithm is more suitable for identical packet size than variable packet sizes because, in the case of variable packet size, the packet size mean is required to be known in advance.
The obtained results for all the parameters using this algorithm satisfy the boundary conditions for each flow, except the case for the number of lost packets for IP telephony, which exceeds the value for this service. 23 The high QoS achieved with the help of this algorithm is determined by the changeable allocation of buffer memory according to the intensity of certain flow and by the weighted round-robin servicing. But still the average packet length is not considered though it is important; we assume that the small packet sizes (service data and video-on-demand) are represented with non-loss of flows, while the high flow loss is for large packet sizes. Table 3 shows the QoS using the CQ algorithm.
It is clear when comparing Table 2 (PQ) and Table 3 (CQ) that videoconference traffic flow has such a small packet loss probability which is justified by the small packet size. However, both the average delay time and jitter remain the same in both algorithms. The same observation can be extended to IPTV multicast, web traffic and IP telephony.

Modeling outcomes for the FQ algorithm
The FQ algorithm is usually implemented for limited resource networks to basically prevent the flows of large packets from consuming more throughput or CPU time than other flows or processes, that is, it is an algorithm applied to achieve fairness in sharing the network resources. The FQ algorithm is modeled according to Schmidt and Rutland, 24 which performed with the lowest loss for all flows, making this algorithm equipped with a high-compatibility mechanism for the multimedia traffic; however, the values of delay and jitter are around 10%-20% higher than those in the previous algorithms, despite the fact that they do not exceed the allowable values. The QoS using the FQ algorithm is shown in Table 4.
Hence, the gained packet loss probability in FQ is in the cost of average delay and jitter.

Modeling outcomes for the WFQ algorithm
WFQ is a natural extension of FQ, so it allows the schedulers to give each flow a specific capacity fraction. For this algorithm, the obtained results for all  parameters satisfy the formulated requirements of each service shown in Balogh and Medvecky´. 25 The losses, the delay, and the jitter do not exceed the boundary values. It is practically verified that this algorithm permits qualitative service of multimedia traffic. Table 5 shows the QoS for the WFQ algorithm. It can be observed from Table 5 that the WFQ algorithm gives the best average parameters, that is, all parameters are regarded as neither the best nor the worst, though they are all in their acceptable ranges, which makes this algorithm the most applied one among the other algorithms.

Results and analysis
In this section, the service parameters will be analyzed and discussed rather than the algorithms themselves. The reason for such analysis is the fact that any application requires specific parameters as most priority, and others as less. Accordingly, this analysis makes it clear to know which algorithm to apply for a proposed application, which is the research outcome from the algorithm analysis proposed in this article, taking into consideration the fact that the service quality is the main criterion which must be maintained within the boundary conditions. The results of the simulation functioning model are presented in Figure 2 for the packet loss probability for all the investigated algorithms.
It can be observed from Figure 2 that the packet loss probabilities for both FQ and WFQ are regarded as applicable for all traffic types. For the CQ algorithm, the probability is less suitable than FQ and WFQ; however, it is still acceptable for most traffic flow applications. In PQ, the packet loss probabilities in IP telephony, videoconference, and service data traffic flow are acceptable as well, but for web traffic, videoon-demand, and IPTV multicast the packet loss probabilities are regarded as high and not acceptable; in fact, the value for web traffic is disastrous. Hence, for these three types of traffic, PQ is considered as not acceptable for most of the practical applications in terms of packet loss probability. Figure 3 shows how all algorithms behave in a similar manner when changing the type of the traffic flow, that is, service data traffic flow has the less average delay in all algorithms, followed, respectively, by videoconference, IP telephony, IPTV multicast, video-ondemand, and web traffic. Moreover, it can be proven from Figure 2 that service data traffic flow has the best average delay time in all algorithms, though it is regarded as the high delay time in FIFO which exhibits the shortest time delay.
The average time delay for web traffic is regarded the worst as it reaches 3.5 ms. Finally, it can be concluded from Figure 2 that WFQ is the best algorithm, followed, respectively, by FQ, CQ, PQ, and FIFO. Figure 4 illustrates the jitter parameter behaviour for all traffic types, accordingly, the web traffic has the best jitter for all algorithms; moreover, the CQ, PQ, and WFQ algorithms have better jitter than the other algorithms. FQ has an acceptable jitter though it is worse than CQ, PQ, and WFQ. Moreover, web traffic has the worse jitter among all of the traffic types. Based on equation (1), Table 6 shows the comparison of the proposed algorithms. Table 7 shows the comparison of the quality parameter improvement for the proposed algorithms.
Moreover, it is notable from Tables 6 and 7 that the usage of queue service algorithms, the ordered service  CQ and the proportional service FQ, enhances the service quality twice, and the WFQ algorithm does so fivefold when compared to the FIFO algorithm.
It can be observed from Figures 5-7 that FQ has the best packet loss probability, WFQ has the best delay time, and FQ has the worst jitter time, respectively.

Conclusion
In this article, different flow types were investigated to determine the QoS parameters, such as packet loss probability, delay, and jitter, for the FIFO, PQ, CQ, FQ, and WFQ algorithms. The results indicated that the FIFO algorithm is not useful for the service data but it is useful as a suitable comparative algorithm, the PQ algorithm was developed for high-prioritized flows, and the WFQ algorithm showed the average best modeling outcomes because all of its parameters were within the boundary conditions for all types of the investigated data flow. Most importantly, those WFQ parameters were in the boundary limits and thus considered not high. The integral criterion of the service quality estimation showed that this algorithm is the most appropriate for multiservice traffic control, and it can provide satisfactory service quality in terms of all parameters. This approach can be used during the design stage, as well as during the network performance optimization stage. Finally, the packet loss probability, average delay time, and jitter parameters have been investigated for all traffic types to evaluate the behavior of all the algorithms based on a certain required parameter, which shows that FQ is regarded as the best algorithm to be applied in transmission networks with high-packet-erasure-probability channels, as it has the best (lowest) packet loss probability, where PQ is regarded as the worst, and hence it should be applied just over low erasure channel probability. Moreover, FQ is regarded as the worst algorithm in terms of jitter which is 0.07 ms compared to the other algorithms, all of which have jitter times just above 0.01 ms. On the other hand, WFQ is considered as the algorithm with less delay time, which is around 1.3 ms, which makes it recommended to be used in real-time applications, where the FQ, CQ, and PQ algorithms have almost the same average time delay around 4 ms.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.