[ale] [ALE] Happy Birthday BASIC

Jon "maddog" Hall jon.maddog.hall at gmail.com
Thu May 23 09:49:14 EDT 2024


Steve,

>Some day Terrabytes of RAM won't be enough. Kinda like it turned out
>640K wasn't enough :-)

In modern-day operating systems that use demand-paged virtual memory there
is a difference between the virtual address space and the amount of
physical RAM used.   The discussion I was having with my friend was the
difference between a 64-bit virtual address space and a 128-bit virtual
address space, and he wanted a 128-bit address space.

I will not go through the complete history of address spaces, but I will
point out that in 1973 I programmed on an IBM mainframe that had a 24-bit
virtual address space (approximately 16 Megabytes) with only one megabyte
of semiconductor memory in it.   Of course we did not have modern day
graphics, audio or cat pictures on it.

The PDP-11 line of computers had a 16-bit virtual address space, and often
had a limit of 4 MB of RAM, yet we did timesharing and other things on
them.  We still did not have lots of cat pictures, but we did have some
porn in low resolution from alt.binaries

The VAX-11 line brought out 32-bit virtual address spaces, about 4 billion
bytes, with real memories costing 16,000 USD per megabyte (from DEC, others
sold compatible memory for 1,000 USD per megabyte....but that is capitalism
for you)

The Alpha's 64-bit virtual address space allowed 4 billion times 4 billion
bytes of data in one address space.   I have done the math on this before,
but to keep it brief, that is 2^64 or 1.84x10^19th power or about 38KB for
every square meter on the face of the earth including all the oceans.

The reason that a person might want a 64-bit processor over a 32-bit
processor is not that their problem would need all 64-bits, but that it
might need 33 bits or 34 bits of address space.   If your processor does
not have that capability then you have to do "edge programming" on your
problem....getting to the "edge" of your data, saving various variables,
flipping over to the next address space and applying that data.   This can
be tricky in some problems, particularly multi-threaded problems.

However the 64-bit processor does not need 2^64 bytes of hardware RAM.
Here we deal with two fundamental theories of computation:  locality of
reference and temporal locality.   It is the basis of virtual memory, and
basically points out that references in a virtual address space of a
well-written program are very likely to be in the same area or same time
frame as the last reference.   This is why cache memory works and when you
encounter a poorly written program you often have "thrashing" in the memory
subsystem.   If the "localities" are poor enough the thrashing can also
affect your I/O subsystem.

The amount of RAM needed for a modern-day computing system is not a
function of virtual address space nor individual problems to be solved, but
more a function of the number of processes and threads that are resident at
one time in the RAM, plus the balance between RAM, the I/O subsystem and
the quality of programming.

Even if you were to say that a problem really did need so much data that it
completely consumed a 64-bit address space, the time it would take for a
processor to simply *access* each byte of that address space (no
"processing", just accessing that byte) with a one GHz single-core RISC
processor (to keep things simple) would take 584,942 years.

I will also point out that we could solve many of those REALLY BIG problems
by using edge programming, it was just that not having to use edge
programming made it easier and less error-prone.   As an example, you could
mmap(2) into virtual memory all the data in a REALLY LARGE file, and treat
that data as if it had been first read into RAM.

I will not even discuss the number of page-table entries or the trade-offs
in swapping, nor the fact that 2^64 bytes of RAM, even at 1 dollar a
gigabyte, is more than this retired computer guy can afford.   Just trust
me that you do not want to pay for that in your phone (since most
smartphones use 64-bit processors these days).

I hope at this point that you can understand why I am not going to wait for
for 128 bits of virtual address space....or even 65 bits.   64-bits will
keep me for a while.

Warmest regards,

Jon "maddog" Hall

On Thu, May 23, 2024 at 9:01 AM Steve Litt via Ale <ale at ale.org> wrote:

> Jon "maddog" Hall via Ale said on Fri, 17 May 2024 05:55:19 -0400
>
> >I asked them "What problem do you need that much address space to
> >solve? What is the practical need?"
>
> RAM.
>
> Some day Terrabytes of RAM won't be enough. Kinda like it turned out
> 640K wasn't enough :-)
>
> Imagine modeling the entire Milky Way looking for asteroid/comet
> impactors.
>
> That being said, I liked Scott McBrien's points about extreme wastage.
>
> SteveT
>
> Steve Litt
>
> Autumn 2023 featured book: Rapid Learning for the 21st Century
> http://www.troubleshooters.com/rl21
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> https://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.ale.org/pipermail/ale/attachments/20240523/b3ee0acc/attachment.htm>


More information about the Ale mailing list