avatar
What is a jiffy in linux?# Unix - 噫吁兮,危乎高哉
F*e
1
Say if I want to find the actual time of 100 jiffies on my linux,
how do I do it?
Thanks a lot!
avatar
c*e
2
As I read it, jiffies are the number of elapsed ticks starting from
the system start. It's increment by 1 for every timer interrupt.
So that depends on how linux programs the programmable timer.
Normally, it's 10ms per tick.

【在 F**e 的大作中提到】
: Say if I want to find the actual time of 100 jiffies on my linux,
: how do I do it?
: Thanks a lot!

avatar
m*e
3

In user space it's ALWAYS 100 jiffies per second (at least on x86).
In kernel space it depends. Recent kernels have changed it internally.

【在 c********e 的大作中提到】
: As I read it, jiffies are the number of elapsed ticks starting from
: the system start. It's increment by 1 for every timer interrupt.
: So that depends on how linux programs the programmable timer.
: Normally, it's 10ms per tick.

avatar
F*e
4
Thank you, microbe and clarkmouse!
Actually my problem was: I was getting process info from
/proc//stat
One of the properties I am interested in is the usertime(utime) there. The man
says utime is "The number of jiffies that this process has been scheduled in
user mode".
So that means the number I get there divided by 100 will give me the number of
seconds? Right? Just want to make sure. Thanks.

【在 m*****e 的大作中提到】
:
: In user space it's ALWAYS 100 jiffies per second (at least on x86).
: In kernel space it depends. Recent kernels have changed it internally.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。