开发者

Are the CPU cycles used up in doing a context switch accounted for in the process context?

开发者 https://www.devze.com 2023-03-03 15:46 出处:网络
If a process causes a lot of context switches, will the CPU cycles used in the context switch be shown in the process CPU utilization?

If a process causes a lot of context switches, will the CPU cycles used in the context switch be shown in the process CPU utilization?

In other words, if I run a process that essentially repeatedly executes a system call, then should the output of top show an increase in CPU utilization for 开发者_如何学编程the process because of the increase in context switching from user to kernel space and vice versa?


Yes, I think it should.

Look at the man pages for top and time in linux and possibly other *nix systems.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号