[理工] 計組問題請問

看板Grad-ProbAsk作者 (籃球狂)時間16年前 (2009/04/17 21:00), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
A page-replacement algo. minimizes the number of page faults by distributing heavily used pages evenly over all of memory. It associates with each page frame a counter of the number of pages that are associated with that frame, and the initial value of the coounters is 0. Then, to replace a page, it searches for the page frame with the smallest counter. The counters are increased whenver a new page is associated with that frame; and are decreased whenever one of the pages associated with that frame is no longer required. a) How many page faults occur for the algo. for the following reference string, for four page frames? 1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2. 這題在說什麼啊? 不太懂意思?? 可以順便解個我看嗎? 解前幾個大概告訴我做法就好了 謝謝!! b) what's the minimum number of page faults for an optimal page replacement strategy for the reference string in part (a) with four page frames? 這題是用最佳策略法嗎? 我算出來11次 不知道跟大家算的一不一樣耶?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 118.170.95.41
文章代碼(AID): #19w7rKiA (Grad-ProbAsk)
文章代碼(AID): #19w7rKiA (Grad-ProbAsk)