Dual-Read-Write Cache Management for Dynamic Memory Allocation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The limited cache capacity in computing devices restricts data processing capability, and pre-allocated memory space for potential services often goes unused, leading to wasted resources.
Innovation Solution
Implementing a dual-cache system comprising a read-only cache and a readable/writable cache, where the read-only cache is dynamically adjusted based on memory usage, allowing the reserved space for other services to be utilized efficiently, thereby enhancing data processing efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If pre-allocated memory space is reserved for potential services, then service readiness is improved, but cache capacity is reduced and resources are wasted
Solution Approach 1:
The patent implements dynamic adjustment of the read-only cache size based on actual memory usage. The system monitors memory consumption and automatically expands or contracts the read-only cache portion, allowing the memory space to transition between being dedicated to services or being used as cache, thereby resolving the contradiction between service readiness and cache capacity
Solution Approach 2:
The patent creates a multi-functional memory space that can serve dual purposes: it can be configured as read-only cache for performance-critical data or as service memory when needed. This universal memory space eliminates the need for separate dedicated service memory, allowing the same physical memory to fulfill different functions based on system requirements
2Productivity
If cache size is increased to improve data processing capability, then productivity is improved, but device complexity increases
Solution Approach 1:
The patent divides the cache into two distinct segments: read-only cache for frequently accessed data and writable cache for data that needs to be modified. This segmentation allows each portion to be managed independently with appropriate access controls, simplifying the overall cache management while maintaining high data processing capability through optimized data placement
Solution Approach 2:
The patent introduces a cache manager as an intermediary component that automatically handles the complexity of cache management. The cache manager monitors memory usage, dynamically adjusts cache sizes, and coordinates data placement between the read-only and writable cache portions, thereby enabling increased productivity without proportionally increasing user-visible complexity
Data Source
AI summary
Embodiments of the present disclosure relate to methods and devices for managing cache. The method comprises in response to receiving a read request, determining whether data associated with the read request is present in a first cache, the first cache being a read-only cache. The method also comprises in response to a miss of the data in the first cache, determining whether the data is present in a second cache, the second cache being a readable and writable cache. The method further comprises: in response to hitting the data in the second cache, returning the data as a response to the read request; and reading the data into the first cache.


