It appears you have not yet registered with our community. To register please click here...

 
Go Back [M] > Madshrimps > WebNews
How AMD's Pacifica handles memory How AMD's Pacifica handles memory
FAQ Members List Calendar Search Today's Posts Mark Forums Read


How AMD's Pacifica handles memory
Reply
 
Thread Tools
Old 8th June 2005, 05:42   #1
Member
 
Sidney's Avatar
 
Join Date: Mar 2004
Posts: 15,738
Sidney Freshly Registered
Default How AMD's Pacifica handles memory

* YOU CAN FIND the first part of this article on AMD Pacifica, here. Part Three will be published tomorrow.
FIRST A LITTLE primer on memory management on x86 hardware, vastly simplified for sanity and brevity. In the good old days, you could only run a single program on a computer at once, and life was easy. Soon someone had the bright idea of running multiple programs on the same machine at the same time, which led to all sorts of problems. If you had a program that needed 1MB of memory, and you had 1MB of memory, all went smoothly. If you had 2MB of memory, you used 1MB, and the other 1MB just sat there.

Now, if you have 2MB of memory, and you run two programs that each need 1MB of memory, you should be OK, right? Well, theory and reality often don't mix well and in this case, they tended not to mix well at first. If a program thinks it is alone in the world, and allocates memory starting at 0 and running to 1MB, that is just fine. When the second program starts up and tries to allocate memory at 0 to 1MB, bad things happen.

This was soon fixed by giving a program enough awareness to allocate space where others were not rather than over the top of their neighbors. This worked well enough to prevent immediate crashes, but if a program had a bug, or it tried to write to an address owned by the other guy, much crashing ensued. It was a volatile mess.

Along came the answer - the Memory Management Unit (MMU). What this did is allowed the programs to request whatever memory they needed, and then translated that into whatever was actually available. Whenever the program requested memory, the MMU simply translated the request to where it put the needed pages earlier.

Using the earlier example, the MMU would take the first program and give it 0 to 1MB. When the second program requested the same 1MB starting at 0, the MMU would give it 1MB to 2MB, and in effect lie to the second app so it thought it was getting 0 to 1MB. The MMU not only translated the requests on the fly, but also kept each program in its own sandbox. You were stuck in your own space, and could not go into the other program's area even if you wanted to.

There is a register in x86 called CR3, and again vastly simplifying, it keeps tabs on what real memory address a program goes to when it is being redirected. If a program asks for an address starting at 1MB, and the MMU redirects it to start at 4MB, CR3 contains the address that the information resides, in this case, it would be 4MB. This is the job of the OS running in ring 0, ring 3 programs should not see or modify this.

The new modes add on to this, and of the two, Shadow Page Tables (SPT) does less in hardware, and requires more software intervention from a VMM. The page tables are not really virtualised in hardware, they are kept up by the VMM in software, and there is only one set of them. The host has complete control over CR3, and the guest is locked out.

The VMM does this by setting all of the guest's page tables to read only, and intercepts all calls to CR3. If a guest OS wants to write to CR3, the VMM is called, and it figures out what the guest should be seeing, and does it for the guest. Instead of a doing a single call, there is a VM_Exit, lots of calls, and lots of calculations. In case it is not all that obvious, this is not the fastest solution in the world.

What it does however is provide the guest OS with its own little world. The guest can do everything it needs to, and the illusion that it is running all by itself is maintained. It does require a lot of programming and a lot of overhead to accomplish.

http://www.theinquirer.net/?article=23772

I've read it three times and I thought I understand what/how it works..... I'm sure by tomorrow morning all is out the window.
__________________
lazyman

Opteron 165 (2) @2.85 1.42 vcore AMD Stock HSF + Chill Vent II
Sidney is offline   Reply With Quote
Old 8th June 2005, 20:28   #2
GIBSON
 
Posts: n/a
Default

i don't really understand why you needed to read it 3 times, i'm not really familiar with all those things, but it made sense to me, without reading it multiple times
  Reply With Quote
Old 8th June 2005, 23:59   #3
Member
 
Sidney's Avatar
 
Join Date: Mar 2004
Posts: 15,738
Sidney Freshly Registered
Default

You're smarter than I, simple
__________________
lazyman

Opteron 165 (2) @2.85 1.42 vcore AMD Stock HSF + Chill Vent II
Sidney is offline   Reply With Quote
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Corsair® Launches Advanced Cooling Options for Dominator™ and Dominator GT Memory jmke WebNews 0 14th May 2009 09:48
Patriot Memory Releases Tri-Channel Signature Series Memory Kits jmke WebNews 0 19th February 2009 17:47
AMD's Phenom II for Socket AM3 suffers from a memory bug? jmke WebNews 1 13th February 2009 19:12
Patriot Memory Releases 16GB microSDHC Flash Memory Card jmke WebNews 0 13th February 2009 14:15
Corsair Memory powers “World’s Fastest PC” jmke WebNews 0 21st November 2008 10:03
Patriot Releases New Viper Series Gaming Memory with EPP2.0 jmke WebNews 0 18th June 2008 17:20
Kingston Technology Rolls Out DDR3 Memory jmke WebNews 2 12th June 2007 08:24
Corsair releases CL3 DDR2 Memory at PC6400 Speeds jmke WebNews 0 23rd May 2006 14:08
Corsair Unveils new PC2-8500 and PC-4400 memory at Cebit 2006 jmke WebNews 0 6th March 2006 15:49

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +1. The time now is 14:06.


Powered by vBulletin® - Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO