Write a C program to measure time spent in context switch in Linux OS

后端 未结 6 1381
独厮守ぢ
独厮守ぢ 2020-12-04 07:54

Can we write a c program to find out time spent in context switch in Linux? Could you please share code if you have one? Thanks

6条回答
  •  春和景丽
    2020-12-04 08:16

    What do you think , measuring the context switching with seconds or milliseconds or even microseconds . All happening less than nano-sec . If your want to spend that huge of time for context switching which could be measured ,then ... Try some real-mode kernel type code written on Assembly , you might see something.

提交回复
热议问题