## 4 Experimental Results
### Performance Evaluation with Large-Scale Traffic  
To assess the scalability and performance of the proposed scheduling algorithm under more demanding network conditions, experiments were conducted with a significantly larger set of 100 data streams. These streams were randomly generated to simulate a high-load, complex traffic scenario with the following characteristics:  
* Cycle periods were randomly chosen from the set {125 \(\upmu\)s, 250 \(\upmu\)s, 500 \(\upmu\)s, 1000 \(\upmu\)s}. * Transmission times ranged from 2 to 5 \(\upmu\)s.
* Priorities (PCP values) were randomly assigned integers between 2 and 5 (inclusive). * The parameters were set to ensure that the total bandwidth utilization by these streams was above 70%. During the GCL calculation for this scenario, an additional time margin of 1 \(\upmu\)s was reserved for each stream to account for factors such as propagation delay and the TSN switch's internal processing time; this value was empirically determined through prior measurements. It is noted that the selected cycle periods for the large-scale traffic generation (125, 250, 500, 1000 \(\upmu\)s) form a harmonic set, resulting in a simple hyperperiod. This choice was made to reflect common scenarios in embedded and automotive systems where task periods are often assigned as multiples of a base clock rate. The practice of assigning harmonic periods is a well-studied topic in real-time systems, as it can simplify schedulability analysis and improve resource utilization [33]. While this may simplify the scheduling problem compared  
Figure 6: End-to-end latency comparison: proposed algorithm vs. strict priority scheduling. to non-harmonic period sets, it provides a realistic and relevant baseline for comparing the computational efficiency of different algorithms. The performance evaluation with non-harmonic periods, which can lead to a significantly larger hyperperiod and a more fragmented scheduling problem, remains an important direction for future work. A comprehensive comparison between our proposed algorithm and a standard Strict Priority (SP) scheduling algorithm is presented in Figure 7. This composite figure provides two perspectives on performance: subplot A illustrates the average delay composition and jitter, while subplot B details the distribution of the variable delay component. The analysis of Figure 7 reveals several key findings:  
1. Average Delay Composition (Figure 7A): The stacked bar chart clearly shows that while the average Transmission Delay (gray portion) is identical for both algorithms, as it is an input parameter, the average \"Other Delays\" (colored portion) differ dramatically. For the proposed algorithm, this component is negligibly small, whereas for SP scheduling, it constitutes the vast majority of the total delay, with an average value of approximately 57.19 \(\upmu\)s.
2. Jitter Comparison (Figure 7A): The error bars, representing the standard deviation of the total delay across all streams, provide a quantitative measure of jitter. The error bar for the proposed algorithm is extremely short, indicating highly consistent and predictable latency. In contrast, the large error bar for the SP algorithm reflects significant jitter, with delay variations reaching up to 300 \(\upmu\)s for some streams. 3. Distribution of \"Other Delays\" (Figure 7B): The box plot provides a deeper look into the distribution of the variable delay component. For the proposed algorithm, the entire distribution (the blue box) is tightly clustered in the sub-microsecond range (400-700 ns), confirming extremely low and stable queuing delays for all 100 streams. Conversely, the box plot for SP scheduling (orange) shows a much higher median delay and a wide interquartile range, along with several outliers, visually confirming its high latency and poor predictability. The measured end-to-end jitter for all streams under our algorithm was less than 400 ns. Figure 7: Comprehensive performance comparison in the large-scale traffic scenario (100 streams).