Can Linux Handle Multiple CPU's

Can Linux Handle Multiple CPU's

Post by Curt Row » Mon, 10 Sep 2001 06:23:01



I'm almost certain the answer is yes, but I wanted to make sure.  Does
Linux support multiple cpu's on an Intel platform?
Thanks,
Curt

When replying by email, remove NOSPAM from the 'reply to' address.

 
 
 

Can Linux Handle Multiple CPU's

Post by Christian Garm » Mon, 10 Sep 2001 08:45:49


[...]

Quote:> I'm almost certain the answer is yes, but I wanted to make sure.  Does
> Linux support multiple cpu's on an Intel platform?  Thanks, Curt

Yes, but you must use a kernel with SMP (symmetric multiprocesser)
support built-in.

--
regards,


 
 
 

Can Linux Handle Multiple CPU's

Post by Dichotimus Gro » Wed, 12 Sep 2001 10:37:24



Quote:> I'm almost certain the answer is yes, but I wanted to make sure.  Does
> Linux support multiple cpu's on an Intel platform?
> Thanks,
> Curt

> When replying by email, remove NOSPAM from the 'reply to' address.

Yes, if you install an SMP version of the kernel, as another poster said.
This is not as hard as it sounds.  For example the Mandrake distribution
auto-detected my 2 CPUs and installed an SMP and a UP kernel, with the
default boot to the SMP version (like you would tyoicall want.)

One thing to bear in mind is that SMP support is evolving, but it definately
needs more work.  There are lots of Spinlocked Kernel datastructures still,
so the change that one CPU will be blocked is still less than negligible.
If you go SMP you want a 2.4.x Kernel if you can, because although the 2.2.x
versions will support SMP, it is not as good as the support in the 2.4.x
versions (performance wise.)

All in all, I am very happy with my Dual PIII 450 Mhz w/256 MB SDRAM, and 32
MB Video RAM onboard my Viper V770 Graphics card, 19" Princeton Graphics AGX
900 'Trinitron' Monitor, HP9100 Series CD-RW, DVD ROM Drive, and High Speed
Internet Connection, but then I am easy to please 8^}

Cheers,

Dichotimus

 
 
 

1. in 'getopt()', how to handle multiple options in the 'optarg' string?

Hi All,

Pardon the possible idiocy of this question:

I'm trying to use the 'getopt' routine for handling command-line flags and
while most of it works like a charm, I need to have 1 flag that has 2
arguments:

progname -g 10 filename  yadda yadda yadda

optarg is declared as an 'extern char *', as per the man page for this,
and after the call to getopt, is supposed to point to the beginning of the
variable string.  I read this to mean that after the call, optarg should
point to the string "10 filename".

However, using an intermediate pointer 'tempstr' (because I can't examine
'optarg' directly for some reason (Is that a clue?)), I see with my
debugger that after:
   .
   .
while ((c = getopt(argc, argv, "Lsvqhf:n:o:m:M:b:e:R:g:l:t:T:C:F:w:")) != EOF)
   .
   .
tempstr = optarg;

<now look at tempstr in memory, from the above example>

1 0 \0 f i l e n a m e \0

it looks like it's there but as 2 null-terminated strings instead of one,
so I can't read it in with a 'sscanf()' or suchlike.

Two questions:
1) Is this the correct action of getopt? (almost certainly 'yes' - I'm a
novice at this)

2) What is the usual way of extracting multiple options per flag using getopt?

Thanks in advance for any enlightenment.
Cheers
harry
--
Harry J Mangalam, MolBio+Biochem / Dev+Cell Bio, Rm 4201, BioSciII  UC
Irvine, Irvine, CA, 92717, (714) 824-4824, fax (714) 824 8598
--
Harry J Mangalam, MolBio+Biochem / Dev+Cell Bio, Rm 4201, BioSciII  UC Irvine, Irvine, CA, 92717, (714) 824-4824, fax (714) 824 8598

2. TOMCAT/Apache and IE with friendly error messages

3. Which distro handles multiple CPUs on 1 motherboard best?

4. Need a free development-environment

5. multiple IP's ....TFTP deamon can't handle that!?

6. Linux, Windows, and cars

7. How do unix's handle multiple port opens?

8. Questionable packets, need help

9. It's not bad canned meat...

10. Machine with multiple CPUs: which CPU is running which process?

11. Multiple CPU's and Monitors Single keyboard and mouse