SLDRT CPU utilization when running a model in Kernel mode

4 次查看(过去 30 天)
Hi,
I am running SLDRT simulations in Kernel mode using a 3rd gen Core i5 CPU (4 cores). When the full model is running, the CPU utilization shows up as 100% on all cores and if another background task occurs or if I try to monitor something, the PC often times crashes.
Can you please let me know how the system resources are used when a model is run in Kernel mode?
I would also like to know, If I am to upgrade the PC that I use, what system parameters should I be focusing on (CPU, hard drive . etc)
Thank you
  2 个评论
Walter Roberson
Walter Roberson 2023-5-2
This appears to refer to https://www.mathworks.com/help/sldrt/ug/simulink-run-in-kernel-mode.html
Howard Loewen
Howard Loewen 2023-5-3
I saw that article and it does not talk about how the system resources are utilized when running a kernel mode Simulation. For example, Can the simulation takes advantage of multiple cores ? or if it only runs on a single core, how the other Matlab/Simulink processes takes up system resources ?
Can enforcing the realtime requirements in kernel mode, leads to slow / crashing of the other processes running on the host PC?
Thank you

请先登录,再进行评论。

采纳的回答

Jan Houska
Jan Houska 2023-5-3
Hi Howard,
the fact that CPU utilization shows up as 100% when model runs in Run in Kernel mode is due to CPU power state being set to C0 (as defined by ACPI) for the time when the model is running. This is necessary to achieve minimum CPU latency to asynchronous events (such as timer interrupt) and the best possible real-time performance. Although this is reported by the OS as 100% CPU utilization, the CPUs are not really 100% utilized. They are just switched to highest-power state to avoid any delay caused by transitioning from lower-power states when the asynchronous event occurs. The CPUs are still used for all the operating system tasks as usually, they just don't go idle when a task is finished. This behavior will not change if you upgrade to more powerful CPU - that is, you will still see 100% CPU utilization reported by OS no matter how powerful your CPUs are and how much they are really utilized.
If you experience crashes that you think may be related to SLDRT, you should probably contact technical support and provide more detailed description of the crash - how does it look like, when it typically happens, a model that is causing it, etc. Without that kind of information, an "often crashes" situation is very difficult to diagnose.
Jan
  1 个评论
Howard Loewen
Howard Loewen 2023-5-3
Thank you Jan,
This is a very detailed explanation and I appriciate you taking the time to answer.
Unfortunately, I may not be able to share the model information, but I can submit a crash log to matlab technical support to futher diagnose of the issue. I hope that helps.

请先登录,再进行评论。

更多回答(0 个)

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by