0

I have 6 cores on my machine and while running a program, I notice some unexplained behavior (stalling) that might come from the OS background operations.

  1. Is there a way to find out - which core the OS is running on?
  2. and if there are a few cores on which the OS is running on, can I limit the OS to run on a single core that I choose?
Yaniv G
  • 307
  • 4
  • 11
  • 1
    It doesn't work that way. There is no "core that the OS is running on". I don't know about ARM OSes but x86 OSes are basically interrupt based. The OS is not "running" it is just present in RAM somewhere (and you don't need to know where). There are some processes that are started for the graphical desktop and this the closest to a process which is always running that you could call an OS process. Otherwise, the OS just sets up interrupts and timers and every kernel thread you will find are created by interrupts. – user123 Jun 22 '21 at 11:52
  • Also, if you run a program in user mode on Linux and find that it "stalls" this is not a bug in the kernel. It's a bug in your program. Linux is mature enough to not have this kind of weird bug. – user123 Jun 22 '21 at 11:53
  • 1
    I suspect what Yaniv is asking for is: whether there is a way to check what core(s) a kernel thread/daemon is being executed on and whether their affinities could be set to limit them to a single core. – Greg Jul 10 '23 at 16:30

0 Answers0