Click here to Skip to main content
15,886,137 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am very much confused of the linux memory map of a process and its internals. In general what is mentioned in books or articles is that in linux (4gb -address space),
3gb address spaces is mapped to userspace for a process and 1gb is mapped to kernelspace of a process.

Since virtual memory support is there in linux, each process will have a separate 4gb virtual address space.And through paging the virtual to physical address conversion takes place for a memory access and userspace pages are swappable so no problem here.

what happens for the kernel address space, how the above said things works, when a process enter the kernel space through system calls. My understanding is that kernel pages are non-swappable, so how things work here when different process enters the kernel space. Say i have 10 process running in my system , when one process executes a system call , how the kernel switches to the corresponding process's kernel address space(since kernel memory is not going to change-correct me if i am wrong) and how it return back to user space.

If drivers also running in kernel space and how particular driver code is mapped to particular kernel address space(with in 1gb) and what happens if there is page fault in kernel space.

Please provide any article on links on this particular topic.
Posted

1 solution

There is only one kernel address space that's mapped into the top parts of the virtual address spaces of all processes. There's simply no such thing as "corresponding process's kernel address space" or "particular kernel address space".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900