Tuesday, November 1, 2011

Process Address Space

1. Each process has a process descriptor, and the location is in Kernel Space (3G-4G)
e.g. virtual address: 0xF44F7930, physical address: 0x344F7930

2. Each process has a memory descriptor, and the location is in Kernel Space (3G-4G)
e.g. virtual address: 0xF6CEA900, physical address: 0x36CEA900

3. Each process has a CR3 value and page directory and page table are in Kernel Space (3G-4G). And the value in CR3 register is a physical address. and value in pgd field of mm_struct is a virtual address. And pgd = CR3 + PAGE_OFFSET
e.g. CR3: 0x36D1C000, pgd:0xF6D1C000

4. Static code of process is in User Space (0G- 3G). The physical address of static is non-continuous, and it is allocated by page (4K).
e.g. virtual address: 0x8048000 - 0x8048DBC

5. Different process could have same linear address space.
e.g. static code of Firefox: 0x8048000 - 0x806D333; static code of Minicom: 0x8048000 - 0x805E333

No comments: