Re: basic questions of memory management

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

 





Joseph A Knapka wrote:

> Hong Hsu wrote:
> >     Rik,
>
> Rik's a busy guy; I'll try to answer your questions :-)
>
> >     I have basic questions regarding virtual address space and memory
> > management, wondering you can give a help.
> >
> > 1.   When userland process is created, how big the size of virtual
> > address space the kernel assign to it,  4GB or it depends on size of the
> > executable code?  If 4GB is used, why is that because 3GB of it will be
> > used excessively for the process and it is huge for most of programs.
>
> All user processes running on x86 with a stock kernel
> can use up to 3GB of virtual space. Of course, no physical
> RAM is allocated for a given virtual page unless the process
> actually tries to access it. When a userland process is
> created, the first page of the executable is read in and
> mapped, and a kernel data structure, the "vm_area", is
> set up for the executable code virtual memory area. The
> vm_area struct simply tells the kernel how to handle
> page faults in the executable's code space, by paging
> data in from the executable file on disk. The amount of
> virtual space managed using that initial vm_area
> corresponds to the size of the executable, but again,
> no physical RAM is mapped into the process page tables
> until the process actually tries to access it. When that
> happens, an arbitrary unused physical RAM page is
> selected, the proper page contents are read from disk,
> and the page is mapped into the process page tables.
>
> > 5. In your 'Memory Management Talk', you mentioned the main memory is
> > very slow.  As speed of Intel processor grows rapidly, speed difference
> > between cpu and main memory is getting big and bigger.  How the issue
> > could be solved in future?  Does RAM reached its limitation of speed
> > theoretically or L2 cache reached its limitation in terms of cost and
> > size?
>
> Make all RAM as fast as the CPU. How hard could it be? :-)
>
> HTH,
>
> -- Joe

    Joe,

    I really appreciate your response.  Thanks,
    -Hong


-
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
IRC Channel:   irc.openprojects.net / #kernelnewbies
Web Page:      http://www.kernelnewbies.org/


[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