看板 Grad-ProbAsk 關於我們 聯絡資訊
請教各位大大 For memory allocation algorithms, the "best fit" is always better than "worst fit", yes or no? 解答寫no 可是我個人覺得應該是yes,因為best fit內部碎裂很少,雖然會造成許多外部碎裂, 但都小小的。 而worst fit卻會造成許多大的內部碎裂,所以我想best fit 好像在任何情況都優於 worst fit吧 請各位大大指教一下,並舉個反例,謝謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.116.208.80
christianSK:mem allocation目前不存在opt best-fit也未必永遠 01/22 17:03
christianSK:好過 first-fit 01/22 17:03
privatewind:best fit在soft real time system 就比較不好了 01/22 17:13
privatewind:糟! 上面我舉錯例子, 你想成有一個process 需要變更 01/22 17:18
privatewind:其size好了... 01/22 17:18
privatewind:另外我覺得best fit, worst fit對於internal fragment 01/22 17:19
privatewind:其副作用是一樣的吧 要比的話 應該只用external比就好 01/22 17:20
privatewind:因為worst fit給行程跟best fit配的記憶體大小是一樣 01/22 17:22
doggingg:謝謝,我懂了 01/22 17:36
master1x4:用一樓的觀念回答就ok了~ 01/22 23:26
sneak: 謝謝,我懂了 https://daxiv.com 09/11 14:10