文件名称:page
介绍说明--下载内容均来自于网络,请自行研究使用
模拟操作系统采用OPT、FIFO和LRU算法进行页面置换的过程。
设程序中地址范围为0到32767,采用随机数生成256个指令地址,满足50 的地址是顺序执行,25 向前跳,25 向后跳。为满足上述条件,可采取下列方法:
设d0 10000,第 n个指令地址为dn,第 n+1 个指令地址为dn+1 ,n的取值范围为0 到255。每次生成一个 1 到1024范围内的随机数a,如果a落在1 到512 范围内,则dn+1 dn+1。如果a落在513 到768范围内,则设置dn+1 为1 到dn范围内一个随机数。如果a落在769 到1024范围内,则设置dn+1 为dn到32767范围内一个随机数。
页面大小的取值范围为1K,2K,4K,8K,16K 。按照页面大小将指令地址转化为页号。对于相邻相同的页号,合并为一个。
分配给程序的内存块数取值范围为1 块,2 块,直到程序的页面数。
6、 分别采用OPT、FIFO 和LRU算法对页号序列进行调度,计算出对应的缺页中断率。
打印出页面大小、分配给程序的内存块数、算法名、对应的缺页中断率。
操作系统页面置换算法通过c++实现
-Simulation operating system uses OPT, FIFO and LRU page replacement algorithm process. Let the program addresses the range of 0 to 32767, using a random number generator 256 instruction address, the address is to meet 50 of the order, a 25 jump forward, jump back 25 . To meet the above conditions, you can take the following methods: Let d0 10000, n-th instruction address is dn, the first n+1 instruction address dn+1, n the range of 0-255. 1-1024 each generate a random number within a range, if a falls within the range of 1-512, the dn+1 dn+1. If a falls within the range of 513-768, set dn+1 within the range of 1 to dn a random number. If a falls within the range of 769-1024, is set to dn dn+1 to a random number within the range of 32767. Page size in the range of 1K, 2K, 4K, 8K, 16K. Follow the page size of the instruction address into the page number. For the same adjacent page numbers, into one. Memory blocks allocated to the program in the range of 1, 2, until the page number
设程序中地址范围为0到32767,采用随机数生成256个指令地址,满足50 的地址是顺序执行,25 向前跳,25 向后跳。为满足上述条件,可采取下列方法:
设d0 10000,第 n个指令地址为dn,第 n+1 个指令地址为dn+1 ,n的取值范围为0 到255。每次生成一个 1 到1024范围内的随机数a,如果a落在1 到512 范围内,则dn+1 dn+1。如果a落在513 到768范围内,则设置dn+1 为1 到dn范围内一个随机数。如果a落在769 到1024范围内,则设置dn+1 为dn到32767范围内一个随机数。
页面大小的取值范围为1K,2K,4K,8K,16K 。按照页面大小将指令地址转化为页号。对于相邻相同的页号,合并为一个。
分配给程序的内存块数取值范围为1 块,2 块,直到程序的页面数。
6、 分别采用OPT、FIFO 和LRU算法对页号序列进行调度,计算出对应的缺页中断率。
打印出页面大小、分配给程序的内存块数、算法名、对应的缺页中断率。
操作系统页面置换算法通过c++实现
-Simulation operating system uses OPT, FIFO and LRU page replacement algorithm process. Let the program addresses the range of 0 to 32767, using a random number generator 256 instruction address, the address is to meet 50 of the order, a 25 jump forward, jump back 25 . To meet the above conditions, you can take the following methods: Let d0 10000, n-th instruction address is dn, the first n+1 instruction address dn+1, n the range of 0-255. 1-1024 each generate a random number within a range, if a falls within the range of 1-512, the dn+1 dn+1. If a falls within the range of 513-768, set dn+1 within the range of 1 to dn a random number. If a falls within the range of 769-1024, is set to dn dn+1 to a random number within the range of 32767. Page size in the range of 1K, 2K, 4K, 8K, 16K. Follow the page size of the instruction address into the page number. For the same adjacent page numbers, into one. Memory blocks allocated to the program in the range of 1, 2, until the page number
(系统自动生成,下载前可以参看下载内容)
下载文件列表
椤甸潰缃