看板 Grad-ProbAsk 關於我們 聯絡資訊
Which of the following programming techniques and structures are "good " for a demand-paged environment ? Which are "not good"? 1)stack 2)Hashed symbol table 3)Sequential search 4)Binary Search 5)Pure code 6)Vector operations 7)Indirection --------------------------- ans : good->1 . 3 . 5 . 6 not good->2 . 4 . 7 為什麼? 看不太懂題意 以及答案為何是這樣? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.46.126.89
maiden017:符合locality model的就是good 12/18 22:25
maiden017:就是在存取menory的時候有集中存取的性質 12/18 22:27
maiden017:*memory 12/18 22:28
SiriusCloud:所以是看locality? 看空間的還是時間的?為什麼要根據 12/18 22:44
SiriusCloud:locality 去評量? 12/18 22:44
maiden017:locality 又能分成空間和時間 所以符合這2種的都是 12/18 22:48
maiden017:當你的程式存取的區塊集中 只會需要此區塊的頁面 發生 12/18 22:55
SiriusCloud:所以說看 locality 是為了 hit 嗎? 12/18 22:55
maiden017:page fault的次數會比較少 12/18 22:56
SiriusCloud:那我可以在問6 .7 的原因嗎? 12/18 22:58
maiden017:6.就是sequential access 12/18 23:06
maiden017:7.原因我是理解成可能會發生branch 或是jump 12/18 23:07
maiden017:不過這邊我都是用背的...所以沒有想太多<(_ _)> 12/18 23:08
feabries:第7個我想成 類似A[B[100]]這種存取memory data方法 12/19 00:48
SiriusCloud:OK 感謝!! 12/19 21:52
sneak: locality 又能 https://daxiv.com 09/11 14:40