Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What i meant was, in a multicore system with 'n' number of cpu's, will each cpu have its own linux kernel installed, or will all cpu's have a copy of the same kernel image?

Another question regarding multicore is kernel tracing. Since tracing works at the kernel level, then should i perform tracing for each cpu's seperately or kernel tracing can be performed as a whole for all cpu's put-together?

share|improve this question

migrated from stackoverflow.com Feb 17 '10 at 15:46

This question came from our site for professional and enthusiast programmers.

3  
Sounds like a super user question, as it doesn't seem to be directly related to programming. –  Mark Byers Feb 16 '10 at 21:26
1  
I'm not so sure, this question is fairly fundamental to the nuts and bolts of kernels. I'd be minded to keep the question here. –  stsquad Feb 16 '10 at 23:29
add comment

3 Answers

All CPU's share the same memory system and there is only one copy of Linux loaded. Each running process will have its own stack, but this is true on single-CPU systems as well.

Strace is implemented via ptrace which I believe works on individual PID's, so I think this means it will only trace a single thread's execution.

share|improve this answer
    
There is of course the addition of per-cpu variables for things that are only relevant to running on one core. –  stsquad Feb 16 '10 at 23:30
add comment

You will have one kernel image, with sections of the code executed across the number of cores/cpu's. This will vary depending on the kernel switches/how was it compiled.

In relation to kernel tracing, you will still have one tracing!

Remember the same singular kernel will be executed by multiple cpus/cores...

Hope this helps, Best regards, Tom.

share|improve this answer
add comment

Thank you all for your answers. I did a little research myself and found that both are possible in multicore systems. A SMP multicore system will have a single linux kernel for all the cores, where as in an AMP multicore system, each core will have its own kernel. Typically,some multicores will have couple of cores for AMP performing real time critical tasks, and the rest will be SMP performing non critical and normal tasks.

The question, i asked is about kernel tracing. Nowadays, most kernels come with inbuilt kprobes that will allow kernel developers to get information about the kernel performance. I guess, the answer to the first question also solves this question. In a SMP, a single trace for a kernel will be generated where as in AMP, as many traces as the number of cpu's will be generated.

AMP stands for Asymmetric Multi Processing, SMP stands for Symmetric Multi Processing

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.