[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] virtual memory



Martin-Éric Racine wrote:
>On 2000-4-18, Tomas Berndtsson <tomas@nocrew.org> wrote:
>
>> Perhaps not. Mmapping shared libs, as other Unices do, really
>> requires virtual memory too, with all that comes with it.
>
>Speaking of this, has anybody heard anything on Michael White's
>page/virtual ram development?  Any progress?

I'm progressing in stages.  First, I made the 030 tables look like
the 040/060 tables.  This may make the 030 users hate me for a while,
as it does drive up the amount of memory needed for an MMU table.
This is done and sent to Frank.

Second, if we want virtual memory, we really can't afford to give
each process an MMU table entry, as we do now.  If I recall, the table
size would be in the megabytes per process.  Therefore, I'm going
to make two MMU tables for all processes to use.  The code changes
for the 68040/060 version is about 95% done.  All that's left is the
changes needed to modify the MMU table(s) during a context switch.
I know what I need to do there, it's just a matter of finding time.

The 68030 tables will be next.  I'm going to have to find some alpha
testers for that, though, as I only have 4 MB of ST RAM on my Afterburner
Falcon in 030 mode.  I can only do smoke tests.

After that, it gets easier.  The modified memory region already stores
both the MMU table entry and the address range.  All that's really
needed now is to track the free pages and memory ranges rather than
the free memory regions.  As memory regions are needed, pages and
ranges are allocated to the region.  This will mean pages can be
allocated from anywhere it TT RAM.  Note that I'm not mucking with ST RAM,
due to all the DMA stuff.  ST RAM will have to remain as it is, more
or less.  At this point, TT RAM fragmentation will no longer be
possible - a "free" command will pull up just one memory region
for TT RAM.

>From this, the next step is to start allocating disk space for pages.
This is probably were I'll go to the Outside source, to "borrow" the
Outside page swapping algorithm, and see how well it works for MiNT.
Of course, since we'll have the source, it'll be possible to fine-tune
it for MiNT.

Hope this has been helpful.

Michael White (michael@fastlane.net)