The relationship between 64-bit and 32-bit in operating system and application software

Source: Internet
Author: User
Tags windows 7 x64 windows x64 microsoft download center amd processors

64-bit computing has grown into our lives, and 64 of MacOS, Linux and Windows Server systems have become the main players, and 64-bit Windows clients have been well promoted. However, the 64-bit is a lot of people "daunting", because everyone is unfamiliar with the characteristics of 64-bit computing, but also worry about the so-called "compatibility." In fact, there is no need to worry about these, 64-bit is a compatible with the original 32-bit expansion platform, the following will be described in detail.

Historical development

We usually use the so-called desktop computer 64-bit platform is actually x86-64, that is, in the original x86 platform to achieve 64-bit. What is the x86 platform, the architecture that Intel uses in a series of processors after 8086, 8086 is 16-bit, and then extends to 32-bit 80386, which has been used to form the most popular 32-bit processor series, also known as IA32 (Intel implementation 3 2-bit), note that AMD is also using Intel's technology.

The 32-bit x86 processor has grown in strength and is well suited for desktops and general-purpose servers, with a large number of users and developers. However, the 32-bit CPU's memory addressing capability (accessible 4G memory) is limited, so AMD pioneered the x86-64 (also known as AMD64) architecture processor, which can fully implement 64-bit computing. Intel then naturally will not be weak, has also developed the EM64T (extended memory 64-bit technology), but also achieved with AMD64 almost the same ia32e (Intel implementation 32-bit extension) architecture processor.

Currently, the mainstream INTEL/AMD processors are quasi 64-bit processors.

But note that before the birth of AMD64, companies such as Intel and HP developed the IA64 (Intel implementation 64-bit) architecture, a new 64-bit architecture, incompatible with the original 32-bit program, only through the simulator simulation, and the effect is completely unsatisfactory. But this has nothing to do with the 64 we are talking about, which is probably one of the sources of misunderstanding.

Hardware implementation

So how does a 64-bit computation work? First of all to show that x86-64 is standing on the shoulders of x86, and did not make a start, the CPU instruction length (that is, the number of bits instructions) unchanged, the original instruction set are also retained, so x86 and x86-64 the overall framework is consistent, the instructions are fully compatible. The changed part, the original general register capacity has grown to 64 bits, by the way also added 8, while adding 8 128-bit XMM registers, the internal bus (that is, the data channel between CPU parts) also increased to 64 or more broadband. There are, of course, additional instructions to support these registers. From this we can see that the CPU processing data support 64 bits, memory addresses can theoretically reach 2 of the 64-time address space, but because it is built on the x86 architecture of the 64-bit computation, 64-bit linear addressing ability is immature, in fact, there is not so much, but can be improved.

It has been repeatedly stressed that x86-64 is only an extension of x86, so existing 64-bit processors can run both 32 and 64-bit programs at the same time. The following is an example of Intel's technology (AMD, as it turns out). The details are divided into the following categories:

1.64-bit (traditional mode/IA32 mode) is not activated. That is, no 64 operating systems are installed for the machine, and only 32-bit operating systems are used. The CPU will only work in pure 32-bit mode, and the hardware and instructions mentioned in the second section are blocked off.

(These are the 32-bit mode and the 16-bit program-compliant instructions, which are not detailed here.) )

1.1. Real mode

1.2. Virtual 8086 mode

1.3. Protection mode

2.64 digits have been activated. The 64-bit operating system is already installed, and the operating system will set the CPU to 64-bit working state at startup. All new registers, extension registers, and instructions are activated and available.

2.1. ia32e mode/EM64T mode. The 64-bit program is running and the CPU is fully functional with 64-bit features.

2.2. Compatibility mode. This is the mode of running a 32-bit program under a 64-bit system. Detailed instructions are given below.

Software implementation

In compatibility mode, a 64-bit operating system that supports x86-64 is a coordinated process that first identifies the platform nature of the program, such as 16-bit (Windows x64 does not support 16-bit subsystems and therefore cannot perform MS-dos 16-bit programs), 32-bit, or 64-bit. If it is 32 digits, add a 32-bit flag to the corresponding program instructions. When the CPU encounters this flag, it does not specify a 32-bit register for the program in the 64-bit new feature applied to the program (although some 32-bit registers are the first part of the 64-bit register, their names are not the same), the memory space is also remap or Make the necessary transformations (this is not quite certain). That is, 32-bit programs see registers that are still 32-bit, and memory can still access only 4G or less, and they will not find any exceptions to the CPU.

For the software part of the operating system, as with Windows x64, we can see that it is more bloated than the corresponding 32-bit system, in part because the 64-bit instruction data is longer and a single program is larger. But it is more obvious that many things in the operating system are "double", this is the 64-bit and 32-bit, which are primarily platform resources (such as the. NET framework), library resources (such as the Visual C + + library), and some underlying system tools (such as CMD, DXDiag). More obviously, when you open the system partition, we can find that there are two Programs folder "program Files", one for x86-64 software and the other for x86 (32-bit) software. This shows that not only does the hardware fully support x86/x86-64, the operating system also puts these two platforms on an equal footing.

With the popularization of 64-bit operating systems, more and more software developers will test software in 32-bit and 64-bit environments to ensure the reliability of the software. But it's not realistic to have them all develop a pure 64 version. Although from x86 to pure x86-64 theoretically recompile, the original code can be done without any modification, but sometimes it is not so simple, but also to consider economic efficiency (again development is to spend money), and some software does not need to use 64 The computational characteristics of the bit (so there is no need to modify and recompile). So at ease with those who have already stated that support x86 64-bit platform is good, even if there is no declaration of support x86-64 can be run.

Compatibility issues and Solutions

For any new operating system, an incompatible situation will be used. If you encounter incompatibilities, you should first consider whether the operating system itself is being upgraded. For example, if a program developed for Windows XP has no problem running on Windows 7 x86, there should be no problem running on Windows 7 x64. Of course, it is not recommended to use outdated programs.

Another point to note is that the 32-bit platform or library resources that need to be prepared for "double copies" are installed, which are the basis for supporting development software, and 32-bit and 64-bit must correspond to one by one. If the corresponding 32-bit version is missing, the 32-bit program that it needs to support will naturally not run. The solution is to use the Installation Wizard of the program to reinstall (instead of using a green installation package), or to find the program instructions and then download the missing components to the Microsoft Download Center.

Recommended use of 64-bit without 32-bit

and hardware to hit the driver, because of their underlying working characteristics, 64-bit is essential. This is why the 64-bit operating system is slow to promote, but also the 64-bit "poor compatibility" performance. Fortunately, the current hardware vendors are publishing the Windows 64-bit version by default.

What software has to be used in addition to the driver 64-bit? This is not a good thing to say, it is generally a program that needs to process large amounts of data frequently or require a lot of memory space (or even more than 4G of memory space). Like what:

Some large-scale development platform or server platform, such as AutoCAD, Photoshop and SQL Server;

Codec, such as potplayer and corresponding decoder, if you want to see some of the high quality of the film, with 64-bit software to render the natural process of some;

Some frequently used tools, if you want Internet Explorer to open more than 10 pages at once, or antivirus software to monitor all files and data areas, then use 64-bit.

As for other small software, there is no need for such a tangle, if there are 64-bit on the use of, use 32-bit substitution. But to tell the truth, we all want to use 64 bits, even if the software performance is not improved, at least the efficiency will be higher, and "native 64" sounds very Orthodox ah. But if "no" it doesn't matter, we also have "compatibility Mode".

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.