[理工] [OS] page fault

看板Grad-ProbAsk作者 (無法顯示)時間14年前 (2011/06/16 17:51), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/4 (看更多)
consider the two-dimensional array A; int A[100][200]; where A[0][0] is stored at location 200, in a paged memory system with pages of size 200 a small process resides in page 0 (locations 0 to 199) for manipulating the A matrix; thus, every instruction fetch will be from page 0 for four page frames, how many page faults are generated by the following array-initialization loops, using FIFO replacement, and assuming page frame 0 has process in it, and the other three are initially empty (1) for (j=0; j<50; j++) for(i=0; i<100; i++) A[j][i]=0; (2) for (j=0; j<50; j++) for(i=0; i<100; i++) A[i][j*4]=0; (3) for (j=0; j<50; j++) for(i=0; i<100; i++) A[j*2][i*2]=0; 請問這題該怎麼算呢? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.166.118.217
文章代碼(AID): #1D-T8LR- (Grad-ProbAsk)
文章代碼(AID): #1D-T8LR- (Grad-ProbAsk)