[Info-vax] OpenVMS I64 V8.1 "Evaluation Release"?

Johnny Billquist bqt at softjar.se
Thu Mar 22 11:09:46 EDT 2012


On 2012-03-21 19.00, glen herrmannsfeldt wrote:
> Johnny Billquist<bqt at softjar.se>  wrote:
>> My god, I can hardly believe my eyes when I read this.
>
>> Have none of you the slightest clue about the difference between virtual
>> address and physical address?
>
>> Even today, there is no CPU that can address 64 bit physical address space.
>> Is that relevant? No. You've been able to address 64 bits of virtual
>> address space in your programs the whole time, independent of the
>> physical address capabilities. And independent of the actual physical
>> ram existing on the machine.
>
> Well, if you put it that way, IA32 has a 45 bit virtual address
> space, which should have been plenty big enough. That is, 16 bit
> segment selectors minus the local/global bit and ring bits,
> and 32 bit offsets.

I don't know exactly how the virtual addresses look on the IA32 so I 
can't make more explicit comments. But if it actually forms a 45-bit 
virtual address space, then sure. But it depends on how the virtual 
address is calculated. Maybe someone can make a more accurate comment, 
if we want to pursue that.

> Also, many IA32 processors have a 36 bit physical address, again
> plenty big enough for most people even now.

Right. But the physical address space becomes a question for the OS 
allocation and resource utilization. Good in its own way, but it won't 
allow your program to use more memory space than what you can address in 
your virtual address space.

>> To read an argument that it was pointless to have machines with 64-bit
>> addressing since there were no existing machines that shipped with more
>> than 2 GB of RAM anyway is about as stupid an argument as I've ever
>> seen. That is just showing that you have not understood computers at all.
>
> Having a large virtual address space is nice, but you can't
> practically run programs using (not just allocating, but actually
> referencing) 8, 16, or 32 times the physical address space.

You perhaps can't use all of it at the same time, for various reasons. 
But you might definitely want to spread your usage out over a larger 
address space than 32 bits allows.

> The rule for many years, and maybe still not so far off, is that
> the swap space should be twice the physical memory size. (Also,
> that was when memory was allocated out of backing store. Most now
> don't require that.)

That has not been true for over 10 years on any system. It's actually a 
remnant from when memory was managed in a different way in Unix, and 
originally the rule was that you needed 3 times physical memory in swap.

The reason for the rule, if you want to know, was that way back, 
physical memory was handled somewhat similar to cache, and swap was 
regarded as "memory". So, when a program started, it was allocated room 
in swap. If swap was full, the program could not run. And when running, 
pages from swap was read into physical memory as needed. (And paged out 
again if needed.)
This should make it pretty obvious that you needed more swap than 
physical memory, by some margin, or you could start observing effects 
like a program not being able to run because there was no memory, but 
you could at the same time see that there was plenty of free physical 
memory. A very silly situation.

No system today works that way. You allocate memory, and it can be in 
either swap, or physical memory. You do not *have* to have space 
allocated in swap to be able to run. You don't even need to have any 
swap at all today.

> If you consider that there are other things (like the OS, other
> programs and disk buffers) using physical memory, you really
> won't want a single program to use more than 4GB virtual on
> a machine with 4GB real memory. Without virtual memory, you
> would probably be limited to about 3GB on a 4GB machine.

It's called paging, and every "modern" OS does it, all the time, for all 
programs. Not a single program you are running today are all in memory 
at the same time. Only parts of it is. So, even if you are running a 
program that is 4 GB in size, it will not be using 4 GB of physical 
memory at any time.
And if your program is only using 100 KB, the odds are that not all 100 
KB will be in physical memory either.

Really.

So that whole argument is false and meaningless.

	Johnny



More information about the Info-vax mailing list