简体   繁体   中英

Is there any way to dedicate cpu cores exclusively for a process in Windows 10?

I want to dedicate some cpu cores exclusively for my real-time data streaming application because I want to ensure that this process is always running without context-switching. (Ensuring no application except my process running on that core)

It seems there's a working solution for Linux. Is there any way to do this for Windows 10?

Any solution will be greatly appreciated.

(I've thought about setting process affinity in task manager. But to dedicate cpu cores(for example only core 1) exclusively for my process, I have to uncheck core 1 in process affinity window for all processes, and only check core 1 for my process. However, this solution is too tedious physical labor and seems hard to do it programmatically.)

您可以使用WIN32 API SetProcessAffinityMask()设置进程关联。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM