Saturday 4 November 2017

operating systems - What does the 'bit' mean in an OS


I know there are 32/64 bit OS in the market.
Q1-> But what does this bit mean actually ?
Q2-> What is the lowest bit OS and highest bit OS ?



Answer




But what does this bit mean actually ?



This means the number of bits used for addressing in memory.


The memory is made up of a huge number of Bytes. Each Byte has a unique address. You can think about the memory as a street with houses, where a house represents a Byte* and the house number represents the address. Now imagine that somebody decides that house numbers should always have 3 digits. That means that the lowest house number is 000 and the highest is 999. This is simple and easy, but it means that you cannot have more than 1000 houses, simply because you run out of house numbers.


It is the same for your memory: The x Bits is the number of digits you addresses have. The only difference is that the numbers are binary. A 32 bit operating system uses binary numbers with exactly 32 digits (a binary digit = a bit).


Thus on a 32bit system you can have 2^32 possible addresses which is about 4 Billion. 4 Billion Bytes are 4 GB. If your memory has more than 4 GB of space that means that you can only use 4 GB of the available memory, because you simply have no addresses for the rest of the memory.


Nowadays it has become normal to have more than 4 GB RAM and of course we want to use that memory. In this case a solution is needed and the simplest thing we can do** is to increase the address space. While any higher bit number would do we'll typically simply double the number of bits from 32 to 64. Thus we have addresses for 2^64 Bytes which is 16*2^60 Bytes or 16 Exabytes.


Note that a marketing people sometimes try to make us believe that 64bits operating systems/CPUs are somehow faster than there 32 bit equivalents. However this is not true***. Actually increasing the address size makes things slower, because the larger the number, the more time consuming calculations are and yes, we do calculate addresses. It is totally pointless to use a 64bit CPU/OS if your memory is small enough so you can fully address it with 32 bit.



What is the lowest bit OS and highest bit OS ?



There is no limit for the bits you can use. A "one bit OS" does not really make sense, because that would mean that your computer cannot have more than 2 bytes of memory. I think descent operating systems start at 8 bit. 32 bit is the most common although 64bit is growing a lot and will eventually replace 32bit. I have heard of some mainframes that have 128bit, but I don't think anything higher really exists, because 128bit gives you already an unimaginable large number of addresses ;-).


* It is not necessarily one address per Byte. This is the most common unit in nowadays architecture, but theoretically we could also choose a single bit, or multiple bytes. E.g. the Java Virtual Machine addresses on some occasions in multiples of 4 Bytes internally. However you need support of both the CPU and the operating system to make any use of that.


** Of course there are also other possibilities. E.g. there is PAE (Physical Address Extensions). This solution divides the memory in smaller segments where each segment has no more than 4 GB. With PAE you can address up to 64GB. This was commonly used on servers that had more than 4 GB RAM before 64bit CPUs became common place.


*** Well, the new 64bit CPUs of course actually are faster than the old 32 bit CPUs. But this is not because of them being 64bit, it is simply because the CPUs have evolved in general. If we'd build a new 32bit CPU with everything we have learned in the meantime, it would be faster than a today's 64bit CPU.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...