Ex1
所以一開始為什么要comment掉啊,我忘記comment out回來了
eflag設(shè)置為FL MASK即可
Ex2
第一題
依次round,map,read
注意read的大小是block/sector
第二題
根據(jù)注釋寫幾個(gè)判斷即可
注意重新置位的代碼可見第一題后面的給的(
Ex3
遍歷bitmap
異或一下把找到的空block置上
flush
Ex4
file_block_walk通過一個(gè)在文件內(nèi)的偏移,映射結(jié)構(gòu)體所直接指向的塊或者間接指向的塊。
file_get_block更及進(jìn)一步地映射實(shí)際的磁盤塊,如果有必要的話分配一個(gè)新磁盤塊。
Ex8
We will establish the convention that if a page table entry has this bit set, the PTE should be copied directly from parent to child in both fork and spawn. Note that this is different from marking it copy-on-write: as described in the first paragraph, we want to make sure to share updates to the page.