如何设置从批处理文件处理器亲和力的Windows XP? [英] How to set processor affinity from Batch File for Windows XP?

查看:124
本文介绍了如何设置从批处理文件处理器亲和力的Windows XP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个双处理器的机器,我想通过两个处理器一个批处理文件来启动一个可执行文件。

I've got a dual processor machine and I would like to launch an executable via a batch file on both processors.

例如:
(1)启动Notepad.exe的处理器上的1和
(2)同时,在Notepad.exe的处理器2

For example: (1) Launch Notepad.exe on Processor 1, and (2) Simultaneously, Notepad.exe on Processor 2

目前,我用我的批处理文件下面,因为我的可执行文件是难启动和启动时需要的,以便运行一回:
回声|。DoStuff.exe

Currently, I'm using the following in my batch file, since my executable was "difficult" to launch and needed a return in order to run when launched: echo.|DoStuff.exe

因此​​,我想启动它,并让它在每个处理器上运行。

Thus, I would like to launch it and have it run on each processor.

感谢您提供的任何反馈。

Thanks for any feedback provided.

P.S。我不认为开始会为我工作,因为我需要如上图所示回声在返回字符发送到可执行文件。

P.S. I don't think "start" will work for me since I need to send in the return character to the executable as shown above with echo.

P.S.S。这为Windows XP中的解决方案。谢谢。

P.S.S. This is for a Windows XP solution. Thanks.

推荐答案

微软Sysinternal的 PSEXEC 的-a标志可以在Windows XP中设置处理器关联:

Microsoft's Sysinternal's psexec's -a flag can set processor affinity on Windows XP:


Usage: psexec [\\computer[,computer2[,...] | @file][-u user [-p psswd]][-n s][-l][-s|-e][-x][-i
[session]][-c [-f|-v]][-w directory][-d][-][-a n,n,...] cmd [arguments]
     -a         Separate processors on which the application can run with
                commas where 1 is the lowest numbered CPU. For example,
                to run the application on CPU 2 and CPU 4, enter:
                "-a 2,4"

例如:

psexec -a 2 cmd /c "echo.|DoStuff.exe"

这篇关于如何设置从批处理文件处理器亲和力的Windows XP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