Trac schedulability analysis
4.5 Simulation results
The previous analysis provides the conditions to assess the schedulability of the trac submitted to the switch. However, the conditions contain several approximations that introduce a non-negligible level of pessimism. In order to validate the analysis and develop a notion of the pessimism embedded in these schedulability tests we carried out simulations with randomly generated trac. For each generated set, it is veried whether the set passes the schedulability tests and if so, the message set is submitted to the scheduling simulator that runs for the LCM of the message periods to determine the set schedulability (note that simulations consider a synchronous release).
The message sets are pseudo-randomly generated with a load around the theoretical schedulability bound, in order to have schedulable and non- schedulable sets. The pseudo-random generation uses the following param- eters:
• 4 ports switch with 100 Mbps links
• Packet length uniformly distributed within [100 1500] bytes • EC of 1ms
• Periods uniformly distributed within [1, 5] ECs • Unicast messages, only
• 1, 2 or 3 destinations per uplink (source) • Scheduling with EDF and RM
• Inserted idle time compensation factor of 88% (already including EC length, TM transmission, turnaround, and maximum packet length) • 200000 points per utilization point in the graphs in the part where
schedulability starts to reduce.
The theoretical tests in Equations 4.5 and the extension to the down- link test in Equations 4.16 and 4.17 compare the trac utilization with the EDF or RM utilization bounds. The simulation procedures dier only in the pseudo-random generator that for each case generates message/task sets around the respective schedulability limits.
For the sake of clarity, note that the designation virtual load is dened in the downlinks to include real load plus the interference load given by
max mi∈ldj X CRM,EDF Uk ! + max mi∈ldj X CRM,EDF Ck ! T1 ,
in Equations 4.16 and 4.17. For simplicity, let us extend this designation to the uplinks in which case virtual load coincides with the real load. The switch links, either uplinks or downlinks, can now be analyzed inter-changeably with the same per link utilization limit Ulub. The virtual load is the per link load
used to verify the schedulability in the uplinks and downlinks on each of the switch ports (4 ports in this simulation scenario).
Each message set was generated computing random messages that were sequentially added to the set while keeping the virtual load on each link under a given value, lets say x Mbps. New messages were continuously added until there were 1000 consecutive failed attempts,i.e., attempts that cause an excess to the desired load. This guarantees that the virtual load generated in any link is no more that x Mbps and yet very close to that limit on most of the links, mainly in the downlinks that tend to reach the limit before, given the interference load. In fact, the real trac load on the downlinks is much lower than the corresponding virtual load.
The generated sets were simulated with synchronous release during LCM of the periods and the percentage of schedulable sets was plotted as a function of the maximum virtual load (x Mbps). The following plots were obtained forcing the maximum allowed virtual load per link. They also show the Liu and Layland schedulability bounds for RM and EDF, after the inserted idle time compensation factor, which become 61% and 88%, respectively. Note that the analysis only guarantees positive scheduling results when the vitual load in all links is below these thresholds. The points of virtual load larger than the schedulability bounds with 100% schedulable sets is a measure of the pessimism that is implicit in the analysis.
Figure 4.7 shows the case of one destination per source, i.e., messages from one uplink go all to the same downlink, for which schedulability test in
70 75 80 85 90 95 100 Maximum load per link (Mbps)
0 20 40 60 80 100 %
EDF bound -->
<--
61 Mbps
RM bound
88 RM EDFFigure 4.7: Schedulability vs. Utilization(1→1).
Equation 4.4 applies. In this case, the virtual load coincides with the real load which is necessarily less than the links capacity of 100 Mbps. These results are similar to those for RM and EDF scheduling in one CPU, as expected, showing close to optimal performance for EDF (93 Mbps actually schedulable against the test bound of 88 Mbps) and a larger deviation from optimal for RM (79 Mbps against 61 Mbps respectively).
Figure 4.8 shows the cases of 2 and 3 destinations per source with the impact of interference included in the virtual load, which can now grow beyond the link capacity of 100%. As shown in the plots, Figure 4.8, positive scheduling results are obtained with virtual load beyond the 100 Mbps of the link capacity. This happens because the considered worst-case scenario for the interference in the uplinks may never occur in practice. Note that the real load is much smaller, not exceeding the physical limits as illustrated also in Figure 4.8 (dotted plot).
In all scenarios plotted in Figure 4.8 we may observe that the rst dead- line misses (with growing utilization) occur for message sets with a maximum virtual load above the 61 Mbps and 88 Mbps schedulability bounds of RM and EDF scheduling, respectively. No violation of these bounds was found, considering the maximum virtual utilization per link, conrming the schedu- lability analysis. The rst deadline misses occur for virtual loads of 89 Mbps and 97 Mbps, for RM and EDF, respectively.
The number of schedulable sets beyond the proposed scheduling bounds reveals the bounds schedulability penalty. There are three sources for this penalty, the one already included in Liu and Layland's RM test, the intra-
50 100 150 200 250 0 20 40 60 80 100 % 88 1->2 1->3 real load -> <-9Mbps
EDF
50 100Maximum virtual load per link (Mbps)150 200 250 0 20 40 60 80 100 % 61 1->2 1->3 real load -> <-28Mbps
RM
Figure 4.8: Schedulability vs. Utilization using maximum virtual load per set (1 → 2, 3).
EC inserted idle time compensation and the interference term maxi(Ji)/T1
in the downlinks. For EDF scheduling only the two latter factors apply, thus resulting in a lower degree of pessimism. This is conrmed by the simulations observing the dierence between the rst non-schedulable sets and the respective bounds, which is 28 Mbps for RM and 9 Mbps for EDF. In Figure 4.8 we may also observe that when increasing the diversity of destinations per source (range of downlinks per uplink) the scheduling penalty also grows. This is revealed by the observation that with the scenario of 3 possible destinations (1->3) there are more schedulable sets beyond the bounds than with the scenario of 2 possible destinations (1->2). In fact, with more downlinks per uplink the number of uplinks interfering in a downlink may grow and thus we are increasing the chance for a higher term maxi(Ji)/T1 in Equation 4.5. Moreover, the impact of the deferred release
on each downlink is more visible at run-time when all interfering uplinks are sending to dierent downlinks, which, for a higher diversity of downlinks per uplink, is more likely to happen.