CPU Affinity
Is there a progamatic method to set CPU affinity for a process in c/c++ for the linux operating system. ...
Is there a progamatic method to set CPU affinity for a process in c/c++ for the linux operating system. ...
On a dual quad-core GetProcessAffinityMask (or the dialog from "Set affinity" in taskman.exe) will report eight logical processors. How do I find out which logical processor is on which physical processor? Especially: which logical processors are on the same physical processor? EDIT: If it is not possible to do this programmatically, do...
I have a quad core system with third party application that once in a while spins several processes (always the same executable but several instances of it) and takes 100% of CPU time. I also have a couple of web services running on the same box (IIS and third party). The problem with the all cores being busy is that it makes this third...
I've got a dual processor machine and I would like to launch an executable via a batch file on both processors. For example: (1) Launch Notepad.exe on Processor 1, and (2) Simultaneously, Notepad.exe on Processor 2 Currently, I'm using the following in my batch file, since my executable was "difficult" to launch and needed a return in...
I was benchmarking a large scientific application, and found it would sometimes run 10% slower given the same inputs. After much searching, I found the the slowdown only occurred when it was running on core #2 of my quad core CPU (specifically, an Intel Q6600 running at 2.4 GHz). The application is a single-threaded and spends most of ...
( I ask because it was before serious SMP and multicore that I studied OS. I like to have some vision of how code is being executed. ) If I have a multicore x86 CPU booting directly into my program. Can someone recommend a website which describes what assembler commands do I have to control affinity? ...
Hello everyone, I have a program written in C#, I am using VSTS 2008 + .Net 3.5 + Windows Vista Enterprise x86 to develop a Windows Forms application. My current computer is dual-core CPU, I want to set CPU affinity of my program to run on a specific CPU and free another CPU to do some other job. Any ideas how to do this? Either throug...
I'm having a WinForms application where I would like to perform some long-running operations, e.g. imagine Explorer copying 2 big files in parallel. For each of those long-running operations I'm starting a separate UI thread (which includes pumping messages/Application.Run/Application.ExitThread) where I create an instance of the IProgre...
How can the CPU affinity of a process be set in kernel module? In user mode there is a syscall sched_setaffinity, but I am looking for the kernel mode equivalent. In the Linux kernel code, there is also a function called sched_setaffinity. It's called from the sys_sched_setaffinity function which is called by system_call. From what i...
Hi, I'd like to specify the cpu-affinity of a particular pthread. All the references I've found so far deal with setting the cpu-affinity of a process (pid_t) not a thread (pthread_t). I tried some experiments passing pthread_t's around and as expected they fail. Am I trying to do something impossible? If not, can you send a pointer ple...
I run my NT service on an Intel Core2 based Win2k3 machine where I need to iterate through all logical CPUs (all bits in process affinity). To do so I call GetProcessAffinityMask() to retrieve the system affinity mask and then switch the process to each processor in turn: DWORD systemMask; GetProcessAffinityMask( ... &systemMask ); D...
Hello, I just wanted to find out if setting cpu affinity ensure that the application runs only on that core ? ...
I have a number (hex) and I want the one's complement of it. For example if X = 20 I want bash to perform a negation and return Y = ~X = DF. It doesn't have to be in bash, but it should use a common command line tool that I can wrap into a script. Also note that the numbers should all be unsigned and I'd prefer they don't overflow the...
I am writing a linux kernel module that needs to pin two threads on two different cpus. I am planning to use sched_setaffinity() after exporting it in the kernel. Is there any other exported function for the same ? Also, if I set only 1 CPU in the cpumask, will the thread be moved to that cpu with immediate effect ? If not, how do I en...
We have a .NET 3.5 application that stores sessions "In process". The application works fine when Web Garden in IIS6 is set to 1. However, when we change to 2 or more, users gets kick out and asked to log in again. As far as I have read, this can be solved by storing sessions out of the process (either state server or database). Assumi...
In Windows, I can set the processor affinity of driver code using KeSetSystemAffinityThread, and check which processor my code is running on using KeGetCurrentProcessorNumber. I'm trying to do something similar in a Linux kernel module, but the only affinity calls I can see are for userland processes. Is there any way to do this, so tha...
Hi. I have a C# project, where I have to both access the current workload of my processor, and ensure, that I run some specific code on every kernel of the processor. My problem is, that accessing the workload of my processor seems to prevent me from correctly assigning a thread affinity mask. I have some code here, that illustrates the...
I mean analyzing 2 users profiles I get a score that it is reciprocal a.affinity(b) == b.affinity(a) I'd like to know in particular: which schema would u use to implement the affinity table which db mysql, redis,.. which technology would you use to update the affinity score in background? Thanks ...