系統管理
1752786 會員
5896 線上
108789 解決方案
發表新文章

Memory limitations of the 32-bit architectures

 
watermelonyu
教授

Memory limitations of the 32-bit architectures

Hi,

32-bit architectures 一個 process 可 address 到 4GB(2^31) 的 memory space,但一般來說,會有一些 space 保留給 OS Kernel 故一個 process 可 address 到的 space 實際上會少於 4GB.



我的問題是,如果我的系統是 32-bit architecture 且 memory 已經是 4GB,在這種情況下我再多買 memory 安裝在該系統上也是多餘的嗎?



Thks & Best Regards,
6則回覆 6
watermelonyu
教授

Memory limitations of the 32-bit architectures

Hi 蘇兄 :



不是的,多買 memory 安裝在系統上不是多餘的.



32 bit architecture 所說的 4GB 是virtual address

space, 硬體的memory是physical memory, 它的大小和

virtual address space 無關. Physical memory 不足,

system 會開始 pagging (swaping), 系統效能會變壞.



virtual address space = space_id+offset

offset 的大小為4GB,分為4個quadrant, 用於

TEXT,DATA,SHARE Memory Lib and IO.



kernel 的 space_id 為 0

user process 的 space_id 為random.

kernel 與user process 各有其獨立的 virtual

address space, 大小均為4GB,不互相充突, 但是有共用

的部分,如 Shared memory, shared library , I/O 等.



virtual address space 被切成一小塊一小塊的 page,

每一page 的大小為4K, 其被映成至physical memory.

當系統memory 不足時則映成至swap space 稱為page out.

此部分為kernel 的 virtual memory mamanegemnt 的

工作, 一般稱為 VM.



Just my $0.01, for your reference.

..

.





watermelonyu
教授

Memory limitations of the 32-bit architectures

Dear Yoda,



哇!您解釋的好清楚喔,謝謝您.

不過在這還有一問題請教:

Microsoft Windows Systsem 呢?我有一 Windows 2000 server 且 Physical Memory 為 8GB,若我不在 boot.ini 加上 /PAE parameter 的話則在 "控制台"-->”系統" 中只能看見 4GB,換句話說,另4GB

有浪費嗎?



Thks & Best Regards,
watermelonyu
教授

Memory limitations of the 32-bit architectures

Hi :

Not quite sure the memory management

implementation of Win32 systems.

Will get back to you after some more

research. :-)

..

.

watermelonyu
教授

Memory limitations of the 32-bit architectures

Dear Yoda,



OK.

Thanks for your help.
watermelonyu
教授

Memory limitations of the 32-bit architectures

首先讓我們來了解/PAE是什麼意思.



/PAE 指的是要讓 NTLDR 載入能支援超過 4GB physical memory 的 kernel ntkrnlpa.exe, 而非 default 的

ntoskrnl.exe. ntoskrnl.exe 不能支援超過4GB physical memory.



這就是為什麼不在 boot.ini 加上 /PAE 的話

在 "控制台"-->”系統" 中只能看見 4GB 的原因了.



原文引述自:

http://www.sysinternals.com/ntw2k/info/bootini.shtml



/PAE

This has NTLDR load ntkrnlpa.exe, which is the

version of the x86 kernel that is able to take

advantage of Intel Physical Address Extensions

(PAE), even when a system doesn't have more

than 4GB of physical memory.



PAE permits an x86 sytem to have up to 64GB of

physical memory, but an operating system must be

specially coded to use memory beyond 4GB

(the standard x86 limit).



The PAE-version of the Win2K kernel presents

64-bit physical addresses to device drivers,

so this switch is helpful for testing device

driver support for large memory systems.



watermelonyu
教授

Memory limitations of the 32-bit architectures

再探 WIN32 的 Virtual memory.



Win32 kernel 的 address space 為 4GB,

但 user process 只有 2GB. 每一 user process

的 address space 互相獨立.



BOOT.INI 有一個 option /3GB 可以讓 user process

的 virtual address space 擴展到 3GB.

同樣的 WIN32 也是 4KB page, 映成至 physical memory

或 paging file (swap out).



原文引述自:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dngenlib/html/msdn_virtmm.asp



..

.