看板 Grad-ProbAsk 關於我們 聯絡資訊
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