Virtual space seen by each new process in User space
In a 32-bit system, max memory addressable is 4GB.
Now Linux kernel does memory mapping division of 1GB for kernel address space and 3GB for user address space. That means 4GB of virtual address space is divided between kernel (1GB) and user (3GB).
Q1. All virtual mapping utilizes the available physical RAM without any division? I mean to say that if RAM is 512MB then a page in kernel space can lie any where RAM (leave aside old PCI dma accesses)? (How this fits to fact that kernel memory is non-pageble)
Q2. If a process is created in user space, it has visibility 4GB address space or 3GB address space?
If 4GB virtual space is split in to 1GB for kernel space and 3GB user space virtual memory then -
a) each processes created in user space sees only 3GB virtual memory
b) all kernel sees same 1GB virtual memory
1. Actual physical pages corresponding to any (kernel or user) virtual memory may lie anywhere in the RAM. I am not sure but according to my knowledge a small portion of RAM is marked/kept non-pageable for critical mappings e.g. the page-tables. rest are pageable. Actual fact is any non-pageable allocation can be requested (using kmalloc()).
2. Each process created in user space have visibility of 3GB virtual memory space. Note this is contrary to fact that whole of kernel i.e. all modules and tasks in kernel space sees same 1GB virtual memory area.
Please correct me if I am wrong.
Have a read of this
|All times are GMT -5. The time now is 10:13 PM.|