Re: address spaces in kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 9/1/05, Fawad Lateef <fawadlateef@xxxxxxxxx> wrote:
On 9/1/05, Thayumanavar Sachithanantham <thayumker@xxxxxxxxx> wrote:
> When the terms "user space" and "kernel space" are used, do they refer to
> the physical memory of the machine (RAM, actually present) or to the virtual
> memory (4 GB on 32-bit machines, just virtual) ?
>
>    The term kernel spacerefer to set of addresses that  contain's kernel
> code+kernel related structures. In most OS such as linux,the kernel space
> can't be swapped or paged out.
> The user space refers to an area of the memory used by user mode
> applications. Depending on
> context , this space of addresses could either mean physical or virtual.
>

AFAIK user space and kernel space always refer to the virtual
addresses, and in return these virtual addresses points to the
physical addresses through page tables ..... And User Space and Kernel
Space Addresses (Virtual) are different b/c they must not be able to
interact directly or by mistake and this is due to the proctection
level of the processor and system ......
 
 
********* if  i see /proc/iomem , i can see something like this. ...
 
  00100000-002720eb : Kernel code
  002720ec-00383ba3 : Kernel data
3fff0000-3fffebff : ACPI Tables
 
What memory is it refering to,  physical/virtual ?
 
 
 

> > I have read somewhere, that kernel threads always have "mm" member of
> >their task_struct pointing to "NULL" ( task.mm->NULL). Is that correct?
>
> The task.mm is NULL because a kernel thread never accesses the user space
> portion.
>

And also in kernel the address space is same so no need to make
different mm for each thread in kernel (this reduces context switching
too (CMIIW) ) .........


--
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux