News for hackers. Stuff that matters.
Re:Bill Gates: “I never said '640K should be enough for anyb... by maxwell on Tuesday October 02, 2018 @08:07AM (#18120733)
"Modern operating systems can now take advantage of that seemingly vast potential memory. But even 32 bits of address space won't prove adequate as time goes on."

But 64 bits should be enough for anybody.

Re:Bill Gates: “I never said '640K should be enough for anyb... by huntie on Tuesday October 02, 2018 @08:51AM (#18121037)
Other people have pointed out how much memory 64bits provides, but the real problem is when we go from 48bits to 64bits. 48bits provides 256TB of address space. Right now amd64 only uses the bottom 48bits for pointers and some systems take advantage of this for things like NANboxing. I don't really know the numbers, but losing the ability to NANbox will probably come with a performance hit.
Re:Bill Gates: “I never said '640K should be enough for anyb... by vetinari on Tuesday October 02, 2018 @11:07AM (#18122356)
NaN-boxed or tagged pointers have to be processed before use anyway - amd64 enforces canonical pointers, even if the high bits are unused (they have to be set to 1).

Aarch64 on the other way...

Re:Bill Gates: “I never said '640K should be enough for anyb... by huntie on Tuesday October 02, 2018 @11:18AM (#18122454)
What's your point? A few bitwise operations are far quicker than reading from memory. Also are you sure that the high bits must be 1? I thought they had to be the same as the 48th bit.
Re:Bill Gates: “I never said '640K should be enough for anyb... by vetinari on Tuesday October 02, 2018 @11:33AM (#18122618)
You are right - they can be 0 & copy of bit 47.

The point was, that there will be not a problem with tagged pointers. The pointers have to be clean today when used, so those who use tagged pointers have a place in their code where they handle the cleaning.

Re:Bill Gates: “I never said '640K should be enough for anyb... by hinkley on Tuesday October 02, 2018 @12:35PM (#18123241)
I believe the new garbage collector for the JVM colors pointers in a way they are not scrubbed before use; they memory (re-)map into multiple regions to implement read and write barriers.

Some very old distributed systems used 64 bit pointers where the upper bits told you what machine the data was on.

And we have Intel putting SSD card in DIMM slots. I expect there are semantics attached to those address ranges as well.

I dunno where we are after Spectre, but one of the microkernel architectures got its IPC speed by packing most processes into a couple of address spaces, only with different read write access. On preemption the TLB wasn’t invalidated (about half the cost), just modified.

These are the sorts of tricks you do when your address space is bigger than you will ever need. I expect to see more of this as time goes on. And if we ever see 128 bit pointers, expect crazy stuff like this to be de rigeur.

Re:Bill Gates: “I never said '640K should be enough for anyb... by ken on Tuesday October 02, 2018 @11:40AM (#18122684)
NANboxing isn't the only strategy for type tagging. We've been using tagged pointers in 32-bit land for decades. I doubt the perf hit here is going to be significant.
Re:Bill Gates: “I never said '640K should be enough for anyb... by bzbarsky on Tuesday October 02, 2018 @03:02PM (#18124643)
The reason NaN-boxing is popular for JS is that the only numeric type in JS (per spec, though JITs can sometimes improve on this) is 64-bit IEEE float, and it sure is nice if your value format can represent those directly without requiring a separate heap allocation.

There are still things you could do, of course. For example, you could more or less NaN-box but rotate the bits so the tag is in the lowest bits instead of up in the exponent, then ensure all your pointers are sufficiently aligned. That would mean a perf hit on doubles to do the rotation to recover the double, but you might be right that this is not too bad in practice on modern hardware.

