Memory management

From Embedded Xinu
Revision as of 20:32, 29 July 2009 by Michael (talk | contribs) (Added stubs for memory management page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Memory management is an important aspect of any operating system, as such Embedded Xinu makes use of some aspects of the underlying hardware to build up a simple to understand memory management system.

Memory Allocators

Embedded Xinu uses two main memory allocators that work in tandem to provide dynamic memory to both kernel and user software.

Kernel Allocator

The kernel allocator trusts the programmer to keep track of accounting information on the stack and provides no mapping or protection.

User Allocator

The user allocator stores accounting information adjacent to the allocated memory and provides distinct address spaces for each running thread.

Region Allocator

The region allocator runs below the user allocator and provides more page aligned memory regions upon request.

Memory Protection

Since Embedded Xinu has limited resources to work with it does not provide a virtual memory system. It does take advantage of separate address spaces for each user thread running in the system, which provides simple memory protection for low overhead costs.

Translation Lookaside Buffer

To facilitate memory protect Embedded Xinu uses the translation lookaside buffer (TLB) build into the MIPS processors of the WRT54GL series of routers.