ASHLEY4 wrote:
My os can be best described as a moden day Amiga/Dos so it is single tasking...
I have to object... AmigaDOS was multitasking right from the beginning... what you are thinking about is more like
MS-DOS, I beg to differ!
The way that i am going to do my memory management is very simple and it may not work :'( .
...he says, and unknowingly speaks about how just about every MMU today works. #8^)
ASHLEY4, I
strongly suggest you take a look at the Intel manuals, or whatever tutorial you can get your hands on regarding paged memory support. You are trying to reinvent the wheel!
See for yourself:
Basicly user memory is devided into 1mb blocks ,
...let's call them "pages"...
...this is all mapped into a list with details of whether it is allocated ,address,user id , ect .
...let's call it "page table"...
The size of 1mb is so that if a block is de- allocated in the middle of a allocaed blocks,that it is of a size thats useable.
Look at the
FAQ page where I refined what I wrote earlier in this thread, and see how I named memory fragmentation as one of the drawbacks of the (non-paging) AmigaOS memory model...
There may be a number of problems that i have not thought of :-\ .
Like, not using the part of the CPU hardware that was
designed to do
exactly what you are thinking about - the MMU?
The reason for not useing paging is speed , to plot a pixel directly to memory rarther than go to a look up table etc.
The things that take away the speed are the things you want to design yourself... the MMU is there to help you, and
designed to do it well - including dedicated cache optimized for those table lookups, which
you want to implement in main memory...
The performance hit of paging is neglectable, compared to virtual memory. Use the MMU, Luke!