The easiest way under Linux to get some information about the processors is to 
read the file /proc/cpuinfo. For each also virtual processor you find a 
entry. Here the output of my system(Dual xenon4 with hyperthreading).
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 7
cpu MHz         : 2799.603
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 5606.67

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 7
cpu MHz         : 2799.603
cache size      : 512 KB
physical id     : 3
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 5598.98

processor       : 2
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 7
cpu MHz         : 2799.603
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 5598.77

processor       : 3
vendor_id       : GenuineIntel
cpu family      : 15
model           : 2
model name      : Intel(R) Xeon(TM) CPU 2.80GHz
stepping        : 7
cpu MHz         : 2799.603
cache size      : 512 KB
physical id     : 3
siblings        : 2
core id         : 0
cpu cores       : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips        : 5598.85


Am Freitag, 2. März 2007 11:18 schrieb tanila:
> I would like to know how many processors are on the system, because i
> would like to use them paralell for a single task.
>
> The job could be done using 2, 4, etc threads simultaniously, to speed
> it up with usage of all processors at the same time.
>
> To split up the task I have to know how many cpus are available for
> usage.
>
> Is there a way to figure this out ?
>
> greetings
> tanila
>
> Am Freitag, den 02.03.2007, 11:20 +0200 schrieb Graeme Geldenhuys:
> > On 3/2/07, tanila <[EMAIL PROTECTED]> wrote:
> > > I would like to make experiences with multithreadded application and
> > > how to get benefits with more than one cpu.
> >
> > All you should need to do is create multiple threads in your system
> > and the OS and CPU(s) will handle the rest.  No need to do something
> > special in you application.
> >
> > > Another question:
> > > Are this magic doual/quad-core cups real multiprocessor-systems like a
> > > mainboard with two or more processors ?
> >
> > Yes they are like the old style mainboards with two or more physical
> > processors on the motherboard.  HyperThreading on the other hand is a
> > Intel sales gimic which fakes a second processor (software processor).
>
> _________________________________________________________________
>      To unsubscribe: mail [EMAIL PROTECTED] with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives

-- 
Best Regards/Gruss Siggi

Attachment: pgp9ue42CYah4.pgp
Description: PGP signature

Reply via email to