-
Notifications
You must be signed in to change notification settings - Fork 278
Memory Management
Fuzix divides memory management models as follows
A system with a single flat address space and no hardware memory management or segment registers. Currently this is supported either by keeping one process in memory and swapping others.
Systems that have a section of the address space fixed and the rest is switchable as a single chunk between multiple memory banks. This is very common on Z80 systems, particularly CP/M ones. The switchable chunk needs to be at least 32K to make effective use of it. Systems with a single 16K banked window do not work out well. Works very well today.
Systems with 16bit address space divided into four 16K chunks each of which can be independently mapped. 8K banks can also be supported as pairs in order to handle the 8K MMU page size often found on 6809 systems. Works well but swap is not yet supported.
Support for 8K banking to make proper use of the 8K MMU on some 6809 systems, as well as to support other 8K platforms.
A variant of the flat memory space where the kernel tries to create new processes at free virtual addresses but fork, swapping and lack of linear space is handled by swapping banks of memory on task switch - somewhat akin to how Minix worked. This works OK because most of the time processes fork and then execve() and also provides a rather more sensible swap and paging model with larger amounts of RAM.
Under Development
Base/Limit pairs or segmentation. The processor has a linear address space but programs can be relocated by setting up base and optionally limit registers describing the accessible region. The 8086 segment model is a variant on this but not quite the same.
Systems with a 16bit or similar virtual address space mapped onto a larger physical address space via a simple lookup table.
The proposed Atari ST MMU that never happened. A stunningly simple MMU that needs a certain amount of careful software support but can be implemented in relatively few gates.
Yet To Start
Memory protection unit. Memory can be protected but there is no virtual to physical remapping. This is a variant on soft MMU but has some important differences.
Classic 32bit virtual address space with page tables. May never be relevant to FUZIX anyway.
Programs are allocated a 64K data segment with a hole in the middle. The memory allocator interleaves the holes with other allocations. This is how various early Unix platforms handled the 8086.
Fuzix: because small is beautiful