Intel
Real-time behavior with dynamic cycle changes
A trend towards consolidating various applications on industrial PCs has been observed for years. This trend is supported by modern processors that can regulate the clock rate per core and are characterized by low-latency switching behavior.
Many applications in the field of industrial control and automation technology require deterministic system behavior: Sensor data is loaded and processed in every process cycle and new control data is provided on this basis. Specified cycle times of sometimes less than 1 ms must be strictly adhered to. Exceeding a predefined time limit (deadline) is considered a failure of the system and can result in high costs, sometimes even damage to the controlled machine. In addition to the computing time required to process the data, other factors contribute to the overall response time - from reading out created sensor data to writing new actuator data. What is executed on a processor in parallel to a real-time application also has an important influence here. This is because resources such as shared cache or available memory bandwidth are shared and framework conditions such as the maximum permitted power consumption or temperature of the processor apply to the CPU as a whole.
The influence of DVFS on industrial applications
Over the years, processors have increasingly been equipped with Dynamic Voltage and Frequency Scaling (DVFS) functions. These make it possible to dynamically adjust clock frequencies as required and sometimes even overclock the CPU for a short time. In particular, the introduction of hardware-controlled P-States allows even more granular power management. Here, the processor itself controls the P-states depending on the CPU load. The P-states represent frequency and voltage points in order to enable optimum performance and energy efficiency for specific CPU loads. The operating system has the option of transmitting non-binding specifications for the hardware regarding the desired minimum and maximum frequencies.
Transitions from one P-state to another often led to additional latencies of several microseconds on older processors. These affected all active processor cores equally, as the respective frequency and voltage were set uniformly. For many applications without real-time requirements, sporadic latencies are not a problem. For real-time applications, however, especially those with short cycle times in the microsecond range, this can be an intolerable source of jitter. Another complicating factor is the controllability of real-time behavior with dynamic frequency changes. For this reason, DVFS functions are often deactivated in the BIOS for industrial applications.
Intel Time Coordinated Computing (Intel TCC) functions have been introduced on some more recent processors to improve real-time behavior. In addition, the voltage and clock frequency regulation on some processors has been changed so that computing cores can now be controlled individually and separately. Finally, a modified switching behavior ensures significantly lower latencies for P-state changes. This offers system integrators new possibilities for IPC configuration, especially for consolidated applications.
Powerful processors provide the basis for consolidating and executing several applications such as the control of individual machines, data acquisition for process optimization, the user interface as well as communication, security and safety functions on a single IPC with the help of "virtual machines". This reduces overall system costs, speeds up deployment and improves resource utilization.
Consolidation on IPCs
The consolidation of applications with mixed criticality comes with new requirements. In such a consolidated system, for example, a PLC or CNC application could be executed in a Real-Time Operating System (RTOS) in parallel with a user interface (HMI) in a General Purpose Operating System (GPOS) such as Microsoft Windows or Linux.
Figure 2: The measurement results of the system with TCC-capable Intel Core i5-1145GRE processor and extended DFVS functions.
© IntelIn such a system architecture, the GPOS is normally treated as Best Effort (BE) and aims for maximum peak performance, while the RTOS aims for the highest possible quality of service in terms of determinism. With the new hardware possibilities in the area of DVFS, such requirements can also be realized, as the following analysis shows by way of example.
Test setup and implementation
The test setup (Figure 1) simulates a typical use case in which a best-effort application and a real-time application are executed in parallel on one processor.
Figure 3: If the clock frequencies are changed using the pulsed BE application on a system with an older processor (Intel Core i5-8265U), this affects all cores.
© IntelThe two applications run on different computing cores. While the real-time application runs on cores with a fixed frequency, the computing cores for the BE application are configured in such a way that the clock frequencies can be changed dynamically, even into the turbo frequency range. A native, up-to-date Linux with preempt RT patch is used for this. The real-time cores are isolated from the BE cores by Linux directives. The well-known open source application Cyclictest is used as the real-time application. This application is well suited to describing important aspects of the real-time behavior of a system, such as that used by OSADL for 24×7 long-term studies. Cyclictest determines the jitter behavior of interrupts. This jitter can be influenced by hardware, firmware, the operating system, but also by BE applications.
In the test setup, the CPU load of a BE application is simulated on one of the BE cores using a stress-ng CPU stressor. A periodically repeated calling and stopping of stress-ng ensures that a P-state change, i.e. frequency changes, take place.
In an initial comparison, measurements were first carried out on a system with a current Intel TCC-capable processor and extended DVFS functions, in which DVFS functions such as Intel SpeedStep, Intel Speed-Shift and Intel Turbo Boost technology were deactivated in the BIOS. Measurements were then carried out in which these functions were reactivated. In addition, the processor clock frequencies were measured over time.
In a comparison, the measurements were carried out with the same test setup on an older processor that supports neither TCC nor one of the extended DVFS functions.
Figure 2 shows the measurement results of the system with a TCC-capable processor and extended DFVS functions. The processor has a base frequency of 2.6 GHz and a maximum turbo frequency of 4.1 GHz. As can be seen from the frequency diagrams, dynamic frequency changes into the turbo frequency range take place in the second scenario with activated BIOS functions. However, as can be seen in the histogram shown, the effects of this BIOS application with frequency changes are negligible. The maximum latencies differ by 1 µs and are less than 10 µs in both scenarios.
The graphs on the system with the older processor are completely different (Fig. 3). If the frequencies remain constant, the maximum latencies in the histogram correspond to those in Figure 2. However, if the clock frequencies are changed using the pulsed BE application, this has the expected effect on all computing cores. As the frequencies in the scenario with frequency changes are higher than in the scenario with constant frequency, no increase in maximum latencies would be expected from the resulting increases in clock frequency on the real-time cores. However, the histogram shows that the maximum latencies increase from 7 µs to 23 µs. The comparison of the histogram in Figure 2 with that in Figure 3 illustrates the improvement in the DVFS area with regard to the real-time capability of some current processor generations compared to older ones.
The tests carried out confirm that the DVFS hardware properties of some modern processors make it possible to configure consolidated applications flexibly on IPCs. Real-time requirements of the OT world, which require fixed processor frequencies, can be combined with requirements from the IT world, such as dynamically demand-oriented high computing performance at peak times. At the same time, computing cores can be downclocked with idle processes without significantly influencing the real-time behavior on the real-time-critical computing cores. This opens up interesting new possibilities for customer-specific configurations.















