资源描述:
《nachos实验11设计并实现用户空间的虚拟内存管理-下实验报告》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、调试记录为了避免冇刷页数嫌疑,仅提供两个比较短的测试示例,分别是sort.noffC将数组改小了一些)和exec.noff,后者会再调用一个halt.noff的进程。打印过程因为world文档格式的tab是4个空格所以打印出的结果粘贴过來没有对齐,关键部分用红色加粗标出,其他的一略而过。测试示例一:分配给每个用户进程的MainMemory页大小为6.LiZhen@ubuntu:^/nachos-3.4/code/lab11$./nachos-x../test/sort.noffnumPagesis15numPages
2、=6+0+1+8Initializingcodesegment,atvAddr0,infAddr40,size688pagetabledump:15pagesintotalvPage,mPage,inFile,valid,use,dirtytype0,0,40,1,0,001,1,168,1,0,002,2,296,1,0,003,3,424,1,0,004,4,552,1,0,005,5,680,1,0,006,-1,-1,0.0,027,-1,-1,0,0,038,0,039,-1,-1,0,0,0310,-1,
3、-1,0,0,0311,-1,-1,0,0,0312,-1,-1,0,0,0313,-1,-1,0,0,0314,-1,-1,0,0,03badVAddris1900swapvmpage0:0==>14pagetabledump:15pagesintotal0,-1,40,0,1,001,1,168,1,1,002,2,296,1,0,003,3,424,1,0,004,4,552,1,0,001,5,680,1,0,002,-1,-1,0,0,023,-1,-1,0,0,034,0,035,-1,-1,0,0,03
4、6,-1,-1,0,0,037,-1,-1,0,0,038,-1,-1,0,0,039,-1,-1,0,0,0310,0,-1,1,1,03PCReg=208,NextPCReg=212badVAddris688swapvmpage1:1==>6pagetabledump:15pagesintotalvPage,mPage,inFile,valid,use,dirtytype0,-1,40,0,1,001,-1,16&0,1,002,2,296,1,1,003,3,424,1,0,004,4,552,1,0,005,
5、5,680,1,0,006,1,027,-1,-1,0,0,038,0,039,-1,-1,0,0,0310,-1,-1,0,0,0311,-1,-1,0,0,0312,-1,-1,0,0,0313,-1,-1,0,0,0314,0,-1,1,1,13PCReg=296,NextPCReg=300badVAddris232swapvmpage2:2==>1copyfromsourcefilepageTable[newPage]・inFileAddr:168=====>mainMemorty[256]pagetable
6、dump:15pagesintotalvPage,mPage,inFile,valid,use,dirtytype0,-1,40,0,1,001,2,168,1,1,002,-1,296,0,1,003,3,424,1,0,004,4,552,1,0,005,5,680,1,0,006,1,-1,1,1,127,-1,-1,0,0,038,0,039,-1,-1,0,0,0310,-1,-1,0,0,0311,-1,-1,0,0,0312,-1,-1,0,0,0313,-1,-1,0,0,0314,0,-1,1,1,
7、13PCReg=22&NextPCReg=232badVAddris260swapvmpage3:3==>2copyfromsourcefilepageTable[newPage]」nFileAddr:296=====>mainMemorty[384]pagetabledump:15pagesintotalvPage,mPage,inFile,valid,use,dirtytype0,-1,40,0,1,001,2,162,3,296,1,1,003,-1,424,0,0,004,4,552,1,0,005,5,68
8、0,1,0,006,1,-1,1,1,127,-1,-1,0,0,038,-1,-1,0,0,039,-1,-1,0,0,0310,-1,-1,0,0,0311,-1,-1,0,0,0312,-1,-1,0,0,0313,-1,-1,0,0,032,0,-1,1,1,13PCReg=256,NextPCReg=260badVAddris384s