OS lab5

Ex1
所以一开始为什么要comment掉啊,我忘记comment out回来了
eflag设置为FL MASK即可

Ex2
第一题
依次round,map,read
注意read的大小是block/sector
第二题
根据注释写几个判断即可
注意重新置位的代码可见第一题后面的给的(

Ex3
遍历bitmap
异或一下把找到的空block置上
flush

Ex4
file_block_walk通过一个在文件内的偏移,映射结构体所直接指向的块或者间接指向的块。
file_get_block更及进一步地映射实际的磁盘块,如果有必要的话分配一个新磁盘块。

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.

你可能感兴趣的:(OS lab5)