Re:Bill Gates: “I never said '640K should be enough for anyb... by pdpi on Tuesday October 02, 2018 @08:15AM (#18120792)
Exponentials being what they are, the 32 -> 64 jump buys us a lot of headroom.
Re:Bill Gates: “I never said '640K should be enough for anyb... by pygy_ on Tuesday October 02, 2018 @08:52AM (#18121049)
IIRC from the ZFS promo blurb, the energy required to flip 2^128 bits is enough to boil the oceans (assuming a maximally efficient process).
Re:Bill Gates: “I never said '640K should be enough for anyb... by dschn_dstryr on Tuesday October 02, 2018 @10:58AM (#18122278)
I don't quite reach that number. According to Landauer's principle the minimum energy required to flip a bit is 0.0172 eV. Times 2^128 is ~10^18 J. The first google result for boiling all oceans puts it around 10^29 J. Even at realistic energy values for current hardware (10 fJ), we are still 5 orders of magnitude short of boiling all oceans.
Re:Bill Gates: “I never said '640K should be enough for anyb... by ilyagr on Tuesday October 02, 2018 @01:34PM (#18123817)
Seems like if we keep boiling, that's about what it takes to boil lake Baikal.
Re:Bill Gates: “I never said '640K should be enough for anyb... by drivingmenuts on Tuesday October 02, 2018 @11:04AM (#18122340)
> we are still 5 orders of magnitude short of boiling all oceans.

Well, there goes that startup idea ...

Re:Bill Gates: “I never said '640K should be enough for anyb... by pygy_ on Tuesday October 02, 2018 @01:16PM (#18123634)
That was thus marketing BS, thanks for doing the math :-)
Re:Bill Gates: “I never said '640K should be enough for anyb... by et2o on Tuesday October 02, 2018 @08:10AM (#18120764)
16 million terabytes will be a lot of RAM for at least a couple of decades.
Re:Bill Gates: “I never said '640K should be enough for anyb... by Humdeee on Tuesday October 02, 2018 @08:17AM (#18120808)
Hey, some of us could even run our favourite Electron app at that point
Re:Bill Gates: “I never said '640K should be enough for anyb... by babuskov on Tuesday October 02, 2018 @01:12PM (#18123593)
Or maybe even two of those - side by side ;)
Re:Bill Gates: “I never said '640K should be enough for anyb... by aogl on Tuesday October 02, 2018 @08:17AM (#18120805)
Moving beyond a 64-bit architecture will allow manipulation of memory address spaces that are larger than 16 Exabytes. Even high-end servers today do not contain more than 1TB of physical memory. It would take several decades if not more for memory densities to become high enough to begin to reach the boundary that 64-bit addressing limits computers.

So yes, highly likely for a little while..

Re:Bill Gates: “I never said '640K should be enough for anyb... by magoghm on Tuesday October 02, 2018 @08:46AM (#18121002)
You can have an AWS instance with up to 12 TB of RAM: https://aws.amazon.com/blogs/aws/now-available-amazon-ec2-hi...
Re:Bill Gates: “I never said '640K should be enough for anyb... by stochastic_monk on Tuesday October 02, 2018 @08:49AM (#18121014)
Current x86 architectures only use 48 bits for addressing. That’s still enough to address ~280TB of RAM. I expect that to change before upgrading to 128-bit pointers.
Re:Bill Gates: “I never said '640K should be enough for anyb... by red75prime on Tuesday October 02, 2018 @02:58PM (#18124602)
128 bits are nearly enough to address every atom in the Universe. Such pointers are mostly a waste of memory space.

> I expect that to change before upgrading to 128-bit pointers.

Or the joke was wasted on me. Did you mean it will never be feasible?

Re:Bill Gates: “I never said '640K should be enough for anyb... by geocar on Tuesday October 02, 2018 @08:53AM (#18121053)
People where I work have workstations with more than 1TB of ram.

I think the value of a larger pointer (immediately) would be tags, not memory density, just as it was with 64-bit systems -- my old Alpha only had 256mb of ram, and maxed out at 512mb IIRC.

Re:Bill Gates: “I never said '640K should be enough for anyb... by mehrdadn on Tuesday October 02, 2018 @01:51PM (#18123992)
> People where I work have workstations with more than 1TB of ram.

Wow. What kinds of workstation tasks need this kind of memory, if I may ask?

Re:Bill Gates: “I never said '640K should be enough for anyb... by geocar on Friday October 05, 2018 @07:51AM (#18147356)
Analysis; some model building.

It is popular to buy a bunch of servers (or worse, host them on AWS), a bunch of sysadmins, and so on, so you can support a couple smart analysts with some complex hadoop java streaming somethingrather, but it is much cheaper to just buy them beefy workstations and use awk: A HP Z8 G4 with 1.5TB ram is under £30k, and it's hard to get a sysadmin that has any brains for that, let alone two and servers...

