2022年模拟分页式虚拟存储管理中硬件的地址转换和缺页中断--选择页面调度算法处理缺页中断 .docx





《2022年模拟分页式虚拟存储管理中硬件的地址转换和缺页中断--选择页面调度算法处理缺页中断 .docx》由会员分享,可在线阅读,更多相关《2022年模拟分页式虚拟存储管理中硬件的地址转换和缺页中断--选择页面调度算法处理缺页中断 .docx(21页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、精选学习资料 - - - - - - - - - 操作系统试验二第一题一试验内容 模拟分页式虚拟储备治理中硬件的地址转换和缺页中断,以及挑选页面调度算法处理缺 页中断;二试验目的 在电脑系统总,为了提高主存利用率,往往把帮助储备器作为主储备器的扩充,使多道运行的作业的全部规律地址空间综合可以超出主存的肯定地址空间;储区成为虚拟储备器;三试验题目模拟分页式储备治理中硬件的地址转换和产生缺页中断;开头取 一 条 指取指令中拜访的页号查页表用这种方法扩充的主存是 否该也标志 =1?形成肯定地址输出“ * ” 页号表示 发生缺页中断输出肯定地址有后继指令?取下一条指令终止名师归纳总结 - - - -
2、- - -第 1 页,共 11 页精选学习资料 - - - - - - - - - 四程序清单/ / 操作试验二 .cpp : 定义掌握台应用程序的入口点;/ #include stdafx.h #include #include #include using namespace std; class ins private:string ope; long int page; long int unit; public: ins insstring o,long int p,long int u:opeo,pagep,unitu void setopestring o ope=o; void
3、 setpagelong int p page=p; void setunitlong int u unit=u; string getopereturn ope; long int getpagereturn page; long int getunitreturn unit; ; class work private: long int Page; int sym; long int inum; long int onum; public: work worklong int P, int s,long int i,long int o:PageP,syms,inumi,onumo voi
4、d setPagelong int P Page=P; void setsym int s sym=s; void setinumlong int i inum=i; 名师归纳总结 - - - - - - -第 2 页,共 11 页精选学习资料 - - - - - - - - - void setonumlong int o onum=o; long int getPagereturn Page; int getsymreturn sym; long int getinumreturn inum; long int getonumreturn onum; ; void diaoduwork *
5、w,ins * i,int numofins forint j=0;jnumofins;j+ long int tempofk; long int a =ij.getpage; forint k=0;k7;k+ /7 是页表的页数 ifwk.getPage.=a continue; else tempofk=k; break; ifwtempofk.getsym=1 cout 肯定地址:wtempofk.getinum*128+ij.getunit 磁盘地址为: wtempofk.getonum 操作为: ij.getopeendl; else cout* 发生缺页中断 endl; int m
6、ain ins*INS=new ins12; INS0.setope +; INS0.setpage0; INS0.setunit70; INS1.setope +; INS1.setpage1; INS1.setunit50; INS2.setope ; 名师归纳总结 - - - - - - -第 3 页,共 11 页精选学习资料 - - - - - - - - - INS2.setpage2; INS2.setunit15; INS3.setope 存 ; INS3.setpage3; INS3.setunit21; INS4.setope 取 ; INS4.setpage0; INS4.
7、setunit56; INS5.setope -; INS5.setpage6; INS5.setunit40; INS6.setope 移位 ; INS6.setpage4; INS6.setunit53; INS7.setope +; INS7.setpage5; INS7.setunit23; INS8.setope 存 ; INS8.setpage1; INS8.setunit37; INS9.setope 取 ; INS9.setpage2; INS9.setunit78; INS10.setope +; INS10.setpage4; INS10.setunit1; INS11.s
8、etope 存; INS11.setpage6; INS11.setunit84; work*W =new work7; ifstream ing:/operate1.txt; long int p; int s; long int i; long int o; forint jj=0;jjp;ins;ini;ino ; Wjj.setPagep; Wjj.setsyms;Wjj.setinumi;Wjj.setonumo; diaoduW,INS,12; 五结果显示名师归纳总结 - - - - - - -第 5 页,共 11 页精选学习资料 - - - - - - - - - 操作系统试验二
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年模拟分页式虚拟存储管理中硬件的地址转换和缺页中断-选择页面调度算法处理缺页中断 2022 模拟 分页 虚拟 存储 管理 硬件 地址 转换 中断 选择 页面 调度 算法 处理

链接地址:https://www.taowenge.com/p-64020519.html
限制150内