常问问题
问题与答案的数量取决于你是否登陆。
Real-time System
How to utilize real-time features in C# programs?
Windows itself is not a real-time system. In order to achieve real-time features, it is necessary to execute time-critical code in a real-time context (at kernel level). Due to the fact that in a .NET environment C# can not be executed in real-time, the behavior in time still depends on the Windows scheduler. But it is possible to assign the time-critical C# threads the absolute highest thread priority.
Previously this was not possible for programmers. For this reason, Kithara provides the respective mechanisms. At least, the mechanisms can ensure that the application takes priority over all other Windows applications. For true real-time behavior the essential code should be programmed in C++ or Delphi and moved into a DLL file, so that it can be loaded directly into the real-time context.
For communication between application and real-time context shared memory, data or messages pipes, events, or sockets are available. A number of example projects are included to show how "hard" real-time can be embedded in C# applications.
What can cause jitter of real-time tasks?
By
dedicating CPUs to Kithara RealTime neither Windows nor other software running in Windows context will have any impact on the real-time behavior of the system.
However, different hardware can have better or worse real-time capabilities and especially configuration options of the BIOS/UEFI can have an impact on the real-time capabilities.
-
C1E = Enhanced Power Save Modes of the CPU.
The power save modes of modern CPUs make the CPUs switch to different sleep modes very rapidly, unpowering different function blocks of the CPU. Waking the CPU from those sleep modes takes time and will introduce latencies.
For the best real-time experience, all power save modes should be deactivated.
You will find those options (depending on your BIOS/UEFI) at- C1E
- C-States
- Deeper C States
-
SpeedStep
The power save options of modern CPUs will make the CPUs switch to lower frequencies on idle. Recovering to higher frequencies on demand takes time and will introduce latencies.
For the best real-time experience, dynamic frequency changing should be deactived.
You will find those options (depending on your BIOS/UEFI) at- EIST
- SpeedStep
- Turbo Boost
- PowerNow!
- Cool'n'Quiet
-
Legacy USB Support
From our experience, this option can (depending on UEFI implementation) have bad impact on the real-time capabilities, it should be deactivated. -
Hyper-threading / Simultaneous Multithreading (SMT)
In most cases, hyper-threading should be deactivated to ensure full access for each 'logical' CPU to the physical CPU resources. See the corresponding note at Dedicating CPUs to Kithara RealTime. -
WBINVD = Assembler instruction for clearing all internal caches.
This instruction is used, for instance, by Nvidia graphics device drivers. This problem can only be solved by avoiding software utilizing this instruction. For device drivers, only a switch to different hardware with drivers not using this instruction will help.