Storage Allocation for Data Fragmentation Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current file systems face inefficiencies in data storage due to staggered distribution of data at physical addresses, leading to high fragmentation rates and decreased performance, especially with frequent file creation and deletion.
Innovation Solution
A method and system that dynamically determine a file assignment mode and granularity, allocating storage regions in consecutive physical addresses based on file type, content, or format to optimize storage efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Device complexity
If one file system block is allocated at one time, then storage allocation is simple, but data distribution becomes staggered and fragmentation increases
Solution Approach 1:
The system performs preliminary actions by pre-calculating the total data size of files to be stored and pre-allocating continuous storage regions before actual data writing. This prevents staggered distribution and fragmentation by ensuring that all necessary storage blocks are reserved in advance as a continuous range, rather than allocating one block at a time during the writing process.
2Ease of manufacture
If storage regions are allocated sequentially, then allocation process is simple, but read/write performance decreases due to fragmentation
Solution Approach 1:
The system performs preliminary actions by pre-calculating the total data size of files to be stored and pre-allocating continuous storage regions before actual data writing. This prevents staggered distribution and fragmentation by ensuring that all necessary storage blocks are reserved in advance as a continuous range, rather than allocating one block at a time during the writing process.
Solution Approach 2:
The system dynamically adjusts the granularity of storage region allocation based on file characteristics such as file size and access patterns. For large files or files requiring high performance, the system allocates larger continuous storage regions, while for smaller files, it uses finer granularity. This dynamic adaptation optimizes both allocation simplicity and read/write performance for different scenarios.
3Adaptability or versatility
If multiple files are stored with staggered distribution, then file creation is flexible, but fragmentation rate increases and search time increases
Solution Approach 1:
The system performs preliminary actions by pre-calculating the total data size of files to be stored and pre-allocating continuous storage regions before actual data writing. This prevents staggered distribution and fragmentation by ensuring that all necessary storage blocks are reserved in advance as a continuous range, rather than allocating one block at a time during the writing process.
Solution Approach 2:
The system merges multiple small storage allocations into a single continuous storage region by pre-calculating the total space needed and allocating it as one contiguous block. This combining approach maintains file creation flexibility while eliminating the fragmentation and magnetic head search time penalties associated with staggered distribution of multiple separate blocks.
Data Source
AI summary
The present disclosure relates to a system and method for managing the storage of files in a storage medium of a computing device. The method may comprise detecting a file to be stored in the storage medium. The method may also comprise determining a file assignment mode and a granularity, wherein the granularity includes at least two file system blocks occupying consecutive physical addresses of the storage medium. The method may further comprise allocating one or more storage regions for storing the file based at least on the file assignment mode and the granularity, and storing the file into the allocated one or more storage regions.


