简体   繁体   English

有什么方法可以专门为Windows 10中的进程专用cpu核心吗?

[英]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. 我想专门为我的实时数据流应用程序专用一些CPU内核,因为我想确保此过程始终在没有上下文切换的情况下运行。 (Ensuring no application except my process running on that core) (确保除我的进程在该核心上运行外,不确保其他应用程序)

It seems there's a working solution for Linux. 似乎有一个适用于Linux的解决方案。 Is there any way to do this for Windows 10? 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.) (我曾考虑过在任务管理器中设置进程亲和力。但是要专门为我的进程指定cpu内核(例如,仅内核1),我必须在所有进程的进程亲和力窗口中取消选中核心1,并仅针对我的过程。但是,这种解决方案太麻烦了,体力劳动,似乎很难以编程方式完成。)

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 有没有办法限制进程的CPU /内存? - Is there any way of throttling CPU/Memory of a process? 将特定的逻辑核心专门分配给Windows,C ++的特定进程 - Allocating specific logical cores to specific processes exclusively, Windows, C++ 如何确保子进程 Popen 在 Windows 中以优化方式将创建的实例分布在多个 CPU 内核上? - How to make sure subprocess Popen is spreading the created instances across many CPU cores in an optimize way in Windows? 每个CPU内核的线程分配(仅Windows) - Thread allocation per CPU cores (Windows only) 有没有办法利用 asyncio 的多个 CPU 内核? - Is there a way to take advantage of multiple CPU cores with asyncio? 有没有办法在 Windows 10 中创建另一个任务栏? - Is there any way to create another taskbar in windows 10? 分析 Windows 进程长期 CPU 使用率的最佳方法 - Best way to profile long-term CPU usage of Windows process CPU(所有内核)在 Windows 上的 python 多处理期间变得空闲 - CPU (all cores) become idle during python multiprocessing on windows Windows Server / Datacenter:将CPU关联设置为> 64个核心 - Windows Server / Datacenter: set CPU affinity with > 64 cores 如何使Windows Apache使用所有的cpu核心? - How to make windows Apache use all cpu cores?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM