FreeBSD CPUs

Posted by BostonGuru, 03-23-2007, 12:51 AM
Does anyone know how to bind a process (either when starting it or after its been started) to run only on a specific CPU, or only allow it to run on one of a few given CPUs? I am looking to do this on freeBSD 6.2.

Posted by bleenzorb, 03-23-2007, 01:34 AM
for Intel CPUs, you can use the CPUID opcode. Of course, you'll need to code in a language that supports it, like C with an asm{} block, or straight assembler--which I assume you're doing anyway in order to protect your source.

Posted by Xeentech, 03-23-2007, 09:33 AM
I duno about FreeBSD, but what you're after is called CPU Affinity. I'd imagin BSD has a tool for that since its been mature on SMP for a long time now. Perhaps now you know the correct term google will help more.

Posted by bleenzorb, 03-23-2007, 12:58 PM
Oops. I thought he meant he wanted to cause his code to only work on a particular type of CPU platform, as in Intel vs. AMD. Forget what I said about CPUID. As for affinity, I know on Window and particular other (now obsolete) OSs, a single thread is assigned to a single CPU at startup and it doesn't switch CPUs from then on, but there are ways to specify which one before startup. Don't know about freeBSD. Last edited by bleenzorb; 03-23-2007 at 01:03 PM.

Posted by drhowarddrfine, 03-23-2007, 04:44 PM
I know it's possible but only because I remember reading about it but that's as far as I can go.

Posted by Xeentech, 03-23-2007, 07:08 PM
From this very recent post: http://lists.freebsd.org/pipermail/f...ry/001338.html on a BSD mailing list, sounds like its a very ugly process. There should be an example of the 'parent' application about that they refer to.

Bu mövzu kifayət qədər köməkçi oldu mu?

 Çap

Digər Başlıqlar

Domain parking with Win2k3 DNS??

Posted by bloodsport, 08-03-2007, 09:47 AMHi, i have about 8 different domains i'd like to point...

how protection upload from members {jpg-gif-png} only ?

Posted by 3okl, 09-18-2008, 07:06 PMif member have none photo the uploader start upload anyfile...

RAID 5 or RAID 10 - Which is the best?

Posted by wolfdog, 04-19-2009, 08:48 AMHi, The answer to my previous seems to HARDWARE RAID...

File Integrity Check

Posted by taydu3000, 01-15-2008, 04:01 AMAre the following file from Cpanel? Cpanel just update...

SQL DB backup error !

Posted by htw_Mehdi, 09-14-2007, 09:28 PMhello, when i try to backup mysql database on the...