1. Introduction
Faced with the challenge of network congestion and packet delay resulting from the rapid surge in audio/video traffic and the proliferation of real-time industrial machine applications, there is a growing demand for the real-time transmission and processing of large-scale high-speed data across various domains. For instance, the need for swift adaptation to environmental shifts in autonomous driving, instantaneous data upload and control command delivery in telemedicine, and real-time information exchange in virtual reality systems necessitates the control of delays within the range of 1 to 10 milliseconds, with jitter control at the microsecond level [
1]. Traditional Ethernet, due to the absence of a clock synchronization mechanism, bandwidth reservation management mechanism, data packet priority, and other filtering mechanisms, as well as the incompatibility between different protocols, can only mitigate end-to-end delay to the order of tens of milliseconds [
2]. Consequently, it fails to provide the requisite quality of service (QoS) assurance for delay and jitter, and falls short of meeting the real-time deterministic transmission requirements for these applications [
3].
In November 2012, the IEEE 802.1 working group extended and upgraded Audio Video Bridging (AVB) to the Time-Sensitive Networking (TSN) working group, proposing a series of standards and specifications for link-layer enhancements and traffic policies. These primarily include standards for time synchronization, traffic scheduling, reliable transmission, and network management, aimed at extending the standard Ethernet 802.3 to support real-time and deterministic data transmission for industrial control [
4]. TSN adheres to the standard Ethernet protocol suite, naturally possessing superior interoperability advantages. It can provide deterministic latency, bandwidth guarantees, and achieve open 2-layer forwarding [
5]. TSN ensures the real-time and reliable transmission of data through a series of key technologies, such as high-precision time synchronization, resource reservation and path control, traffic shaping, and traffic matrix scheduling, thereby guaranteeing the quality of service for time-critical and event-critical applications [
6]. In deterministic transmission, packets have known and deterministic delays and are transmitted and received in a predictable manner [
7].
The currently released TSN specifications primarily cover four key areas: clock synchronization, data latency, reliability, and resource management. Among these, clock synchronization is considered the foundation of TSN technology. The IEEE 802.1AS standard precisely defines a high-precision clock synchronization mechanism, enabling devices in the network to achieve synchronization at the microsecond level. This ensures that end devices and network equipment can operate in coordination according to the same clock. In addressing scheduling and queuing mechanisms, the IEEE 802.1Qbv standard focuses on the functionality of a time-aware shaper in a strict priority mode with multiple output queues in switches. Through the use of a gate control list, this standard effectively controls the switching time window for each queue, facilitating efficient time-sensitive communication. The IEEE 802.1Qbu standard allows high-priority data to preempt low-priority data, ensuring the real-time transmission of critical control information. Regarding reliability, the IEEE 802.1Qca and IEEE 802.1Qci standards are dedicated to enhancing the reliability level of TSN networks. Additionally, the IEEE 802.1Qat and IEEE 802.1Qcc standards focus on resource management in TSN, including network topology configuration and traffic engineering specifications. These standards collectively establish a unified framework, laying the foundation for the widespread application of TSN technology. The continuous development of TSN and the ongoing updates to standards will further drive advancements in real-time communication technology, providing industries with a more efficient and reliable network infrastructure.
Traffic scheduling is a core mechanism in the TSN standard, utilizing scheduling algorithms to determine the order and timing of data frame transmission at all switch output ports. This ensures compliance with the individual latency and bandwidth requirements of each traffic flow while optimizing the overall transmission performance [
8]. TSN categorizes transmitted data into three main types based on different traffic requirements: time-triggered (TT) traffic, rate-constrained (RC) real-time traffic, and best effort (BE) non-real-time traffic [
9]. Each type of traffic imposes different demands on end-to-end latency and bandwidth within the network. Traffic scheduling, achieved through the use of scheduling algorithms, produces a scheduling table. This table is then utilized to ascertain the transmission order and timing of each data frame at the output ports of a switch. The goal is to ensure the sequential transmission of data frames on the output link without conflicts, meeting the latency and bandwidth requirements of each flow. This facilitates the coexistence of diverse traffic flows on a single network [
5]. To meet elevated QoS assurances, the selection of suitable switching systems and the proposal of more efficient switching scheduling algorithms become imperative [
10].
The commonly used high-performance packet-switching systems include output queuing systems, input queuing systems, buffered switching systems and so on [
11]. Output queuing systems can control packet delay and provide QoS guarantees [
12,
13,
14]. However, in an N-port switching system, the exchange structure needs to schedule packets at a rate N times that of the input port link, which may lead to resource wastage and poor scalability. On the other hand, input-queuing systems effectively avoid scalability issues. In an input-queuing switching system, packets first queue at the input port and then undergo transmission scheduling, largely avoiding competition at the output ports. However, the single first-in, first-out (FIFO) queue at the input port leads to head-of-line (HOL) blocking, resulting in a decrease in the switch’s throughput. Researchers have addressed the HOL problem by employing virtual output queuing at the input port [
15]. Nevertheless, input-queuing switches based on virtual output queuing still use a first-in, first-out forwarding method and do not consider the time-sensitive nature of traffic, thus failing to guarantee forwarding delays [
16,
17].
The packet switching with deadline guarantees plays a crucial role in ensuring the timely transmission of critical data packets. This technological framework enables networks to efficiently safeguard the quality-of-service performance of real-time applications, preventing a degradation in quality caused by delays in real-time traffic. Therefore, in-depth research into packet scheduling with deadline guarantees is imperative to ensure that networks can maintain the stable and reliable real-time transmission of packets, especially in environments with large switch sizes and high loads. Such research not only advances real-time communication technology but also provides industries with a more efficient and reliable network infrastructure, contributing to the innovation and development of future networks.
In order to achieve deterministic transmission, this paper transforms the packet-switching scheduling problem into a traffic matrix decomposition problem. It sets transmission deadlines, for a set of packets [
18]. In the input-queuing switching system, the aim of this paper is to find an efficient scheduling algorithm that allows as many packets as possible to be transmitted before the deadline arrives [
19,
20].
The scheduling set contains packets with the same deadline, which are classified into the same category, while packets with different deadline constraints should be classified into different categories. Therefore, the deadline-constrained packet scheduling problem can be divided into single-class packet scheduling, two-class packet scheduling, and multi-class packet scheduling based on the number of deadlines [
21]. The von Neumann matrix decomposition algorithm is directly used to decompose the traffic matrix to solve the single-class scheduling problem in reference [
22]. Unfortunately, the limitation of the von Neumann matrix decomposition algorithm is that it is only applicable to solving single-class packet scheduling problems and cannot effectively solve two-class or multi-class scheduling problems. Traditional methods for solving the multi-class scheduling problem involve using algorithms such as Earliest Deadline First (EDF) or Minimum Laxity First (MLF) and their variants as detailed in [
23,
24,
25,
26]. Traditional heuristic algorithms have the advantage of low complexity, but they also have room for improvement in QoS performance metrics, such as throughput, packet loss, and delay. Ref. [
27] proposes the iSLIP algorithm based on highest priority scheduling, which reduces the delay at the input end, but its performance is only average in non-uniform traffic scenarios. Ref. [
15] proposes a more efficient algorithm, different from traditional heuristic algorithms, such as EDF, called the Flow-Based Iterative Packet Scheduling (FIPS) algorithm. This algorithm achieves advanced scheduling by employing a maximum flow algorithm with upper and lower bounds, ensuring that packets with larger deadlines are scheduled ahead into the available time slots of packets with smaller deadlines. It improves the QoS performance to a certain extent and has been tested on large switch sizes. However, the FIPS algorithm has a high time complexity. Additionally, the FIPS algorithm requires packets in input and output ports to satisfy the scheduling conditions in two-class packet scheduling in order to complete the scheduling. In other words, as long as the traffic matrix does not satisfy the scheduling conditions, packet scheduling cannot be performed. Clearly, the FIPS algorithm places high demands on the traffic matrices in the scheduling set. Ref. [
28] proposes a nested periodic flow optimization scheduling algorithm, which decomposes multi-class scheduling problems into two-class and single-class scheduling problems through dimensionality reduction and uses an optimization solver to obtain the scheduling results. Refs. [
29,
30,
31] apply a genetic algorithm to input-queuing switching systems to solve the maximum flow in group scheduling, completing simulations with high throughput, but the article only tested it on a small switch size and has not yet verified its algorithm performance in multi-port switching scenarios. Recently, Ref. [
32] proposed an exhaustive priority service empty queue and hybrid weight algorithm, achieving high throughput and low latency under Bernoulli uniform traffic. However, when faced with bursty large traffic and multi-port scenarios, there is still room for improvement in its algorithm’s QoS performance.
Based on the research and analysis of the above algorithms, this paper proposes an algorithm, referred to as the Clock Synchronization Deterministic Network Traffic Classification Scheduling algorithm (CSDN-TCS). In single-class scheduling, this algorithm utilizes the maximum weight-matching algorithm on a per-time-slot basis to decompose the traffic matrix [
33]. It ensures that within each time slot before the deadline, each input port group can transmit the maximum number of packets to the output port without encountering competition, thereby fully utilizing time slot resources to accomplish the packet scheduling task.
In the two-class packet scheduling, the CSDN-TCS algorithm employs a maximum flow algorithm with upper and lower bounds to determine the maximum legal flow. It schedules some packets with larger deadlines ahead into the available time slots of packets with smaller deadlines. The key distinction between the CSDN-TCS algorithm and the FIPS algorithm lies in the fact that, when the FIPS algorithm satisfies the scheduling conditions for the larger deadline traffic matrix—specifically, when there is no excessive packet occurrence at each port—it ceases the advanced scheduling of packets, proceeding directly to the decomposition of the traffic matrix. If there are still idle slots in the scheduling time slots of packets with smaller deadlines, these idle slot resources cannot be fully utilized. It means that there is still room for improvement in the QoS performance of the algorithm. The proposed CSDN-TCS algorithm is based on the idea that, as long as there are available time slot resources at the input and output ports of the traffic matrix with smaller deadlines, it iteratively extracts some packets with larger deadlines. It schedules them in advance in the available time slots of packets with smaller deadlines until there are no more available time slot resources in the traffic matrix with smaller deadlines or no more packets that can be scheduled in advance from the traffic matrix with larger deadlines. The algorithm terminates under these conditions. This approach serves to enhance the throughput of the switching system and reduce the average packet delay. Simulation results show that compared with traditional EDF algorithms and FIPS algorithms, the CSDN-TCS algorithm can solve the packet-scheduling problem with deadline guarantees with lower packet loss, higher throughput, and smaller average delay. Moreover, under comparable QoS performance, the time complexity of the CSDN-TCS algorithm is lower and easier to implement. The CSDN-TCS algorithm does not impose additional restrictions on the generation of traffic matrices in two-class packet scheduling, making it more adaptable to general scheduling situations and more in line with actual scheduling scenarios.
The contributions of this paper are as follows:
Firstly, this paper establishes a model for the input-queuing switch system in TSN. It further delves into the operational mechanism of the input queuing system and the scheduling process of packets in TSN networks. On this basis, it clarifies the necessity of studying packet scheduling with deadline guarantees.
Secondly, the paper proposes the CSDN-TCS algorithm, which aims to address how to schedule as many packets as possible under deadline constraints. This algorithm effectively improves the throughput of the switching system, ensuring a reduction in the average delay of packets while maintaining a low packet loss rate, thus enhancing the efficiency of the system.
Finally, we conduct a series of simulation experiments from the perspectives of switch size and line load. We verify the superior QoS performance of the CSDN-TCS algorithm in terms of success rate, packet loss rate, average delay, and throughput.
The rest of this article is organized as follows. The
Section 2 introduces the system model and preparation of the packet scheduling problem with deadline guarantee. The
Section 3 introduces the design of the algorithm. The
Section 4 gives the simulation results and comparative analysis. The
Section 5 summarizes the full text.
4. Simulation and Analysis
We validated the performance of the CSDN-TCS algorithm using software simulation. In this study, simulation experiments were designed from two perspectives: based on the switch size and based on the line load. We compared the QoS performance differences among the traditional heuristic EDF algorithm, the FIPS algorithm, and the CSDN-TCS algorithm under single-class, two-class, and multi-class scenarios (the multi-class experiments are represented by three classes). Specific performance metrics include the success rate, packet loss rate, average delay, and throughput.
4.1. Performance Indicators
In order to study the performance of the algorithm, several indexes such as the success rate, packet loss rate, average delay, and throughput rate are introduced to evaluate the performance of the algorithm.
4.1.1. Success Rate
The success rate is
defined as the number of times the algorithm successfully schedules all the packets in the experiment conducted. In a schedulable set, if only one packet is dropped, the algorithm will also be judged as a failure:
Success represents the number of successful scheduling and total represents the total number of experiments.
4.1.2. Packet Loss Rate
The packet loss rate
is defined as the ratio of the number of discarded packets in a scheduling set to the total number of scheduled packets:
The dropped packets indicates the number of packets discarded in this schedule, and the total packets indicates the total number of packets in this scheduling.
4.1.3. Average Latency
The average delay
is defined as the ratio between the total delay of successfully scheduled packets and the number of successfully scheduled packets:
The indicates the sum of the delays of all successfully scheduled packets in the current transmission, and the indicates the total number of packets that are successfully scheduled before the deadline in this transmission.
4.1.4. Throughput Rate
In the experimental simulation, packets that miss the deadline are discarded. We define the throughput
as the ratio between the number of packets that successfully completed the schedule before the deadline and the total number of packets for this schedule:
The indicates the number of packets successfully transmitted to the corresponding output port in this schedule, and the indicates the total number of packets transmitted in this schedule.
4.2. Simulation Experiment Based on Switch Size
First, we study the relationship between the switch size and success rate, packet loss rate, average delay and throughput rate under low-load conditions.
The experimental design ideas based on the switching size are as follows (take two types as examples): randomly generate A and B traffic matrices in size, set deadlines and to meet the low-load state of the switching system, and conduct simulation experiments.
From
Figure 8, it can be observed that in single-class scheduling, the scheduling success rates of the traditional iSLIP, EDF, MLF algorithms, FIPS algorithm, and CSSDN-TCS algorithm are relatively high when the switch size is small. As the switch size increases, the scheduling success rates gradually decrease. Compared to traditional heuristic algorithms, the success rate performance of the CSDN-TCS algorithm is improved by approximately 10%.
From
Figure 9, it can be seen that in single-class scheduling tasks, the average delays of the iSLIP algorithm, EDF, MLF algorithm, FIPS algorithm, and CSDN-TCS algorithm are similar. As the switch size increases, the number of groups in the traffic matrix continues to grow. When
, the average delay of the CSDN-TCS algorithm is approximately 32 time slots per packet.
In
Figure 10, as the switch size increases, the average packet delay shows an upward trend. When the switch size is small, the average delays of the iSLIP algorithm, EDF, MLF algorithm, FIPS algorithm, and CSDN-TCS algorithm are similar. However, as the switch size continues to increase
, the differences in the average packet delay between various comparison algorithms gradually become apparent. When
, the average delay of traditional iSLIP, EDF, and MLF algorithms exceeds 250 time slots per packet. While the FIPS algorithm shows a slight decrease in average packet delay, the proposed CSDN-TCS algorithm maintains an average delay of no more than 200 time slots per packet, exhibiting a significant decrease. The average delay performance of the CSDN-TCS algorithm is improved by 25% compared to other comparative algorithms.
From the graph in
Figure 11, it can be observed that the packet loss rate of three-class scheduling decreases with the increase in switch size. From the perspective of the switch, as the switch size increases, the number of input and output ports in the switch also increases. When packets arrive at the switch for scheduling, the probability of conflicts decreases, resulting in a reduction in the packet loss rate. From an algorithmic perspective, for both the FIPS algorithm and CSDN-TCS algorithm, as the switch size increases, larger deadline packets have more opportunities to be scheduled into the idle slots of smaller deadline packets. They are scheduled together with smaller deadline packets, leading to a rapid decrease in the packet loss rate for these two algorithms. When
N = 128, the packet loss rate performance of the CSDN-TCS algorithm is improved by approximately 8% compared to iSLIP, EDF, and MLF algorithms.
As can be seen from
Figure 12, it is evident that when the switch size is small, the average delay performance of various comparison algorithms is quite similar. The performance of the CSDN-TCS algorithm is slightly better than the others. However, as the switch size increases, the advantage of the CSDN-TCS algorithm in the average packet delay becomes more apparent. When
, it is clear that the average delay of the CSDN-TCS algorithm is significantly smaller than the other comparison algorithms. At this point, the average delay performance of the CSDN-TCS algorithm is improved by approximately 15% compared to other comparative algorithms. Moreover, as the switch size grows, the performance advantage of the CSDN-TCS algorithm in the average packet delay becomes more pronounced. Due to the larger number of packets in the traffic matrix of three-class scheduling, leading to higher decision complexity, the average packet delay in three-class scheduling tasks is higher than that in two-class scheduling tasks under the same switch size conditions.
Figure 13 illustrates the relationship between the throughput and switch size for various comparison algorithms. The results indicate that as the switch size increases, the system’s throughput shows an upward trend. When
, the CSDN-TCS algorithm exhibits the highest throughput, followed by the FIPS algorithm, while the traditional iSLIP, EDF, and MLF algorithms have lower throughput. When
, the throughput performance of the CSDN-TCS algorithm is improved by approximately 8% compared to traditional iSLIP, EDF, and MLF algorithms.
4.3. Simulation Experiment Based on Line Load
We also study the effect of the line load on the algorithm success rate, packet loss rate, average delay and throughput in size. The simulation is carried out for different situations where the line load increases from 0.5 to 1.
The line
load is defined as the ratio between the total number of packets scheduled for this transmission and the total number of available time slots:
where the
total packets indicates the total number of packets transmitted in this schedule, and the
total time slots indicates the total number of time slots that can be utilized before the deadline in this schedule.
Experimental design ideas based on the line load (taking two types as examples) are as follows: Set appropriate deadlines and . Two traffic matrices are randomly generated by , respectively, and scheduling experiments are carried out.
The relationship between the algorithmic line load and packet loss rate is depicted in
Figure 14. As the line load of the switching system increases, the packet loss rate also increases. When the system’s line load is relatively low, the packet loss rates of the iSLIP algorithm, EDF, MLF algorithm, FIPS algorithm, and CSDN-TCS algorithm are all at a low level and are relatively close. When
, the packet loss rate of the CSDN-TCS algorithm is lower than that of the other compared algorithms, remaining below 6%, while the packet loss rates of the other compared algorithms are all above 10%.
The simulation results for testing the average packet delay of various comparison algorithms are presented in
Figure 15. The average packet delay shows a proportional correlation with the line load. When the line load is low, the differences in the average packet delay among the iSLIP algorithm, EDF, MLF algorithm, FIPS algorithm, and CSDN-TCS algorithm are relatively small. However, when there is burst traffic in the switching system, leading to a high load situation. When
, the CSDN-TCS algorithm exhibits a lower average delay compared to other compared algorithms, with a performance improvement of approximately 5%. This indicates that the algorithm proposed in this paper demonstrates stronger adaptability in high-load conditions.
From
Figure 16, it is evident that in two-class packet scheduling, as the line load increases, the packet loss rate of the switching system also increases. Among them, the iSLIP, EDF, and MLF algorithms exhibit relatively high packet loss rates, with the FIPS algorithm following. The CSDN-TCS algorithm has the lowest packet loss rate, and as the line load increases, the performance advantage of the CSDN-TCS algorithm in the packet loss rate becomes more pronounced. When
, the packet loss performance of the CSDN-TCS algorithm is improved by approximately 15% compared to the iSLIP, EDF, and MLF algorithms.
Figure 17 illustrates the relationship between the system throughput and line load in two-class scheduling tasks. From the figure, it can be observed that when the system load is low, the switching system has a relatively high throughput. However, when
, the system’s throughput decreases rapidly. Nevertheless, the CSDN-TCS algorithm can still maintain a relatively high throughput compared to the other two algorithms in high-load scenarios. When
, the throughput of the CSDN-TCS algorithm is still maintained around 85%, demonstrating the reliability of the proposed algorithm under high-load conditions.
In
Figure 18, the relationship between the packet loss rate and line load in three-class scheduling tasks is depicted. The system’s packet loss rate is directly proportional to the line load status. The packet loss rate in multi-class scheduling is higher than in two-class scheduling. In other words, as the number of deadlines in the scheduling set increases, the decision complexity of the scheduling tasks rises, leading to a higher packet loss rate. From the figure, it can be observed that the CSDN-TCS algorithm has the lowest packet loss rate, outperforming the iSLIP algorithm, EDF, MLF algorithm, and FIPS algorithm. When
, the packet loss performance of the CSDN-TCS algorithm improves by approximately 10% compared to EDF and MLF algorithms.
As can be seen from
Figure 19, it is evident that the system throughput is inversely proportional to the line load. As the line load increases, the CSDN-TCS algorithm exhibits the slowest decrease in throughput. Overall, the CSDN-TCS algorithm has the highest throughput, maintaining a level of 90% or above. This is followed by the FIPS algorithm, while the iSLIP, EDF, and MLF algorithms have relatively lower throughput. This indicates that under the same load conditions, the CSDN-TCS algorithm can schedule more packets with deadlines guaranteed compared to other comparison algorithms.
In summary, we conducted simulation experiments from two aspects: based on system switch size and based on system line load. In single-class, two-class, and multi-class (using three classes as an example) scheduling tasks, we compared the success rate, packet loss rate, average packet delay, throughput, and other QoS performance metrics of the traditional iSLIP algorithm, EDF algorithm, MLF algorithm, FIPS algorithm, and CSDN-TCS algorithm. The simulation results indicate that under similar conditions, the CSDN-TCS algorithm can achieve a lower packet loss rate and a smaller average packet delay, ensuring the successful completion of packet scheduling tasks for as many packets as possible before the deadline arrives.
5. Conclusions
Firstly, this paper establishes the model of the input-queuing switch system in TSN, delving into the operational mechanism of input-queuing systems in TSN networks and the scheduling process of packets. Based on this, the paper clarifies the necessity of studying packet scheduling with deadline guarantees. Secondly, the paper proposes the CSDN-TCS algorithm, which builds a network flow model based on the input traffic matrix. It transforms the packet scheduling problem into a network flow problem with upper and lower bounds on the traffic, and solves it using the maximum flow algorithm from graph theory. The algorithm achieves scheduling tasks for single-class, two-class, and multi-class groups with deadline constraints, obtaining results with maximized throughput and minimized average packet delay.
According to the results of simulation experiments, in single-class packet scheduling, the iSLIP algorithm, EDF algorithm, MLF algorithm, FIPS algorithm, and CSDN-TCS algorithm show similar QoS performance when the switch size is small or the line load is low. In two-class and multi-class packet scheduling, especially in scenarios with larger switch sizes or higher line loads, the CSDN-TCS algorithm outperforms other algorithms with higher throughput and smaller average delay. Moreover, under comparable QoS performance, the CSDN-TCS algorithm has lower time complexity than the FIPS algorithm, requiring less scheduling complexity for the traffic matrix and making it more adaptable to general scheduling scenarios.
The research in this paper is still ongoing and requires further refinement of related work. Currently, the research is based on the offline scheduling planning of a single node and has not been extended to global scheduling with multiple nodes, which will be a focus of future work. On the other hand, the research in this paper is more suitable for TSN closed network scenarios, where planning can be done in advance. However, in the face of dynamically changing real-time networks, the real-time computation of scheduling results may be required, and the proposed algorithm’s complexity in this context may be higher.