Dual Mode OS Memory Locking for Real-Time Performance
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Paging mechanisms in computing devices can interfere with real-time operations due to unpredictability and the time required for memory access, making it incompatible with real-time systems, particularly in devices like smart phones that require timely processing.
Innovation Solution
Implementing real-time and non-real-time versions of operating system services, with memory pages used by real-time services locked to prevent paging out, ensuring real-time applications and processes utilize the real-time versions of these services.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If memory paging is implemented to manage virtual memory efficiently, then memory management capability is improved, but real-time performance deteriorates due to unpredictable page faults
Solution Approach 1:
The operating system is segmented into real-time and non-real-time versions. The real-time OS version manages memory pages that require deterministic access, while the non-real-time version handles pages that can tolerate paging delays. This segmentation allows the system to maintain both efficient memory management and reliable real-time performance by isolating real-time processes from page fault interruptions.
2Quantity of substance
If demand paging is used to copy memory blocks from secondary storage to RAM, then memory utilization is improved, but access time increases due to the copying process
Solution Approach 1:
Memory pages required by real-time processes are pre-loaded into RAM before they are needed, and their status is locked to prevent paging out. This preliminary action ensures that when real-time processes need to access these pages, the data is already in fast memory and will not be paged out, eliminating access time delays while still allowing demand paging for non-real-time processes.
3Reliability
If memory pages are locked to prevent paging out for real-time operations, then real-time reliability is improved, but memory availability deteriorates due to reduced paging flexibility
Solution Approach 1:
Memory locking is applied locally and selectively only to pages required by real-time processes, rather than locking entire memory regions or all pages. This local quality approach ensures that real-time reliability is maintained for critical pages while leaving other memory pages available for normal paging operations, thus preserving overall memory availability and system adaptability.
Data Source
AI summary
A computing device which runs non-pageable real time and pageable non-real time processes is provided with non-pageable real time and pageable non-real time versions of operating system services where the necessity to page in memory would block a real-time thread of execution. In one embodiment, a real time operating system service has all its code and data locked, and only supports clients that similarly have their code and data locked. This ensures that such a service will not block due to a page fault caused by client memory being unavailable. A non-real time operating system service does not have its data locked and supports clients whose memory can be paged out. In a preferred embodiment servers which are required to provide real time behaviour are multithreaded and arrange for requests from real time and non-real time clients to be serviced in different threads.


