Memory Overlay Dirty Bit Tracking for Embedded Multitasking
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multitasking systems, the existing memory management schemes, particularly in embedded systems, face challenges with high costs and inefficiencies due to the use of virtual memory schemes, which are not suitable for real-time computing and induce overheads in data processing, especially when dealing with limited internal memory capacity.
Innovation Solution
A memory overlay apparatus and method utilizing an internal memory with a dirty bit to identify changed areas, a memory management unit for storing only changed data in external memory, and a DMA management unit for efficient data transfer between internal and external memory, ensuring that only used data is stored and restored, thereby optimizing memory usage during task switching.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Quantity of substance
If virtual memory scheme is used for memory management, then memory capacity is increased, but system cost increases due to paging hardware requirements
Solution Approach 1:
The memory management system is segmented into two distinct parts: internal memory for active task data and external memory for overlay data. This segmentation allows the system to avoid virtual memory hardware by using software-controlled overlay pages, where each task's data is divided into manageable overlay pages that can be independently loaded into internal memory as needed.
Solution Approach 2:
The overlay memory management unit acts as an intermediary between the CPU and the two-memory system. It handles all memory access requests, determines whether data resides in internal or external memory, and performs data transfer when necessary. This intermediary layer eliminates the need for complex paging hardware by providing software-based virtual memory functionality.
2Speed
If all task data is stored in internal memory, then data access speed is improved, but internal memory capacity requirements increase
Solution Approach 1:
The system dynamically manages memory allocation by loading only the necessary overlay pages into internal memory based on current task requirements. When a task switches, the system dynamically determines which overlay pages need to be retained in internal memory and which can be moved to external memory, optimizing the balance between access speed and memory capacity utilization.
Solution Approach 2:
The system changes the memory residence parameter of task data based on usage patterns. Frequently accessed data remains in internal memory for fast access, while less frequently accessed overlay data is moved to external memory. The dirty bit mechanism tracks parameter changes in data, enabling intelligent decisions about when to keep or move data between memory levels.
3Productivity
If overlay scheme is used to share internal memory, then memory efficiency is improved, but data transfer overhead increases
Solution Approach 1:
The system extracts only the changed portions of data (indicated by dirty bits) when moving overlay pages between internal and external memory. Instead of transferring entire data structures or fixed-size pages, the system identifies and transfers only the modified data regions, significantly reducing data transfer overhead while maintaining memory efficiency benefits of the overlay scheme.
Solution Approach 2:
The system performs partial data transfer by moving only the necessary portion of overlay data between memory levels. When an overlay page is moved from internal to external memory, only the changed data (marked by dirty bits) is transferred, rather than the entire page. This partial action approach minimizes transfer overhead while maintaining the productivity benefits of overlay memory sharing.
4Manufacturing precision
If dirty bit tracking is implemented for all memory addresses, then data transfer precision is improved, but memory structure complexity increases
Solution Approach 1:
The dirty bit mechanism adds a new dimension to the memory structure by incorporating a status bit for each memory address. This additional dimension tracks the modification state of data without fundamentally changing the core memory architecture. The dirty bit serves as a metadata layer that enables precise tracking of changed data while maintaining compatibility with existing memory structures and access patterns.
Data Source
AI summary
A memory overlay apparatus includes an internal memory that includes a dirty bit indicating a changed memory area, a memory management unit that controls an external memory to store only changed data so that only data actually being used by a task during overlay is stored and restored, and a direct memory access (DMA) management unit that confirms the dirty bit when the task is changed and that moves a data area of the task between the internal memory and the external memory.


