32 bit/64 bit OS? [closed] - operating-system

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
What are the differences between 32- and 64-bit operating systems?
And specifically, can 64-bit operating systems run on a 32-bit processor, and why, why not?

32-bit OS uses 32-bit addressing (the address space is 4 Gbyte), 64-bit OS uses 64-bit addressing (the address space is 4G*4G, it's plenty).
64-bit OS requires 64-bit processor (processor, which use 64-bit addressing).
32-bit OS requires 32-bit processor, or 64-bit processor with backward compatibility mode (most of processors have).
Programs written for 32-bit OS can run on 64-bit OS if the 64-bit OS has compatibility mode (usually has). Of course, I mean the same OS versions.
The "how many bit" has different meaning in case of the processors: it means the data bus width (not 100% accepted term). Also, there are processors which are x bits, but they operate as x*2 bit, say, MC68000 is a 16-bit processor, because it has only 16-bit bus, but it use 32-bit addressing (altough it can only reach 24M), but it has 32-bit registers, so it's "logically" 32-bit. The smallest family member, MC68008, is 8-bit processor (same instruction set as MC68000, but only 8-bit data bus), only MC68020 (and above) are "true" 32-bit processors, because they have 32-bit data bus. That's why the MC68000 is mentioned as a 16/32 bit processor: it's a 16-bit processor with 32-bit programming architecture.
Some 64-bit operating systems can provide separate 4 Gbyte address space for each 32-bit process, so it's worth to use 64-bit version of it.
Some 64-bit operating systems can't use 32-bit drivers, so if you don't need 4G+ memory, or you don't have to use native 64-bit computing anyway, it's - yet - better to use 32-bit operating systems.
64-bit programs (programs which utilizes the processor's 64-bit instruction set) may run faster than 32-bit versions (depends on processing type they do), and may eat a little more space (because of double-size memory pointers).
The main reason of choosing 64-bit is breaking the 4G memory limit per process: servers, video/image processing etc. Everyday office work requires no 64-bit processing (yet).

Nopes!! Size of the instruction is the deal breaker!
You may have observed that Windows 7 has different packages for 32 and 64 bit platforms!
Shash

Yes! for 32 bit OS. Each instruction only have 32 bits.

Related

What is the relationship between "64-bit operating system", "x64-based processor" to word size?

I was wondering, does a 64-bit operating system and a x64-based processor mean that the word size (i.e. memory transfer size between processor and physical memory) is 64 bits? What if the operating system is a 32-bit and processor x64? And what about x86-based processors? How do these two specifications (XX-bit operating system and xXX-based processor) relate to the actual word size in the hardware?
No, it doesn't mean that. modern x86 CPUs have 64-byte cache lines, and can do accesses to cache at any power-of-2 width from 1 byte up to a 32 byte SIMD vector, or 64-byte in CPUs with AVX512. See also What Every Programmer Should Know About Memory?
"word size" is not really a meaningful term for x86; it's not a word-oriented ISA at all.
In Intel documentation a "word" is 16 bits, just to maintain consistency with documentation going back to 8086. The bus and register widths in hardware are unrelated to that.
x86-64 has 64-bit integer registers when running in long mode (64-bit mode). And supports 64-bit addresses. (Actually 48 bit virtual addresses, and up to 52-bit physical depending on the hardware, because of the page table format. Why in 64bit the virtual address are 4 bits short (48bit long) compared with the physical address (52 bit long)?)
x86 CPUs since 32-bit Pentium have been able to do 64-bit data transfers. Why is integer assignment on a naturally aligned variable atomic on x86?

A method of checking my cpu bit

My OS is windows 10 x86_64.
I had checked supporting arm64 the cpu. So I had knew 64bit cpu.
But sometimes, I got error message about OS bit.
So I do cpu bit test on c language.
printf("%d", sizeof(int*));
I had expected result is 8. But Result was 4.
1. What is my cpu bit?
2. if my cpu is 32bit, Can use memory over 4GB? My cpu supports arm64.
Please I'm very confused.
Your CPU almost certainly can't be both arm64 and run x86_64 Windows, because the Intel and ARM instruction sets are not the same. Perhaps you meant AMD64? If you search the web for you CPU model, you probably will be able to find out how many bit it is.
Further, keep in mind that the C standard only requires that ints be at least 16 bits, not the same size as the machine's native size. I suspect that the compiler you were testing with might not have been aware of the 64-bit capabilities of your CPU, and compiled your code as though your CPU was a 32-bit CPU.
As far as memory support, as far as I know, the motherboard and CPU model will affect the actual amount of memory your system will support.
Most likely you CPU supports amd64.
The size of the C standard types depends on the data model.
The size of a pointer depends on the execution mode (long-mode vs compatibility-mode) and can be 32-bit even on 64-bit OSes.
If your CPU is 32-bits you could use more than 4GiB of memory, but since the premises is almost surely false, the easiest solution is simply to recompile for a 64-bits environment.

32 bit and its relation with Ram?

Does 32 bit mean ram size should be 4GB ? or can a computer with say 32GB ram also have 32 bit provided adress space does not exceed 32 bit ?
When we say 32-bit windows or 64-bit OS, which part of OS exactly differs between the two ? I mean does some part of kernel differ ? if yes then which part ?
NOTE: this question is not a duplicate. please dont vote to close
No 32-bit does not necessarily refer to the size of the address bus. If the address bus is 32-bit then certainly the maximum RAM in the system is 4 gb, or 2^32. There have been several examples of 32-bit machines that could exceed 4gb of RAM, however, by using a concept of Page-Extended Addressing (PAE) That was introduces in the mid 1990s.
Another examples where this comes into play is the first IBM PC. It used a 16-bit microprocessor known as the 8088. The 8088 had a 20-bit address line and as such had the capacity of 2^20 (1MB) of RAM.
When we speak of a microprocessor having a certain number of 'bits', such as a 16-bit microprocessor or a 32-bit microprocessor, we are primarily referring to the basic data unit that the processor can handle at a time. This is determined by the size of the processor registers, which are the areas of the processor used for holding data for calculations and decisions.
Because there is a fundamental difference in how machine code is used to grab and process data in a 32-bit vs a 64-bit system, All code must be compiled specifically for the machine you want it to run on. This is why there are two version of many x86 operating systems. There is often one for 32-bit and one for 64-bit x86. x86 microprocessors have a legacy of backwards compatibility and are therefore able to run in 16, 32, or 64-bit modes. This means that you can run 32-bit windows on a 64-bit processor. If this backwards compatibility wasn't build in, however, this would not be possible.
So, as far as which part of the kernel differs, the answer is all of it. The same is true for desktop applications that are coded for 64-bit machines. If they have two versions, the entire code is different as the compiler optimizes for one or the other.

32bit Operating systems vs 64 bit operating system [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I want to ask that if 32 bit window7 and 64 bit window7 is installed on two PCs having same configurations (i.e processor, RAM, etc) then I run same program(i.e data compression) on both OS then which OS will compress the same amount of data more quickly?? or both will have the same speed to performing the tasks ??
I believe the main question when choosing between 32 and 64 bits is not "my processor support 64 bits - should I use this because 64 is "twice better" than 32", but "how much memory do I have".
64-bit programs use about 50% more memory then their 32-bit counterparts. The results of this are:
less code/data can fit into processor caches -> more cache misses -> your super-fast processor waits more for memory controller to fetch data from RAM. Processor also needs to read more data because it's more bloated.
Once you're out of RAM and the system starts swapping - disk access is thousands times slower than RAM, so any potential benefits of 64-bit code are flying out of window.
On the other hand, in 64-bit mode processor has more registers, so it doesn't need to access memory that often, also, some calculations (64-bit numbers etc.) are more efficient. So generally, code which is not memory-restricted runs slightly faster in 64-bit mode.
So, if your system has, say, 2GiB of RAM or less then I would definitely choose 32 bits. More than 4GiB - the benefits of 64 bits are becoming more prominent. Around 4GiB is a "grey zone" - you need to make a choice yourself.
In short the speed of your program will depend on the memory you have. based on the OS you installed
64-bit compression programs (WinRAR, WinZip, 7-Zip) run 5-10% faster than their 32-bit counterparts.
http://www.powerarchiver.com/forums/showthread.php?t=4867
In general 64-bit programs will have a slight speed boost over their 32-bit counterparts, in exchange for using more memory. This is because the size of the memory variables has doubled, but the efficiency of computations run in 64-bit mode by a 64-bit processor has gone up.
http://www.viva64.com/en/k/0003/
As a general rule of thumb: if you have a 64-bit operating system, install the 64-bit version of programs when they're available. All processors that come with new computers are 64-bit nowadays but surprisingly application developers are making the switch much more slowly.

what is difference between 32 bit vs 64 bit OSs and processors (Intel architecture and WIndows)

The only difference I know is that size of the registers for 64-bit and 32-bit processors are 64 and 32 bits, respectively. Also the addresses are 64 bits in 64 bit processors. Are there any other differences between these two?
x86_64 has more registers than x86, so more work can be done on the CPU rather than constantly fetching bits from RAM. Also, x86_64 guarantees that the CPU supports at least SSE2, so the compiler knows it can optimize for that.
Those are the key differences, but those differences have many effects - for instance, since addresses are larger, the amount of memory you can effectively access is greater - 32-bit OSes are traditionally limited to around 4GB of memory.
In 32-bit machine the maximum size of RAM will be 4GB
2^32=4294967296 bits which equals to 4GB
but in case of 64-bit machine this will be-
2^64=18446744073709551616 bits which equals to 17179869184 GB
Physical Address Extension (PAE) is a feature to allow x86 processors to access a physical address space larger than 4 GB. This can go up to 64 GB. To use PAE, the OS must support this feature. All major OSes allow the use of PAE, including Windows.
Hence, memory access can't really be held as grounds for distinction between 32-bit & 64-bit OSes.
On the other hand, almost all the processors coming now into the market are 64-bit capable, so it really depends on your OS, how much memory access it allows.
The main difference between 32-bit processors and 64-bit processors is
the speed they operate. 64-bit processors can come in dual core, quad
core, and six core versions for home computing (with eight core
versions coming soon).
Multiple cores allow for increase processing
power and faster computer operation. Software programs that require
many calculations to function operate faster on the multi-core 64-bit
processors, for the most part.
It is important to note that 64-bit
computers can still use 32-bit based software programs, even when the
Windows operating system is a 64-bit version.
Another big difference
between 32-bit processors and 64-bit processors is the maximum amount
of memory (RAM) that is supported. 32-bit computers support a maximum
of 3-4GB of memory, whereas a 64-bit computer can support memory
amounts over 4 GB. This is important for software programs that are
used for graphical design, engineering design or video editing, where
many calculations are performed to render images, drawings, and video
footage. One thing to note is that 3D graphic programs and games do
not benefit much, if at all, from switching to a 64-bit computer,
unless the program is a 64-bit program.
A 32-bit processor is adequate
for any program written for a 32-bit processor. In the case of
computer games, you'll get a lot more performance by upgrading the
video card instead of getting a 64-bit processor.
In the end, 64-bit
processors are becoming more and more commonplace in home computers.
Most manufacturers build computers with 64-bit processors due to
cheaper prices and because more users are now using 64-bit operating
systems and programs. Computer parts retailers are offering fewer and
fewer 32-bit processors and soon may not offer any at all.
Extract from : Here.