2012-04-10
Virtual Memory
- 有 code 有真相
- Page Table entry (PTE)
Page Table Width: 10 bit + 10 bit + 12 bit
- 10 bit 使用較少量的記憶體
修改過的 QEMU 提供 "info pg" monitor 指令,可交叉觀察 CR3 設定前後的 page 變化,檢驗首個與末個 page
Challenge! Extend the JOS kernel monitor with commands -> 開發 in-kernel debugger
"follow the bouncing kernel" on stackoverflow
- method 1 - swap in/out to other storage
boot_alloc
TDD (Test-Driven Development) in JOS
assert() supported in patched QEMU
Hawx
page_alloc() -- the page reference count pp_ref
page_insert()
pp_ref (reference count)
=> hawx's version
page_table 3
- page 1 1
- page 2 1
- page 3 1
page_table 4
- page 1 1
- page 2 1
- page 3 1
=> MIT JOS
page_table 1
- page 1 x
- page 2 x
- page 3 x
How to start to write labs?
- check homework next lecture
- reference the check code for grade calculation
PDOS paper
The exokernel approach to extensibility (panel statement)
Related: http://hypervisor.org/
Ben
Question: 目前兩週舉行一次會不會太頻繁?
- Ans: 比較難的lab分成兩次。
memory verifier -- magic 1 + [mem] + magic 2
- kernel built-in
- gcc library - LD_PRELOAD=./mem_verifier_library.so (replace malloc , dealloc, free ..)
- a tool: valgrind
- Android 4.0 內建 valgrind: external/valgrind
main/VEX/ => 模擬 host ISA 的行為來作 memory debugging
libvex -> library for dynamic binary instrumentation
Related paper: Bounds Checking with Taint-Based Analysis
http://cseweb.ucsd.edu/~wchuang/HiPEAC-07-TaintBounds.pdf
Jserv
- OSDC.tw 2012 介紹 ARM virtualization -- http://osdc.tw/schedule
- Rework Plan 9's protocol to fit the requirements of new products.
- Linux community: http://www.svlug.org/