4 ms·
Then, OSes get this wrong and calculate storage in GiB. Also when I see a 128 GB SSD I somehow expect this to mean a proper power of 2, not to mention it shoul
by ntoshev 17y ago
Then, OSes get this wrong and calculate storage in GiB.
Also when I see a 128 GB SSD I somehow expect this to mean a proper power of 2, not to mention it should be addressed similarly to RAM.
- pieter 17y agoSnow Leopard shows values in the correct GB's. Stuff like df uses Gi and similar prefixes.
- alexk7 17y agoMac OS X 10.6 get this right and calculate in true KB, MB and GB that is 10^3, 10^6, and 10^9 bytes. I heard that Linux also get this right and now use the KiB, MiB and GiB prefixes for 2^10, 2^20, 2^30. Both options are good.
- ntoshev 17y agoThe latest Linux I use (Ubuntu 9.04) uses M and G prefixes. My point is it's a mess and it's unreasonable to claim proper rules are followed. E.g. how do you measure hosting bandwidth? A random calculator (http://www.ibdhost.com/help/bandwidth/ http://www.ibdhost.com/help/bandwidth/) says: 1KB = 1024B; therefore, 500MB = 512000KB = 524288000B .. and .. 1GB = 1048576000B
- tesseract 17y agoThe usual 'binary' scale goes like this: 1 kB = 1024 B, 1 MB = 1024 * 1024 B, 1 GB = 1024 * 1024 * 1024 B, etc. which may be at odds with SI but at least it's self-consistent. The page you've quoted seems to be suggesting that 1 KB = 1024 B, 1 MB = 1024 * 1024 B, and 1 GB = 1000 * 1024 * 1024 B. That seems pretty absurd to me, but maybe they're just taking a page from the book of the "1.44 MB" floppy disks which actually hold 1000 * 1024 B.
- jrockway 17y agoWhere in "Linux" do you mean? In "du" and "df", there is "-h" for powers of 2 and "--si" for powers of 10.
- alexk7 17y agoA quick Google search told me that the transition is not complete. GNU tools have options for si/iec prefixes compliance (http://www.gnu.org/software/coreutils/manual/html_node/Block-size.html#Block-size http://www.gnu.org/software/coreutils/manual/html_node/Block...) but the debate is still open elsewhere.
- wvenable 17y agoAs a programmer, I can't help but think that it should be 2^30. It's all in the same part of the brain that says that 256 is a nice round number. Comparatively, 10^9 is not even close to a nice number. It really comes down to that simple matter of taste. But I understand how it might be confusing to regular people.
- dasil003 17y agoJust because the vast majority of computers are implemented in base 2 doesn't magically make it the one true way™. To suggest that 10^9 is not a nice number is just being willfully combative against your own human nature.
- wvenable 17y agoI never said it was the one true way; in fact I was being pretty pragmatic about it. As programmer, I'm constantly thinking about numbers base 2 and Hexadecimal (I never understood the point of Octal). Therefore base 2 numbers for bytes just makes sense to me. Clearly, other programmers have felt the same way. Sure 10^9 is a nice number when not working with computers, but when you're working with a computers you know that base 10 numbers don't fit right. I'm not being combative against my own human nature, I just think differently based on the context. Obviously the vast majority of people don't have that other context.
- gloob 17y ago(I never understood the point of Octal) Some early architectures had 9-bit bytes. Octal math works cleanly for those, much as hexadecimal math works cleanly for processors with 8-bit bytes.
- lucumo 17y ago> It's all in the same part of the brain that says that 256 is a nice round number. I recognize the feeling you're talking about, but I wouldn't go so far as to call it round. I'd call it familiar. It's the same sense that makes me see 42 and think "nice number", or 1983, or 255 even. Round, on the other hand, requires more than simple recognition, it also requires easy calculation. Calculating 4 * 256 isn't that hard, but when I go for 6 * 256, I'll have to split it in 4256 + 2256. It's even worse for 1048576. Whereas decimally round numbers are very easy to do calculations on.