4 ms·
> Of course, if somebody does an operating system that uses 128-bit addressing to address every byte in the world uniquely, and this takes over the world, it mi
by ajuc 5y ago
> Of course, if somebody does an operating system that uses 128-bit addressing to address every byte in the world uniquely, and this takes over the world, it might be an impetus for 128-bitters :-)
I'd like to see such OS.
- Animats 5y agoSymbolics tried that. Scary thought: how many bytes of RAM are there in the world? Probably more than 2^64. There are around 7 billion smartphones, and many have over 4GB of memory. That's over 2^64 right there. I'd like to have 128-bit atomic operations. If you're doing lock-free programming, hardware compare and swap on a structure that contains two pointers is useful. Then you can update lists atomically. In a 64-bit pointer machine, that takes 128 bit atomics. So far, not much hardware offers that.
- Dylan16807 5y agoCMPXCHG16B has been standard for the vast majority of the time x86_64 has existed. If a CPU can run windows 8.1, then it has 128-bit atomic operations.
- Animats 5y agoRust does not have AtomicU128, for some reason. Need to look into that.
- Dylan16807 5y agohttps://internals.rust-lang.org/t/is-atomicu128-gone-for-good/15657 https://internals.rust-lang.org/t/is-atomicu128-gone-for-goo... https://ebarnard.github.io/2019-06-03-rust-smaller-trait-implementers-docs/core/sync/atomic/struct.AtomicU128.html https://ebarnard.github.io/2019-06-03-rust-smaller-trait-imp... https://github.com/rust-lang/rust/issues/32976 https://github.com/rust-lang/rust/issues/32976 A little confusing but it looks like you can get to it.
- Animats 5y agoAh. There are still some AMD64 CPUs out there that don't have cmpxchg16b capability. The Linux developers made the decision to not use cmpxchg16b and continue supporting them. Microsoft made the decision to use cmpxchg16b for Windows 8 and later. There are some libraries which probe on first use and either use cmpxchg16b or use a global lock. That's probably a viable strategy at this point, since CPUs without it are now rare. But I can see the argument against it. [1] https://superuser.com/questions/187254/how-prevalent-are-old-x64-processors-lacking-the-cmpxchg16b-instruction https://superuser.com/questions/187254/how-prevalent-are-old...
- monocasa 5y agoSymbolics maxed out at 40-bit pointers.
- Animats 5y agoThere was some kind of scheme for accessing objects on other machines over the local network using a very long memory address, but I don't know if it was ever used.
- wantoncl 5y agoThere might be a bit of a problem powering it: https://hbfs.wordpress.com/2009/02/10/to-boil-the-oceans/ https://hbfs.wordpress.com/2009/02/10/to-boil-the-oceans/
- Dylan16807 5y agoSo a few notes on that: * That's the threshold where you go from 128 to 256, not where you go from 64 to 128. * If you're not going for the physically maximum overclock, the energy per bit is a lot less. * That's for storing 512 byte blocks, so you'll run out of RAM bits 512 times sooner. * Humans use about 10^20 joules of electricity per year. * 10^20 joules at the cost in the link would be about 2^110 bytes, which is not all that far off.
- kloch 5y agoYou joke but I found this interesting (from https://en.wikipedia.org/wiki/Metal_oxide_semiconductor https://en.wikipedia.org/wiki/Metal_oxide_semiconductor): > It is the basic building block of modern electronics, and the most frequently manufactured device in history, with an estimated total of 13 sextillion (1.3×10^22) MOSFETs manufactured between 1960 and 2018 64 bits can address 1.8x10^19 bytes. Of course there is not a 1:1 correlation between mosfets ever made and bytes of ram usable today but it's curiously close to the 64-bit limit so you could say 64 bits is just enough to address every byte in the world. I wonder how much magnetic storage would add to that?
- Dylan16807 5y ago> I wonder how much magnetic storage would add to that? A lot. Just looking at hard drives, if you take an estimate of 250 million units made in 2020 and multiply by a conservative 4TB, you get 10^21 bytes for that single year.
- monocasa 5y agoI worked on a magnetic storage device that stored an exabyte, so quite a bit.