文档介绍:-
. z.
一、构建根本的实验环境
Windows7 、Word 2010、Vmware WorkStation 、AdobeReader
long ru_minflt; /* page reclaims */
long ru_majflt; /* page faults */
-
. z.
long ru_nswap; /* swaps */
long ru_inblock; /* block input operations */
long ru_oublock; /* block output operations */
long ru_msgsnd; /* messages sent */
long ru_msgrcv; /* messages received */
long ru_nsignals; /* signals received */
long ru_nvcsw; /* voluntary conte*t switches */
long ru_nivcsw; /* involuntary " */
};
2)函数getrusage()的作用是获取系统资源使用情况。
/*
* It would make sense to put struct rusage in the task_struct,
* e*cept that would make the task_struct be *really big*. After
* task_struct gets moved into malloc'ed memory, it would
* make sense to do this. It will make moving the rest of the information
* a lot simpler! (Which we're not doing right now because we're not
* measuring them yet).
*
* This is SMP safe. Either we are called from sys_getrusage on ourselves
* below (we know we aren't going to e*it/disappear and only we change our
* rusage counters), or we are called from wait4() on a process which is
* either stopped or zombied. In the zombied case the task won't get
* reaped till shortly after the call to getrusage(), in both cases the
* task being e*amined is in a frozen state so