HP3000-L Archives

July 1995, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Stan Sieler <[log in to unmask]>
Reply To:
Stan Sieler <[log in to unmask]>
Date:
Tue, 11 Jul 1995 15:35:08 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Dan writes:
 
> We did an interesting experiment once to see how MPE comes up with the
> address for mapped files. Apparently, the memory address for mapped files
> comes from the physical location of the file on disk.
 
If true, this would be news to me!
 
I certainly haven't seen any correlation between disk address and
a files' virtual address.  To the contrary, I've been working on notes
to suggest to HP that they consider doing that for selected files!  (Files
with a single extent.)
 
> We had a program open a file mapped, and report the returned address. We
> noticed that when several different programs opened the file they all got
> the same address!
 
They'd better!   Seriously, if they got different addresses, that wuold
violate a (formerly) iron-clad rule of PA-RISC architecture: no two
different (and currently valid) virtual addresses may map to the same page.
 
(The rule was relaxed, unfortunately, in an attempt to clear the way
to implement the Mach kernel)
 
> Reboot the HP, and the returned address on the file is still the same.
 
Not too surprising, if the original test was done just after bootup ...
you'll tend to get the same results simply because things tend to
be deterministic.
 
Try this:  open a file for mapped access, note the address, close the
file.  Come back in a day or week (after heavy activity, but *NO* access of
any kind to the file in question), and open the file again...you'll
most likely get a different virtual address.
 
> Pretty revealing into how MPE handles mapped files internally, no?
 
Yes.  Basically, since pages of the file might be in memory (and since
it's a shame to destroy/rebuild the internal structures describing the
file), MPE doesn't relinquish the virtual address range used by the
file when you close it.  Instead, it puts it on a list (the file system's
LRU (Least Recently Used) list of UFIDs (Unique File Identifiers)),
and generally won't reuse the virtual address range for any of the next
several hundred opens of "not-recently-seen" files.  This means you
can close your file, open several hundred new files (closing/opening,
as you wish), and then re-open your original file... and probably get the
same virtual address .. and, just possibly, some of the pages of the
file might still be in memory, saving a lot of time when you access
them this time!
 
Stan Sieler                                          [log in to unmask]
                                     http://www.allegro.com/sieler.html

ATOM RSS1 RSS2