Java 模拟操作系统页面替换算法

上传者: AndrewDong_2008 | 上传时间: 2021-07-10 14:52:22 | 文件大小: 449KB | 文件类型: RAR
Java图形化界面实现以下要求,我上传给大家一同分享。 通过随机数产生一个指令序列,共 320 条指令,指令的地址按下述原则生成: (1):在[0,319]的指令地址之间随机选取一起点 m。 (2):顺序执行一条指令,即执行地址为 m+1 的指令 。 (3):在前地址[0,m+1]中随机选取一条指令并执行,该指令的地址为 m' 。 (4):顺序执行一条指令,其地址为 m'+1。 (5):在后地址[m'+2,319]中随机选取一条指令并执行。 (6):重复步骤 (1)—(6),直到生成 320 条指令。 2、将指令序列转换为页地址流,比如:页面大小为 1K,用户内存容量 4 页到 32 页,用户虚存容量为 32K;在用户虚存中,按每 K存放 10 条指令排列虚存地址。即 320 条指令在虚存中的存放方式为: 第 0 条-第 9 条指令为第 0 页(对应虚存地址为[0,9])。 第 10 条-第 19 条指令为第 1 页(对应虚存地址为[10,19]) 。 ……………………………… 第 310 条-第 319 条指令为第 31页(对应虚存地址为[310,319])。 按以上方式,用户指令可组成 32页。 3、页面大小的取值范围分别为 1K,2K,4K,8K,16K;按照页面大小将指令地址转化为页号;对于相邻相同的页号,合并为一个。 4、分配给程序的内存块数取值范围为 1 块、2块,一直到程序的页面数。 5、分别采用 FIFO 和 LRU 算法对页号序列进行调度,并计算出对应的缺页中断率。

文件下载

资源详情

[{"title":"( 69 个子文件 449KB ) Java 模拟操作系统页面替换算法","children":[{"title":"ImitateMemoryPageSpilt","children":[{"title":"dist","children":[{"title":"模拟操作系统分页调度算法.jar <span style='color:#111;'> 123.69KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpilt.jar <span style='color:#111;'> 123.69KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"swing-worker-1.1.jar <span style='color:#111;'> 10.75KB </span>","children":null,"spread":false},{"title":"appframework-1.0.3.jar <span style='color:#111;'> 258.00KB </span>","children":null,"spread":false},{"title":"swing-layout-1.0.3.jar <span style='color:#111;'> 115.33KB </span>","children":null,"spread":false}],"spread":true},{"title":"README.TXT <span style='color:#111;'> 1.43KB </span>","children":null,"spread":false}],"spread":true},{"title":"manifest.mf <span style='color:#111;'> 82B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"imitatememorypagespilt","children":[{"title":"FIFO.java <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"MemoryBlock.java <span style='color:#111;'> 623B </span>","children":null,"spread":false},{"title":"VirtualPageProduce.java <span style='color:#111;'> 2.97KB </span>","children":null,"spread":false},{"title":"MainFrm.java <span style='color:#111;'> 17.27KB </span>","children":null,"spread":false},{"title":"TiHuanSuanFa.java <span style='color:#111;'> 1.78KB </span>","children":null,"spread":false},{"title":"MainFrm.form <span style='color:#111;'> 17.57KB </span>","children":null,"spread":false},{"title":"LRU.java <span style='color:#111;'> 2.32KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"build","children":[{"title":"classes","children":[{"title":"imitatememorypagespilt","children":[{"title":"ImitateMemoryPageSpiltView$3.class <span style='color:#111;'> 2.51KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltView$6.class <span style='color:#111;'> 949B </span>","children":null,"spread":false},{"title":"MemoryBlock.class <span style='color:#111;'> 830B </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltApp.class <span style='color:#111;'> 1.18KB </span>","children":null,"spread":false},{"title":"resources","children":[{"title":"ImitateMemoryPageSpiltView.properties <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltAboutBox.properties <span style='color:#111;'> 278B </span>","children":null,"spread":false},{"title":"about.png <span style='color:#111;'> 8.00KB </span>","children":null,"spread":false},{"title":"busyicons","children":[{"title":"busy-icon10.png <span style='color:#111;'> 3.48KB </span>","children":null,"spread":false},{"title":"busy-icon0.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon7.png <span style='color:#111;'> 3.51KB </span>","children":null,"spread":false},{"title":"busy-icon6.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon12.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon5.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon9.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"idle-icon.png <span style='color:#111;'> 3.28KB </span>","children":null,"spread":false},{"title":"busy-icon1.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon2.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon8.png <span style='color:#111;'> 3.51KB </span>","children":null,"spread":false},{"title":"Thumbs.db <span style='color:#111;'> 7.00KB </span>","children":null,"spread":false},{"title":"busy-icon4.png <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false},{"title":"busy-icon13.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon14.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon11.png <span style='color:#111;'> 3.50KB </span>","children":null,"spread":false},{"title":"busy-icon3.png <span style='color:#111;'> 3.49KB </span>","children":null,"spread":false}],"spread":false},{"title":"ImitateMemoryPageSpiltApp.properties <span style='color:#111;'> 439B </span>","children":null,"spread":false},{"title":"splash.png <span style='color:#111;'> 21.24KB </span>","children":null,"spread":false}],"spread":true},{"title":"MainFrm$5.class <span style='color:#111;'> 808B </span>","children":null,"spread":false},{"title":"MainFrm.class <span style='color:#111;'> 11.70KB </span>","children":null,"spread":false},{"title":"MainFrm$1.class <span style='color:#111;'> 815B </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltView.class <span style='color:#111;'> 13.35KB </span>","children":null,"spread":false},{"title":"FIFO.class <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltView$1.class <span style='color:#111;'> 1.03KB </span>","children":null,"spread":false},{"title":"LRU.class <span style='color:#111;'> 2.61KB </span>","children":null,"spread":false},{"title":"Main.class <span style='color:#111;'> 1.82KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltView$5.class <span style='color:#111;'> 948B </span>","children":null,"spread":false},{"title":"MainFrm$2.class <span style='color:#111;'> 815B </span>","children":null,"spread":false},{"title":"MainFrm$4.class <span style='color:#111;'> 808B </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltAboutBox.class <span style='color:#111;'> 5.43KB </span>","children":null,"spread":false},{"title":"MainFrm$3.class <span style='color:#111;'> 815B </span>","children":null,"spread":false},{"title":"MainFrm$6.class <span style='color:#111;'> 570B </span>","children":null,"spread":false},{"title":"FIFOAndLRU.class <span style='color:#111;'> 2.66KB </span>","children":null,"spread":false},{"title":"TiHuanSuanFa.class <span style='color:#111;'> 2.79KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltView$2.class <span style='color:#111;'> 1.32KB </span>","children":null,"spread":false},{"title":"VirtualPageProduce.class <span style='color:#111;'> 2.20KB </span>","children":null,"spread":false},{"title":"ImitateMemoryPageSpiltView$4.class <span style='color:#111;'> 948B </span>","children":null,"spread":false}],"spread":false},{"title":"META-INF","children":[{"title":"services","children":[{"title":"org.jdesktop.application.Application <span style='color:#111;'> 48B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"Thumbs.db <span style='color:#111;'> 58.00KB </span>","children":null,"spread":false},{"title":"build.xml <span style='color:#111;'> 3.32KB </span>","children":null,"spread":false},{"title":"nbproject","children":[{"title":"build-impl.xml <span style='color:#111;'> 32.43KB </span>","children":null,"spread":false},{"title":"private","children":[{"title":"private.xml <span style='color:#111;'> 211B </span>","children":null,"spread":false},{"title":"config.properties <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"private.properties <span style='color:#111;'> 168B </span>","children":null,"spread":false}],"spread":true},{"title":"project.properties <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false},{"title":"project.xml <span style='color:#111;'> 664B </span>","children":null,"spread":false},{"title":"genfiles.properties <span style='color:#111;'> 455B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

  • lgl8982335 :
    很好,如果再加上LFU、OPT算法就好了
    2012-11-18

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明