Re:Bill Gates: “I never said '640K should be enough for anyb... by wl on Tuesday October 02, 2018 @03:27PM (#18124895)
Genome assembly and computational fluid dynamics are the two that come immediately to mind.
Re:Bill Gates: “I never said '640K should be enough for anyb... by mehrdadn on Tuesday October 02, 2018 @03:40PM (#18125009)
Wow. They need that much data in memory at once? I could understand needing a ton of secondary storage for both, but this much primary storage would seem to imply they need random access to terabytes of data which is a little huge to swallow!!
Re:Bill Gates: “I never said '640K should be enough for anyb... by colejohnson66 on Tuesday October 02, 2018 @02:58PM (#18124609)
Virtual machines?
Re:Bill Gates: “I never said '640K should be enough for anyb... by mehrdadn on Tuesday October 02, 2018 @03:07PM (#18124698)
For workstations though? Not servers?
Re:Bill Gates: “I never said '640K should be enough for anyb... by mitchty on Tuesday October 02, 2018 @11:34AM (#18122631)
> Even high-end servers today do not contain more than 1TB of physical memory.

??? I know of multiple high end servers with 1TiB+ memory footprints. What is your definition of high end?

Here, have a look at HP's page if you don't believe me: https://www.hpe.com/us/en/product-catalog/servers/proliant-s...

And I'd hardly consider those "high end", there are much larger memory servers out there if you want them.

Re:Bill Gates: “I never said '640K should be enough for anyb... by the_other_guy on Tuesday October 02, 2018 @08:19AM (#18120819)
64-bit addressing is much more than enough for many decades to come or even forever!
Re:Bill Gates: “I never said '640K should be enough for anyb... by bzbarsky on Tuesday October 02, 2018 @03:04PM (#18124670)
In fairness, what we have right now is 48-bit addressing, not 64-bit.

I've already run into cases of programs figuring that a "64-bit" address space is basically infinite and running out of address space by trying to have tens to hundreds of thousands of 4GB memory mappings (not necessarily backed by RAM).

Re:Bill Gates: “I never said '640K should be enough for anyb... by nabla9 on Tuesday October 02, 2018 @08:12AM (#18120780)
For local addressing inside a computer 16 exabytes is enough.

For global or large system level addressing 128 to 256-bits should be enough.

(note: you may want local 128-bit virtual addressing for other reasons than accessing more memory)

Re:Bill Gates: “I never said '640K should be enough for anyb... by jerf on Tuesday October 02, 2018 @10:16AM (#18121884)
"(note: you may want local 128-bit virtual addressing for other reasons than accessing more memory)"

Yes, that's why IPv6 is as big as it is. We could fit pretty comfortably into 64 bits for a long time, really, if you assume we fairly tightly pack everybody in. 128 bits is really to give us some routing headroom, not because anyone seriously thinks we're going to use IPv6 on 2^128 distinct targets any time soon. (By the time we have a "galactic internet" it sure won't be using IPv6, not because it's bad or wrong but just because we're going to need something designed to handle the very different challenges involved.)

Re:Bill Gates: “I never said '640K should be enough for anyb... by toast0 on Tuesday October 02, 2018 @11:21AM (#18122492)
Intergalactic (or interplanetary even) networking is more likely to be UUCP like than TCP like, but that doesn't mean it won't need addressing, and that addressing might as well be IPv6. Maybe we can get packets larger than 1500 bytes though.
Re:Bill Gates: “I never said '640K should be enough for anyb... by cm2187 on Tuesday October 02, 2018 @08:22AM (#18120834)
I think there are roughly 2^166 atoms on earth (translating 10^50 if I didn't mess up my maths). So clearly we don't need 256 bit addressing for any system!
Re:Bill Gates: “I never said '640K should be enough for anyb... by nabla9 on Tuesday October 02, 2018 @08:34AM (#18120912)
The problems of allocating memory addresses in global scale requires distributed probabilistic addressing or otherwise inefficient address space distributions.

You don't want to share the same compact memory allocator with the malloc(3) from the other side of the galaxy, or even different city.

Re:Bill Gates: “I never said '640K should be enough for anyb... by quadcore on Tuesday October 02, 2018 @10:44AM (#18122152)
You will regret this.