如何强制一个应用程序在Windows的一个核心中运行,而没有其他应用程序在该核心中运行? [英] how to force an application to run in one core and no other applications run in that core on windows?
问题描述
我认为我的问题很特殊,但是我想在MATLAB Simulink中进行实时定位,但是我不想使用XPC目标.我只希望在程序运行时没有中断(simulink),以便拥有一个实时的无中断控制系统.这样,我就可以在没有目标系统的情况下使用我的控制模块了. 首先,请忽略我的英语水平很弱.我有一些问题: 1.我们可以强迫一个内核仅由simulink使用吗? 2.一次中断通常需要多少时间(以及最大值)? 3.在simulink中还有其他方法可以使用吗?
谢谢
Simulink本质上是一个单线程应用程序.在Rapid Accelerator模式下运行时,有一些方法可以使用第二个内核(请参阅软件和环处理器(SIL和PIL)仿真.我认为您可以将代码生成过程配置为仅在一个内核上执行,但是最好让MathWorks确定.
I think my questions are unusual, but I wanna work on real time targeting in MATLAB Simulink, but I don't want to use XPC target. I just want no interrupt on the program (simulink) when it is running in order to have a real time interruptless control system. and in that order i can use my control module without target system. first of all, please ignore my weak english. and I have some questions: 1. can we force a core to only be used by simulink and nothing else? 2. how much usually (and how much maximum) does an interrupt take time? 3. is there any other way that we can use in simulink?
thank you
Well, Simulink is essentially a single-threaded application. There are some ways in which you can use a second core when running in Rapid Accelerator mode (see documentation), but by and large, everything runs on one core. I'm guessing it may change in the future, as a lot of people would like to split the execution of a single large model across multiple cores, but right now it's not possible as far as I know.
Simulink, however is not a real-time application, given that it runs on Windows or other non-real time O/S. Why do you not want to use xPC Target? As you are working on a real-time target, that would be the best option. Other options would be to use Real-Time Windows Target, SIL or even PIL if you have access to your real-time target hardware. Have a look at the example Software and Processor-in-the-Loop (SIL and PIL) Simulation. I think you can configure the code generation process to be executed on one core only, but better to ask MathWorks to be sure.
这篇关于如何强制一个应用程序在Windows的一个核心中运行,而没有其他应用程序在该核心中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!