32-bit and 64-bit

Source: Internet
Author: User

1. What we call a 64-bit CPU architecture refers to the 64-bit memory expansion technology, which is an extension of the 32CPU architecture and is compatible with the original architecture. It increases the bit width between CPU and memory by increasing the operation bit width of the CPU, thus allowing the system to support more memory, 64-bit maximum support 64G.

2. Processor mode: Traditional 32-bit mode: Install 32-bit operating system, install 32-bit hardware driver, install 32-bit application. Most of the current processors are Intel 64, with 32-bit operating systems installed, and the program works well, including 16bit and 32bit programs.

Compatibility mode: The operating system and hardware drivers are 64bit, the computer allows the 64bit operating system without pre-compilation to run most of the traditional 32bit applications, this traditional 32-bit mode is basically the same, 32-bit applications can still only access 4G memory, but this limit is only at the process level, And not at the system level.

64-bit mode: Must have 64-bit operating system, driver, application cooperation, then the operating system cannot run 32-bit programs, the least compatibility, but give full play to the advantages of 64-bit architecture.

3. Summary: 32-bit or 64-bit depends on the CPU architecture, followed by the operating system, driver, application 32-bit, 64-bit version of the points. If the operating system is 32-bit, the driver must be 32-bit, the application is 32-bit, and if the operating system is 64-bit, the driver must be 64-bit, the application can be 32-bit, or it can be 64-bit.

The two great advantages of 4.64bit computing are that you can perform a larger range of integer operations, and you can support larger memory.

5.64-bit benefits embodied in the application: Cryptographic programs: Most cryptographic algorithms are based on a large number of integer data, suitable for processing in 64-bit general-purpose registers and operators; Scientific computing: The scientific calculation of integer data will benefit from 64-bit processing, and floating-point arithmetic will not benefit, because even a 32-bit processor, Floating-point registers have also reached 80-bit to 128-bit, with applications that require more than 4G: such as database servers, graphics processing, and video compression-related applications.

The 6.64-bit virtual memory space can theoretically support direct access to 2EB, but the current so-called 64-bit processor does not really do it for the simple reason that there is no machine to support that much physical memory. The EM64T provides 40-bit addressing capability with a maximum support of 1TB memory.

The difference between 7.jvm32bit and 64bit:

1 currently only server VMS support 64bit Jvm,client does not support 64bit JVMs.
2. The Java plug-in, AWT Robot and Java Web Start these components currently do not support 64bit JVMs
3. Impact of native code: there is no effect on JNI programming interfaces, but code written for 32-bit VMS must be recompiled to work on 64-bit VMs.
4. The maximum size of the32-bit JVM Heap is 4G, and on 64-bit VMs, the size of the Java heap is limited by the physical memory and the virtual memory provided by the operating system. (The heap here is not rigorous)
5. Default stack size for threads: On Windows 32-bit JVM, the default stack is the maximum 320k 64-bit JVM is 1024K.
6. Performance Impact:
(1) 64bit JVM compared to 32bit JVM, in the case of a lot of memory access, its performance loss is less, the AMD64 and EM64T platform in 64-bit mode, the Java virtual machine gets some extra registers, it can be used to generate more efficient native instruction sequence.
(2) on the performance, on the SPARC processor, when a Java application porting from the 32bit platform to the 64bit platform 64bit JVM will use about 10-20% performance loss, and on the AMD64 and EM64T platform, its performance loss range of 0-15%.

7.Sun's official website says that when a Java application is ported from a 32bit platform to a 64bit JVM on a 64bit platform, the application has a performance penalty, and many people will be puzzled. Moving Java from 32-bit to 64-bit so far brings only a drop in performance.

A 8.Java virtual machine (JVM) is a software specification that differs in 32-bit and 64-bit versions, but includes both the JIT compiler and the garbage Collection feature (GC), whose performance is critical to the execution efficiency of the JIT compiler and garbage collection functions. The JIT compiler implements the dynamic translation of Java bytecode into hardware machine code before program execution, and the idea behind it is that bytecode is smaller and easier to compile than Java source code, but the cost is that it takes a little time to compile Java bytecode into machine code. But the time is much less than compiling the Java source code directly into the machine code. In 32-bit and 64-bit JVMs, the corresponding JIT takes a slightly different time to compile the Java bytecode into the final machine code, but it can do some optimizations, and the overall performance will vary on both IBM and Sun's two versions of client and server programs. Garbage collection reclaims the memory that the object no longer needs to use, and it must be executed frequently to release the Java heap that the object no longer accesses. Because the size of the data in the Java heap varies on 32-bit and 64-bit platforms, the performance of the 32-bit and 64-bit JVM varies, but the larger the pointer, the more difficult the GC management, and the performance of the corresponding garbage collection will vary.

9. How to choose Jvm32bit and JVM 64bit

1. Does your application need more than 2GB Java heap for better performance? Yes = 64-bit No = 32-bit How can you tell how much Java heap your application needs? It can be determined by calculating the average heap usage.

2. Does your application require high-precision scientific calculations for statistics, security, encryption, and so on? Yes = 64-bit No = 32-bit 3, your application needs only a Java Heap less than 2GB? (similar to 1th) Yes = 32-bit on 64Bit os no = 64-bit 4, your application does not require 64-bit features, but is deployed on a 64-bit operating system? Yes = 32-bit No = 64-bit 5, the most important thing is that in other cases it's on a 32-bit OS with a 32-bit JDK

32-bit and 64-bit

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.