Re: Memory model

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

 



On Saturday 17 January 2004 17:54, Rik van Riel wrote:
> On Fri, 16 Jan 2004, Daniel Drake wrote:
> > Vova wrote:
> > > Hello All !
> > > In fact, Linux use paging memory model, but segment model has some
> > > advantages such as no need to relocation. Why Linux prefare paging
> > > model ? Is it only compitability issue ?
> >
> > According to a book of mine (Understanding the linux kernel), linux
> > prefers paging because:
> > - Memory management is simpler
> > - Some architectures have limited or no support for segmentation (e.g.
> > RISC)
>
> Also:
> - programs may want segments that are larger than what fits
>   into physical memory
OK, but we can use segmentation to separate address space, and use paging to 
implement virtual memory. This will give better control about privileges, for 
example we can implement non-executable stack, wich will break many buffer 
overflow attacks. And we can avoid long relocation process wich slow down 
program startup. For C++ program this is very actual.

> - modern CPUs run very slowly when segmentation is enabled
>   (or rather, the segmentation logic is bypassed when all
>   the segments span the magical full 4GB)
This is a good reason, I didn't hear it before.

>
> Rik

                            Best regards,
                                     Vova.


--
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