![]() |
![]() |
#12 |
Einyen
Dec 2003
Denmark
65568 Posts |
![]() |
![]() |
![]() |
![]() |
#13 | |
"Frank <^>"
Dec 2004
CDP Janesville
2·1,061 Posts |
![]() Quote:
However, if you can count on the DOS windows staying running, you can run a master server that you use to control the numbers being worked on with a slave server on each of the client machines. Configure the client machines to connect to the local server and they get and report work to themselves, effectively. The slave servers, then, will attempt to connect to the master server on a configurable basis to send their wok in for collation. The communication interval is configurable as "time between connections" with a "time after communication error" interval. The servers will attempt to communicate on the "between" interval, falling back to retrying on the "error" interval until communication is made. The later versions of the server give a little bit finer control over server-server communications, with the ability to designate alternate servers.....although if you can't control which machines will stay up and available, that might be less useful to you. Unfortunately, there is no turnkey way to control starting up jobs, except putting both client and server shortcuts in the Startup folder which would give you the ability to have the clients start automatically on login. The local server gives the ability to be able to work around network cables being connected, but that's about all. There is a program out there that is able to hide DOS windows on the taskbar, but your software environment might be too restrictive to use a solution like that. (I would also have to look in to that further to see if I could find the program again. wblipp may know that; I think he was using that for his ECMNET setups for 11smooth...) |
|
![]() |
![]() |
![]() |
#14 | |
May 2008
Worcester, United Kingdom
72·11 Posts |
![]() Quote:
If your security administrators are allowing Microsoft security fixes to be installed on your Windows machines (which is crucial to maintain security), they are evidently trusting Microsoft so why would they not trust another program supplied by Microsoft? It can probably be obtained on CD if they are paranoid about using the Microsoft download site. To set process/thread affinity in a program requires quite a few system calls. The two calls: ph = GetCurrentProcess() GetProcessAffinityMask(ph, &afp, &afs) gets the variable afp in which the bits correspond with the processors (cores) on which the running process can run when scheduled. The process can then be limited to a single core using, for example: afp &= (1 << CurrentProcessorNumber()); SetProcessAffinityMask(ph, afp)) This just locks it to the core on which it is now running (I use this for timing code). Unfortunately 'system' is too crude to allow you to set the affinity of the launched process (as far as I know). To do this you need to use _beginthread() or _beginthreadex() to launch a thread and then use SetThreadAffinityMask() to lock this thread to a specific core. If the thread is not launched in a suspended state and is already running on a different core it will be suspended and rescheduled accordingly. Brian Last fiddled with by Brian Gladman on 2011-02-26 at 10:52 Reason: typo |
|
![]() |
![]() |
![]() |
#15 |
"Bob Silverman"
Nov 2003
North of Boston
22·1,877 Posts |
![]() |
![]() |
![]() |
![]() |
#16 | ||
"Bob Silverman"
Nov 2003
North of Boston
750810 Posts |
![]() Quote:
Quote:
need to be able to GET the affinity once a process is running. However, I can avoid all of this just by using the catenated hostname and process ID as a unique file name. Brian, can you recommend a good (detailed!) book on Windows system programming? |
||
![]() |
![]() |
![]() |
#17 |
May 2008
Worcester, United Kingdom
10338 Posts |
![]()
HI Bob,
I am afraid that most of my books on this are years old and are now out if date so I'm reluctant to recommend them. The only recent one I have is: Windows System Programming (4th Edition) (Addison-Wesley Microsoft Technology Series) by Johnson M. Hart and I don't hence have anything modern to compare it with. But I have earlier versions of this book as well and I like the his approach. When you say you want to get the affinity of a process, do you mean what cores it can run on or what core it is running on at the point you query it? Last fiddled with by Brian Gladman on 2011-02-26 at 16:33 Reason: typo |
![]() |
![]() |
![]() |
#18 | |
"Bob Silverman"
Nov 2003
North of Boston
165248 Posts |
![]() Quote:
I am aware that it has not been pinned to that core. |
|
![]() |
![]() |
![]() |
#19 | |
Serpentine Vermin Jar
Jul 2014
64718 Posts |
![]() Quote:
imagecfg.exe -a 0x1 ecm.exe Code:
ecm.exe contains no configuration information ecm.exe contains a Subsystem Version of 5.2 ecm.exe updated with the following configuration information: Process Affinity Mask: 00000001 IMAGECFG: Unable to update configuration information in image. All I really want is a way to run it with a settable affinity at launch and still be able to redirect output to a file for later examination. And have multiple instances running on different cores. "start /affinity" gets me close, except the redirecting output, and I can manually change affinity after it's been launched but that's not automated. My best option at the moment is to use a powershell script to change the affinity, but if you have multiple instances running you need a way to know which particular one to target. It'd be a lot simpler if there were just a switch you could specify when launching. ![]() |
|
![]() |
![]() |
![]() |
#20 |
Einyen
Dec 2003
Denmark
D6E16 Posts |
![]()
Seems imagecfg.exe does not work on 64 bit applications.
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Set affinity does not work | g33py | Software | 3 | 2016-07-27 05:26 |
Core affinity question | philmoore | Information & Answers | 2 | 2013-06-16 05:44 |
(windows) How to launch mfaktO/C with processor affinity | swl551 | Software | 1 | 2012-09-24 23:29 |
Helper Thread Affinity | TObject | Software | 3 | 2012-07-20 19:21 |
Affinity on Linux | bmg9611 | Software | 5 | 2002-11-04 21:26 |