x86-64 시스템에 48 비트 가상 주소 공간 만있는 이유는 무엇입니까?
책에서 나는 다음을 읽었습니다.
32 비트 프로세서에는 2 ^ 32 개의 가능한 주소가있는 반면 현재 64 비트 프로세서에는 48 비트 주소 공간이 있습니다.
내 예상은 64 비트 프로세서라면 주소 공간도 2 ^ 64 여야한다는 것입니다.
그래서이 제한의 이유가 무엇인지 궁금합니다.
그게 필요한 전부이기 때문입니다. 48 비트는 256 테라 바이트의 주소 공간을 제공합니다. 그것은 많은 것입니다. 곧 그 이상이 필요한 시스템을 보지 못할 것입니다.
그래서 CPU 제조업체는 지름길을 택했습니다. 전체 64 비트 주소 공간을 허용하는 명령어 세트를 사용하지만 현재 CPU는 하위 48 비트 만 사용합니다. 대안은 수년 동안 필요하지 않았던 더 큰 주소 공간을 처리하는 데 트랜지스터를 낭비하는 것이 었습니다.
따라서 48 비트 제한에 가까워지면 전체 주소 공간을 처리하는 CPU를 해제하는 문제 일 뿐이지 만 명령 집합을 변경할 필요가 없으며 호환성이 깨지지 않습니다.
OP의 질문은 물리적 주소 공간이 아닌 가상 주소 공간 에 관한 것이기 때문에 버스 크기와 물리적 메모리에 대한 대답은 약간 잘못되었습니다 . 예를 들어, 일부 386에 대한 유사한 제한은 항상 전체 32 비트 인 가상 주소 공간이 아니라 사용할 수있는 물리적 메모리의 제한이었습니다. 원칙적으로 몇 MB의 실제 메모리만으로도 전체 64 비트의 가상 주소 공간을 사용할 수 있습니다. 물론 스와핑을 통해 또는 대부분의 주소에서 동일한 페이지를 매핑하려는 특수 작업 (예 : 특정 희소 데이터 작업)을 수행 할 수 있습니다.
진짜 대답은 AMD가 그저 저렴하고 아무도 관심을 갖지 않기를 바랬다는 것입니다. 그러나 인용 할 참고 문헌이 없습니다.
wikipedia 기사 의 제한 사항 섹션을 읽으십시오 .
PC는 4 페타 바이트의 메모리를 포함 할 수 없지만 (현재 메모리 칩의 크기로 인해) AMD는 대규모 서버, 공유 메모리 클러스터 및 가까운 미래에 이에 접근 할 수있는 물리적 주소 공간의 기타 사용을 구상했습니다. 비트 물리적 주소는 64 비트 물리적 주소 구현 비용을 발생시키지 않으면 서 확장을위한 충분한 공간을 제공합니다.
즉,이 시점에서 전체 64 비트 주소 지정을 구현할 필요가 없습니다. 이러한 주소 공간을 완전히 활용할 수있는 시스템을 구축 할 수 없기 때문에 현재 (그리고 미래의) 시스템에 실용적인 것을 선택합니다.
내부 네이티브 레지스터 / 동작 폭은 외부 주소 버스 폭에 반영 할 필요 가 없습니다 .
1MB의 RAM에만 액세스하면되는 64 비트 프로세서가 있다고 가정 해 보겠습니다. 20 비트 주소 버스 만 있으면됩니다. 사용하지 않을 모든 추가 핀의 비용과 하드웨어 복잡성에 신경 쓰는 이유는 무엇입니까?
Motorola 68000은 이렇습니다. 내부적으로 32 비트이지만 23 비트 주소 버스 (및 16 비트 데이터 버스)가 있습니다. CPU는 16 메가 바이트의 RAM에 액세스 할 수 있으며 기본 데이터 유형 (32 비트)을로드하려면 두 번의 메모리 액세스 (각각 16 비트의 데이터 포함)가 필요했습니다.
CPU 주소 경로에 트랜지스터를 저장하는 것보다 더 심각한 이유가 있습니다. 주소 공간의 크기를 늘리면 페이지 크기를 늘리거나 페이지 테이블의 크기를 늘리거나 더 깊은 페이지 테이블 구조를 가져야합니다. 더 많은 수준의 번역 테이블입니다). 이 모든 것들이 TLB 미스 비용을 증가시켜 성능을 저하시킵니다.
내 관점에서 이것은 페이지 크기의 결과입니다. 각 페이지에는 최대 4096/8 = 512 페이지 테이블 항목이 포함됩니다. 그리고 2 ^ 9 = 512. 따라서 9 * 4 + 12 = 48입니다.
원래 질문에 대한 답 : 48 비트 이상의 PA를 추가 할 필요가 없었습니다.
서버에는 최대 메모리가 필요하므로 더 자세히 살펴 보겠습니다.
1) 가장 큰 (일반적으로 사용되는) 서버 구성은 8 소켓 시스템입니다. 8S 시스템은 단일 노드를 형성하기 위해 고속 코 히어 런트 인터커넥트 (또는 간단히 고속 "버스")로 연결된 8 개의 서버 CPU에 불과합니다. 더 큰 클러스터가 있지만 그 사이에는 거의 없으며 여기서 일반적으로 사용되는 구성에 대해 이야기하고 있습니다. 실제 사용에서 2 소켓 시스템은 가장 일반적으로 사용되는 서버 중 하나이며 8S는 일반적으로 매우 하이 엔드로 간주됩니다.
2) 서버에서 사용하는 주요 메모리 유형은 바이트 주소 지정이 가능한 일반 DRAM 메모리 (예 : DDR3 / DDR4 메모리), 메모리 매핑 IO-MMIO (예 : 추가 카드에서 사용하는 메모리) 및 구성에 사용되는 구성 공간입니다. 시스템에있는 장치. 첫 번째 유형의 메모리는 일반적으로 가장 큰 메모리 (따라서 가장 많은 수의 주소 비트가 필요함)입니다. 일부 고급 서버는 시스템의 실제 구성에 따라 많은 양의 MMIO를 사용합니다.
3) 각 서버 CPU가 각 슬롯에 16 개의 DDR4 DIMM을 수용 할 수 있다고 가정합니다. 256GB의 최대 DDR4 DIMM 크기. (서버 버전에 따라 소켓 당 가능한이 DIMM 수는 실제로 16 개 미만의 DIMM이지만 예제를 위해 계속 읽으십시오).
따라서 각 소켓은 이론적으로 16 * 256GB = 4096GB = 4TB를 가질 수 있습니다. 예제 8S 시스템의 경우 DRAM 크기는 최대 4 * 8 = 32TB가 될 수 있습니다. 이는이 DRAM 공간을 처리하는 데 필요한 최대 비트 수가 45 개 (= log2 32TB / log2 2)임을 의미합니다.
다른 유형의 메모리 (MMIO, MMCFG 등)에 대해서는 자세히 설명하지 않겠습니다.하지만 여기서 요점은 현재 사용 가능한 가장 큰 DDR4 DIMM 유형 (256GB)을 사용하는 8 소켓 시스템에서 가장 "요구되는"유형의 메모리입니다. DIMM)은 45 비트 만 사용합니다.
48 비트 (예 : WS16)를 지원하는 OS의 경우 (48-45 =) 3 비트가 남아 있습니다. 즉, 32TB의 DRAM에만 하위 45 비트를 사용하더라도 총 256TB의 주소 지정 가능 공간에 대해 MMIO / MMCFG에 사용할 수있는 2 ^ 3 배의 주소 지정 가능 메모리가 있습니다.
So, to summarize: 1) 48 bits of Physical address is plenty of bits to support the largest systems of today that are "fully loaded" with copious amounts of DDR4 and also plenty of other IO devices that demand MMIO space. 256TB to be exact.
Note that this 256TB address space (=48bits of physical address) does NOT include any disk drives like SATA drives because they are NOT part of the address map, they only include the memory that is byte-addressable, and is exposed to the OS.
2) CPU hardware may choose to implement 46, 48 or > 48 bits depending on the generation of the server. But another important factor is how many bits does the OS recognize. Today, WS16 supports 48 bit Physical addresses (=256 TB).
What this means to the user is, even though one has a large, ultra modern server CPU that can support >48 bits of addressing, if you run an OS that only supports 48 bits of PA, then you can only take advantage of 256 TB.
3) All in all, there are two main factors to take advantage of higher number of address bits (= more memory capacity).
a) How many bits does your CPU HW support? (This can be determined by CPUID instruction in Intel CPUs).
b) What OS version are you running and how many bits of PA does it recognize/support.
The min of (a,b) will ultimately determine the amount of addressable space your system can take advantage of.
I have written this response without looking into the other responses in detail. Also, I have not delved in detail into the nuances of MMIO, MMCFG and the entirety of the address map construction. But I do hope this helps.
Thanks, Anand K Enamandram, Server Platform Architect Intel Corporation
Many people have this misconception. But I am promising to you if you read this carefully, after reading this all your misconceptions will be cleart.
To say a processor 32 bit or 64 bit doesn't signify it should have 32 bit address bus or 64 bit address bus respectively!...I repeat it DOESN'T!!
32 bit processor means it has 32 bit ALU (Arithmetic and Logic Unit)...that means it can operate on 32 bit binary operand (or simply saying a binary number having 32 digits) and similarly 64 bit processor can operate on 64 bit binary operand. So weather a processor 32 bit or 64 bit DOESN'T signify the maximum amount of memory can be installed. They just show how large the operand can be...(for analogy you can think of a 10-digit calculator can calculate results upto 10 digits...it cannot give us 11 digits or any other bigger results... although it is in decimal but I am telling this analogy for simplicity)...but what you are saying is address space that is the maximum directly interfaceable size of memory (RAM). The RAM's maximum possible size is determined by the size of the address bus and it is not the size of the data bus or even ALU on which the processor's size is defined (32/64 bit). Yes if a processor has 32 bit "Address bus" then it is able to address 2^32 byte=4GB of RAM (or for 64 bit it will be 2^64)...but saying a processor 32 bit or 64 bit has nothing relevance to this address space (address space=how far it can access to the memory or the maximum size of RAM) and it is only depended on the size of its ALU. Of course data bus and address bus may be of same sized and then it may seem that 32 bit processor means it will access 2^32 byte or 4 GB memory...but it is a coincidence only and it won't be the same for all....for example intel 8086 is a 16 bit processor (as it has 16 bit ALU) so as your saying it should have accessed to 2^16 byte=64 KB of memory but it is not true. It can access upto 1 MB of memory for having 20 bit address bus....You can google if you have any doubts:)
I think I have made my point clear.Now coming to your question...as 64 bit processor doesn't mean that it must have 64 bit address bus so there is nohing wrong of having a 48 bit address bus in a 64 bit processor...they kept the address space smaller to make the design and fabrication cheap....as nobody gonna use such a big memory (2^64 byte)...where 2^48 byte is more than enough nowadays.
It's not true that only the low-order 48 bits of a 64 bit VA are used, at least with Intel 64. The upper 16 bits are used, sort of, kind of.
Section 3.3.7.1 Canonical Addressing in the Intel® 64 and IA-32 Architectures Software Developer’s Manual says:
a canonical address must have bits 63 through 48 set to zeros or ones (depending on whether bit 47 is a zero or one)
So bits 47 thru 63 form a super-bit, either all 1 or all 0. If an address isn't in canonical form, the implementation should fault.
On AArch64, this is different. According to the ARMv8 Instruction Set Overview, it's a 49-bit VA.
The AArch64 memory translation system supports a 49-bit virtual address (48 bits per translation table). Virtual addresses are sign- extended from 49 bits, and stored within a 64-bit pointer. Optionally, under control of a system register, the most significant 8 bits of a 64-bit pointer may hold a “tag” which will be ignored when used as a load/store address or the target of an indirect branch
A CPU is considered "N-bits" mainly upon its data-bus size, and upon big part of it's entities (internal architecture): Registers, Accumulators, Arithmetic-Logic-Unit (ALU), Instruction Set, etc. For example: The good old Motorola 6800 (or Intel 8050) CPU is a 8-bits CPU. It has a 8-bits data-bus, 8-bits internal architecture, & a 16-bits address-bus.
- Although N-bits CPU may have some other than N-size entities. For example the impovments in the 6809 over the 6800 (both of them are 8-bits CPU with a 8-bits data-bus). Among the significant enhancements introduced in the 6809 were the use of two 8-bit accumulators (A and B, which could be combined into a single 16-bit register, D), two 16-bit index registers (X, Y) and two 16-bit stack pointers.
'Programing' 카테고리의 다른 글
파일 체크 아웃없이 git 분기 전환 (0) | 2020.09.14 |
---|---|
Git의 서버 저장소에서 단일 파일을 가져 오는 방법은 무엇입니까? (0) | 2020.09.14 |
여러 열에서 중복 항목을 찾으려면 어떻게합니까? (0) | 2020.09.14 |
Xcode-프레임을 잃지 않고 한 뷰에서 다른 뷰로 컴포넌트를 드래그하는 방법이 있습니까? (0) | 2020.09.13 |
알고리즘 : 배열에서 중복 정수를 제거하는 효율적인 방법 (0) | 2020.09.13 |