a question on multi processor desig / systems

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Post Reply
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

a question on multi processor desig / systems

Post 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
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: a question on multi processor desig / systems

Post 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
User avatar
Walling
Member
Member
Posts: 158
Joined: Mon Dec 04, 2006 6:06 am
Location: Berlin, Germany

Re: a question on multi processor desig / systems

Post 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.
User avatar
kmtdk
Member
Member
Posts: 263
Joined: Sat May 17, 2008 4:05 am
Location: Cyperspace, Denmark
Contact:

Re: a question on multi processor desig / systems

Post by kmtdk »

thanks .


KMT dk
well, what to say, to much to do in too little space.
when it goes up hill, increase work, when it goes straight, test yourself but when going down, slow down.
Post Reply