[理工] [ OS ] 98 中山資工

看板Grad-ProbAsk作者 (Karma Police)時間16年前 (2010/03/25 10:20), 編輯推噓3(302)
留言5則, 4人參與, 最新討論串1/1
4.Assume a page reference string for a process with m frames,the page reference string has length p with n distinct page numbers occurring in it. for any page –replacement algorithm (a) what is lower bound on the number of page faults? (b) what is upper bound on the number of page faults? 我自己寫的答案是 (a)1, 從頭到尾只reference同一個page (b)p, 全部都page fault 而看到手邊的答案是 (a)n, 都只有load進來的那次 (b)p, 全部都page fault 請問我這樣想是有問題嗎? 請指教 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 123.204.2.14

03/25 10:23, , 1F
n distinct page 不是同一page
03/25 10:23, 1F

03/25 10:25, , 2F
n 個相異 page 至少都須載入至 page frame
03/25 10:25, 2F

03/25 10:25, , 3F
題目意思是說reference p次,其中包含了n個不同的page
03/25 10:25, 3F

03/25 10:41, , 4F
懂了 原來是題目沒搞懂...
03/25 10:41, 4F

03/25 11:21, , 5F
a是因為他有n個"distinct"page number 所以至少n個
03/25 11:21, 5F
文章代碼(AID): #1BgiXkfM (Grad-ProbAsk)