What does my processor do when it is referred to as a "system processor"?

My code often uses a lot of "system processor" (on ubuntu).

I understand that this means that the processor is doing something different than what my code actually works. I heard that it can, for example, control input / output.

I have two questions:

1) Can I get a more comprehensive list of what the processor can do when it is on the “system processor”?

2) When I run a specific program, is there a way to determine what the system processor does at this start? (some kind of profiling "system processor")

+4
source share
1 answer

When your CPU is in a system state, this is because system calls are being made. These system calls are, for example, input-output (display, network, files) or memory (distribution, ...).

You can run your program with strace to get a detailed view of which system calls your program is currently making.

+5
source

Source: https://habr.com/ru/post/1396888/


All Articles