i386_init identifies the file system environment by passing the type ENV_TYPE_FS to your environment creation function, env_create. Modify env_create in env.c, so that it gives the file system environment I/O privilege, but never gives that privilege to any other environment
Do you have to do anything else to ensure that this I/O privilege setting is saved and restored properly when you subsequently switch from one environment to another? Why?
Implement the bc_pgfault and flush_block functions in fs/bc.c. bc_pgfault is a page fault handler, just like the one your wrote in the previous lab for copy-on-write fork, except that its job is to load pages in from the disk in response to a page fault. When writing this, keep in mind that (1) addr may not be aligned to a block boundary and (2) ide_read operates in sectors, not blocks.
lab4终于完成了。lab4是到目前为止，比较复杂而且代码最多的lab。总共需要完成三个部分。part A添加多核支持，实现RR调度。part B实现Copy-On-Write fork。part C 实现时钟中断以及支持基本的IPC。
Implement mmio_map_region in kern/pmap.c. To see how this is used, look at the beginning of lapic_init in kern/lapic.c. You’ll have to do the next exercise, too, before the tests for mmio_map_region will run.
Modify mem_init() in kern/pmap.c to allocate and map the envs array. This array consists of exactly NENV instances of the Env structure allocated much like how you allocated the pages array. Also like the pages array, the memory backing envs should also be mapped user read-only at UENVS (defined in inc/memlayout.h) so user processes can read from this array.
动态规划很早就接触过了，但一直都心存疑惑。网上的一些文章，基本都是满篇术语。状态转移， 状态方程，这种名词，其实是让初学者比较迷惑。直到我上完Berkeley的CS 61 A, 突然就理解了所谓的动态规划。或者说是真正的理解了递归。把玩函数式语言对理解递归，或者说程序结构，非常有帮助。SICP 这本书已经很多人推荐了，用Scheme讲的，我没看完，看了大概前面两章。我比较推荐的是华盛顿大学的Programming Languages 还有上面Berkeley那门课。