5实验五存储管理参考代码(实际物理内存、虚拟内存操作)参考代码摘要.doc

5实验五存储管理参考代码(实际物理内存、虚拟内存操作)参考代码摘要.doc

5实验五存储管理参考代码(实际物理内存、虚拟内存操作)参考代码摘要.doc

五、源程序(含注释)清单 #include windows.h #include stdio.h #include process.h #include time.h unsigned _stdcall simulator(void *); unsigned _stdcall inspector(void *); LPVOID BASE_PTR; int Actnum=0; //主函数,主要是用于启动用于模拟虚存活动和进行监控的两个线程; int main(int argc, char* argv[]) { unsigned ThreadID[2]; _beginthreadex(NULL,0,simulator,NULL,0,ThreadID[0]); _beginthreadex(NULL,0,inspector,NULL,0,ThreadID[1]); getchar();//输入回车即可终止程序; return 0; } //模拟一系列的虚存活动,作为一个独立的线程运行; unsigned _stdcall simulator(void *) { DWORD OldProtect; int randnum; printf(Now the simulator procedure has been started.\n); //产生一个随机数种子; s

文档评论(0)

1亿VIP精品文档

相关文档