Physical memory management alongside paging
Posted: Wed Jul 01, 2009 5:34 pm
Hi,
I'm thinking and thinking but can't find a satisfying solution. My problem in short: Should the data of the Physical-MM be able to grow itself or not.
My first approach was a bitmap for P-MM, id-paged somewhere. My problem with this: Allocation of continous memory is hard/slow (and I don't like the idea of using buddy).
Second approach was a free-chunk-list. The list of chunks could be expanded dynamically since allocation didn't aquire a growth of the list. But that's hard to combine with paging since when the list of chunks relocates itself and a new page-table must be allocated. Pre-allocating space for a page-table would be an option but this gets horrible I think.
My third one was to use pre-allocated space for the chunk-list (not be able to grow then) and id-page this. Unfortunately a waste of memory.
So this raises the one question for me:
Should I use fixed-size memory or not? Fixed-size has the advantage of easy maintainance, it would just run. If the data-structures grow (and shrink) on demand, the code becomes way more complex, especially because relocation requires an adjustment of the page-tables.
edit: Huh, the text reads a little confusing, sorry for that but I currently can't express myself more specific. Or more to the point.
I'm thinking and thinking but can't find a satisfying solution. My problem in short: Should the data of the Physical-MM be able to grow itself or not.
My first approach was a bitmap for P-MM, id-paged somewhere. My problem with this: Allocation of continous memory is hard/slow (and I don't like the idea of using buddy).
Second approach was a free-chunk-list. The list of chunks could be expanded dynamically since allocation didn't aquire a growth of the list. But that's hard to combine with paging since when the list of chunks relocates itself and a new page-table must be allocated. Pre-allocating space for a page-table would be an option but this gets horrible I think.
My third one was to use pre-allocated space for the chunk-list (not be able to grow then) and id-page this. Unfortunately a waste of memory.
So this raises the one question for me:
Should I use fixed-size memory or not? Fixed-size has the advantage of easy maintainance, it would just run. If the data-structures grow (and shrink) on demand, the code becomes way more complex, especially because relocation requires an adjustment of the page-tables.
edit: Huh, the text reads a little confusing, sorry for that but I currently can't express myself more specific. Or more to the point.