Page Table Dirty Bit Management via Write Permission Override
Solution Overview
Problem
Existing data processing systems face challenges in managing dirty status of pages in memory, as hardware-based and software-based approaches are incompatible, leading to inefficiencies and complexity, especially in shared virtual memory systems.
Innovation Solution
The introduction of a dirty-bit-modifier flag allows overriding of the write permission flag to permit writes and change its status, enabling both hardware and software-based management approaches to coexist, with atomic operations ensuring data integrity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If hardware-based management of dirty status is used, then speed is improved, but device complexity increases
Solution Approach 1:
The memory management system automatically updates the dirty bit status through hardware mechanisms when pages are modified, without requiring manual intervention or complex software handling. The first write access to a page automatically sets the dirty bit in the page table entry, enabling the system to self-manage the dirty status tracking.
2Device complexity
If software-based management of dirty status is used, then hardware complexity is reduced, but processing speed decreases
Solution Approach 1:
The system pre-sets the write permission flag to restricted status when pages are loaded into memory. This preliminary action enables the hardware to automatically detect and trap the first write access, setting the dirty bit without requiring software intervention. Subsequent writes are permitted without triggering exceptions, maintaining high performance.
3Adaptability or versatility
If hardware-based and software-based management are mixed in shared virtual memory systems, then adaptability is improved, but system compatibility deteriorates
Solution Approach 1:
The page table entry structure is designed to be universal, incorporating fields that support both hardware-based and software-based dirty status management approaches. The write permission flag and dirty bit mechanism can function in either mode or a combination thereof, allowing different processing circuits to coexist in shared virtual memory systems without compatibility issues.
Data Source
Figure 1~2
Figure 3~4
Figure 5~6
AI summary
Page table data for each page within a memory address space includes a write permission flag and a dirty-bit-modifier flag. The write permission flag is initialised to a value indicating that write access is not permitted. When a write access occurs, then the dirty-bit-modifier flag indicates whether or not the action of the write permission flag may be overridden. If the action of the write permission flag may be overridden, then the write access is permitted and the write permission flag is changed to indicate that write access is thereafter permitted. A page for which the write permission flag indicates that writes are permitted is a dirty page.