Page 1 of 1
a question on multi processor desig / systems
Posted: Thu Nov 06, 2008 11:01 am
by kmtdk
I was worndring about a thing in multiprocessors systems ( 2 or more cores), the question:
if i write code assume only work for 1 core, and the run the code on a 2 core , would it change anything;
let me put it this way:
in a multiprocesser system, does you have to "enable" the secound core ?
KMT dk
Re: a question on multi processor desig / systems
Posted: Thu Nov 06, 2008 11:17 am
by AJ
Hi,
There is a lot to take in to account when you run your kernel on an SMP system.
To enable the second core, search for information about the IOAPIC, Local APIC's, ACPI and MP Tables. There's a load on the wiki and forum about this. You basically have to provide trampoline code to get the application processors in to the desired state.
Your kernel will have to take in to account 2 or more processes attempting to access the same resource simultaneously (memory and IO). You therefore also need to know about mutual exclusion in a big way.
Cheers,
Adam
Re: a question on multi processor desig / systems
Posted: Thu Nov 06, 2008 11:17 am
by Walling
Your code can not magically run on two cores if it is designed for one. The code should be designed to take advantage of multiple cores.
Yes, you have to enable the second core yourself.
Re: a question on multi processor desig / systems
Posted: Thu Nov 06, 2008 11:30 am
by kmtdk
thanks .
KMT dk