2 ms·
Yes, Frank has a very nice series going there. More parts are expected to follow. As to your question on what CPU the kernel normally runs on? AFAIK, it normal
by wila 10y ago
Yes, Frank has a very nice series going there. More parts are expected to follow.
As to your question on what CPU the kernel normally runs on?
AFAIK, it normally starts at core 0, processor 0.
You can see for yourself where processes run.
For example using the ps command.
It will print kernel threads in square brackets and it can also list cpu and core number behind a /.
Eg, example output of a linux VM with 2 processors.
$ ps -ax
PID TTY STAT TIME COMMAND
1 ? Ss 0:03 /sbin/init splash
2 ? S 0:00 [kthreadd]
3 ? S 0:00 [ksoftirqd/0]
5 ? S< 0:00 [kworker/0:0H]
7 ? S 0:15 [rcu_sched]
8 ? S 0:00 [rcu_bh]
9 ? S 0:00 [migration/0]
10 ? S 0:00 [watchdog/0]
11 ? S 0:00 [watchdog/1]
etcetera.. removed the rest for readability
The CPU scheduler then handles the rest to see on which thread/core to run a new process.
This post might also help:
http://superuser.com/questions/389161/what-do-the-mean-in-ps-and-how-do-you-create-a-process-like-it http://superuser.com/questions/389161/what-do-the-mean-in-ps...