Re: Ideal Swap Partition Size

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

 



On Sat, Jan 24, 2009 at 09:03:28AM -0600, Aaron Konstam wrote:
> On Fri, 2009-01-23 at 15:42 -0800, Gordon Messmer wrote:
> > Aaron Konstam wrote:
> > > 
> > > This is explained in nearly all textbooks on Computer Architecture. So
> > > the question remains, where is the address space in Linux.
> > 
> > Patrick isn't the only one confused by your question.  I can't make 
> > heads or tails of it.  Are you asking where the mapping between the 
> > virtual address space and physical memory is done, or what?
> > 
> No I am asking where the virtual address space resides of the machine.

Research TLB, here is a link to start with:

   http://en.wikipedia.org/wiki/Translation_lookaside_buffer

With a TLB and clever kernel software a process has the luxury of living
in a virtual address space and not having to relocate itself to run.

This implies that the virtual address spaces (plural) reside in data
structures (tables) managed by the kernel (the answer to your question).
A process is activated with some TLB entries setup to map the process
address space to some real memory.   Any time the process reads or writes
outside of valid TLB entries a page fault handler is called in the kernel
and if the access is allowed/ valid then a real resource is allocated
and mapped as valid for the process and the instruction restarted.

The TLB and the ability to restart an instruction after a page fault
is central to building a demand paged virtual memory system.   Implied
in this is user mode and kernel mode state in the processor.

Most TLB hardware has less entries than a valid process may need
over its life.  However they can be reloaded (on demand) as the program counter
and data pointers change.

Most of the x86 and x86_64 processor documentation is difficult to understand
on this point.   If you can find a copy of a MIPS or perhaps M68020 processor
manual to read.   As a point of history the M68010 had no TLB/MMU but could
restart instructions.   With an external TLB virtual memory systems could
be built on the ability to restart instructions.

A TLB also has the side effect of letting the kernel isolate my process
from your process permitting multi user multitask systems.  


-- 
	Regards,
	T o m   M i t c h e l l

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux