摘要: As already discussed, a new process is created through fork() and if a new executable is to be run then exec() family of functions is called after fork(). As soon as this new process is created, it gets queued into the queue of processes that are ready to run.If only fork() was called then it is hig 阅读全文
posted @ 2013-10-17 16:16 sunsweet 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 《APUE》上提到了三个时间Real time, User time和Sys time。这三者是什么关系呢?在使用time(1)命令的时候,为什么real time < user time + sys time?(由于笔者的虚拟机为单核,显示的结果不会出现此种情况。附网上看到的一种结果如下:$timefooreal0m0.003suser0m0.000ssys0m0.004s$ Real指的是实际经过的时间,User和Sys指的是该进程使用的CPU时间。1. Real是墙上时间(wall clock time),也就是进程从开始到结束所用的实际时间。这个时间包括其他进程使用的时间片和进程 阅读全文
posted @ 2013-10-17 09:54 sunsweet 阅读(1817) 评论(0) 推荐(0) 编辑