用户时间大于实时 [英] user time larger than real time

查看:41
本文介绍了用户时间大于实时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以某种方式在我的程序上获得了以下时间戳记.我了解如果涉及到IO,则实时可能大于用户时间和系统时间的总和,但是当仅用户时间大于实时时,您如何解释呢?

I somehow get the following timestamp on my program. I understand if there's IO involved, real time can be larger than the sum of user time and system time, but how do you explain this when user time alone is larger than real time

real    0m8.512s
user    0m8.737s
sys     0m1.956s

推荐答案

该程序有时可能使用多个内核.用户时间是在已使用的核心上求和的,例如将两个内核的100%占用1s会使用户花费2s时间.

The program is probably using multiple cores at some point. User time is summed over the cores that have been used, so e.g. using 100% of two cores for 1s makes for 2s user time.

这篇关于用户时间大于实时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