1 / 10
文档名称:

添加系统调用实验报告.doc

格式:doc   大小:181KB   页数:10页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

添加系统调用实验报告.doc

上传人:gdntv68 2022/7/31 文件大小:181 KB

下载得到文件列表

添加系统调用实验报告.doc

文档介绍

文档介绍:-
. 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