70 likes | 148 Views
Process_Memory_Allocation. Yuan Lin 20130128. Step 1: Generate PE File (After Compile & Link ). Header. Section Table. Section .text. Section .data. Section . bss. ……. PE File Format. Step 2 : Execute PE File. 1GB. Kernel Space. Parameter & Environ. Stack. ……. Linear Space
E N D
Process_Memory_Allocation Yuan Lin 20130128
Step 1: Generate PE File (After Compile & Link ) Header Section Table Section .text Section .data Section .bss …… PE File Format
Step 2: Execute PE File 1GB Kernel Space Parameter & Environ Stack …… Linear Space Totally 4GB 3GB Heap Segment bss Segment data Segment text Process memory allocation Q&A: what kind address in application? (Linear address)
Step 2: Execute PE File 0GB 3GB 4GB Linear Space Totally 4GB Process User Space Kernel Space 0GB 1GB 4GB Kernel Q&A: How two spaces communicate? (systemcall, ioctl, sysfs, proc, etc…)
Step 3: Address Transition Logical Address Program Segmentation Kernel (MMU) Linear Address Paging Hardware Physical Address
Step 3: Address Transition Q&A: Segmentation functionalities? (share, multiple virtual spaces) Q&A: If total of multiple virtual spaces larger than 4GB, how to allocate linear space? Q&A: How to explain logical address equals to linear address when have no segmentation? Q&A: Paging functionalities? (Prevent fragmentized, increase utilization efficiency)
Appendix: MMU: buddy system, slab, high memory Kernel: interruption, system call, virtual file system