Hot-Cold File Allocation in Electronic Device Memory
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing electronic devices face inefficiencies in managing storage of files due to inadequate classification and handling of hot and cold files, leading to suboptimal use of memory resources and potential fragmentation issues.
Innovation Solution
The electronic device classifies files into hot and cold categories based on write patterns, storing hot files in a variable-sized area and cold files in a fixed-sized area, with mechanisms to dynamically adjust storage based on available space and file attributes, ensuring optimal use of memory resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If files are classified into hot and cold categories and stored in different areas, then storage efficiency is improved, but device complexity increases
Solution Approach 1:
The storage memory is divided into two distinct areas: a first area for storing cold files with fixed block addresses and a second area for storing hot files with variable block addresses. This segmentation allows the system to apply different management strategies to different file types, improving overall storage efficiency while maintaining manageable complexity through clear separation of concerns.
Solution Approach 2:
The system dynamically classifies files as hot or cold based on write patterns and access frequency. Files can be automatically moved between the first and second areas as their access characteristics change. This dynamic adaptation allows the storage system to optimize performance without requiring manual intervention, balancing efficiency gains with automated management.
2Stability of the object's composition
If pinned files are stored in a fixed-size first area, then file address stability is improved, but storage flexibility deteriorates
Solution Approach 1:
The storage system segments files into pinned files (requiring stable block addresses) and non-pinned files (allowing address changes). Pinned files are stored exclusively in the first area with fixed block addresses, while other files can be stored in the second area with variable addresses. This segmentation resolves the contradiction by providing address stability where needed while maintaining flexibility for other files.
Solution Approach 2:
Different storage characteristics are applied to different file types based on their specific requirements. Pinned files receive the quality of fixed block addresses in the first area, while hot files and temporary files receive the quality of variable block addresses in the second area. This local differentiation allows each file type to have optimal properties without compromising the system overall.
3Adaptability or versatility
If hot files are stored in a variable-sized second area, then storage adaptability is improved, but memory fragmentation increases
Solution Approach 1:
The system extracts hot files from the main storage area and places them in a separate second area dedicated to variable-sized file storage. This extraction isolates the fragmentation issue to a specific region, allowing the first area to maintain stable, contiguous storage for cold and pinned files, while the second area handles the dynamic allocation needs of hot files.
Solution Approach 2:
The second area is designed to dynamically adapt to the size and access patterns of hot files. As hot files are created, modified, or deleted, the second area automatically adjusts its allocation, allowing variable block addresses to be assigned and reassigned as needed. This dynamic behavior accommodates storage adaptability while containing fragmentation within the designated variable area.
4Productivity
If files are frequently moved between storage areas, then storage optimization is improved, but operation time increases
Solution Approach 1:
The system implements a feedback mechanism that monitors file access patterns and write frequencies to determine when files should be classified as hot or cold. This feedback-driven classification allows the system to proactively move files between areas based on predicted future behavior, rather than reacting to immediate performance degradation. By anticipating access patterns, the system reduces the frequency of moves and optimizes storage before performance issues arise.
Solution Approach 2:
The system performs preliminary classification of files as they are created or accessed, determining their hot or cold status early in their lifecycle. Files are initially placed in appropriate areas based on their characteristics, and only moved between areas when their access patterns genuinely change. This preliminary action reduces unnecessary moves and associated time losses by establishing appropriate storage locations upfront.
Data Source
AI summary
An electronic device includes, one or more processors; and memory storing instructions, that, when executed by the one or more processors, cause the electronic device to write files of an application to the memory; determine pinned files; classify hot files and cold files, from among remaining files that are not pinned, according to write patterns of the remaining files; store the pinned files and the cold files in a first area of the memory with a fixed size, and store the hot files in a second area of the memory with a variable size; determine, based on available storage space in the first area, files with changeable allocated block addresses in the first area; and move the files from the first area to the second area, and store the pinned files in a space of the first area that is generated based on moving the files.


