在UNIX中,挂钟时间,用户cpu时间和系统cpu时间具体是什么? [英] What specifically are wall-clock-time, user-cpu-time, and system-cpu-time in UNIX?

查看:209
本文介绍了在UNIX中,挂钟时间,用户cpu时间和系统cpu时间具体是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以根据名称进行猜测,但是在UNIX中,wall-clock-time,user-cpu-time和system-cpu-time具体是什么?

I can take a guess based on the names, but what specifically are wall-clock-time, user-cpu-time, and system-cpu-time in UNIX?

由于需要特权操作(例如从IO到磁盘),user-cpu时间是执行用户代码所花的时间,而kernel-cpu时间是在内核中所花的时间吗?

Is user-cpu time the amount of time spent executing user-code while kernel-cpu time the amount of time spent in the kernel due to the need of privileged operations (like IO to disk)?

此测量单位是什么时间.

What unit of time is this measurement in.

挂钟时间真的是进程在CPU上花费的秒数,还是名称只是误导?

And is wall-clock time really the number of seconds the process has spent on the CPU or is the name just misleading?

推荐答案

壁钟时间是指墙上的时钟(或手头的秒表)在流程开始与现在.

Wall-clock time is the time that a clock on the wall (or a stopwatch in hand) would measure as having elapsed between the start of the process and 'now'.

用户cpu时间和系统cpu时间与您所说的差不多-用户代码所花费的时间和内核代码所花费的时间.

The user-cpu time and system-cpu time are pretty much as you said - the amount of time spent in user code and the amount of time spent in kernel code.

单位是秒(和亚秒,可能是微秒或纳秒).

The units are seconds (and subseconds, which might be microseconds or nanoseconds).

挂钟时间不是进程在CPU上花费的秒数;这是经过的时间,包括等待其打开CPU所需的时间(其他进程开始运行).

The wall-clock time is not the number of seconds that the process has spent on the CPU; it is the elapsed time, including time spent waiting for its turn on the CPU (while other processes get to run).

这篇关于在UNIX中,挂钟时间,用户cpu时间和系统cpu时间具体是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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