Directory Size Caching in File Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Electronic devices face inefficiencies in quickly determining the size of directories containing a large number of files, as they currently need to sum the sizes of all files and subdirectories, which can be time-consuming and resource-intensive.

Innovation Solution

An electronic device with a processor and memory that stores data structure information, allowing it to quickly identify the size of a directory by accessing cached information without needing to sum all subdirectories and files, using a tree structure-based data management system.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the electronic device sums the sizes of all files and subdirectories to determine directory size, then the size information is accurate, but the time and computational resources required become excessive

Engineering Contradiction:
Improvedirectory size accuracyVSAvoidtime to calculate directory size
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent applies preliminary action by pre-calculating and storing size information for directories and files in a data structure (such as a tree structure or database) before queries are made. When a user requests directory size information, the system retrieves pre-computed values rather than calculating them in real-time by summing all file sizes. This eliminates the time-consuming aggregation process while maintaining accurate size information.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the essential size information in a separate data structure that mirrors the directory hierarchy. Instead of accessing and summing actual file sizes during queries, the system maintains a parallel structure storing size metadata that can be quickly retrieved. This copying approach allows rapid access to accurate size information without repeatedly processing the actual file contents.

Inventive Principle:
Principle #26Copying

2Loss of information

If the electronic device processes size information for all files in a directory, then complete size data is obtained, but the computational resources and processing power are overloaded

Engineering Contradiction:
Improvecompleteness of size informationVSAvoidcomputational power consumption
Core Design Contradiction:
Loss of informationVSPower

Solution Approach 1:

The patent extracts only the essential size information from the full file system data and stores it in a simplified data structure. Instead of processing all file metadata and contents to determine directory sizes, the system extracts and maintains only the size attributes in a pre-computed format. This extraction reduces computational power requirements while preserving complete size information for all files and directories.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system performs preliminary computation of size information and stores the results for future retrieval. By calculating and caching size data in advance, the system avoids the need for intensive real-time processing when size queries are made, thereby reducing power consumption during normal operations while maintaining complete size information availability.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If the electronic device calculates directory size by aggregating all subdirectory and file sizes, then the size measurement is comprehensive, but the operation becomes inefficient with large numbers of files

Engineering Contradiction:
Improvecomprehensive size measurementVSAvoiddirectory size query efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent implements preliminary computation of directory sizes by pre-aggregating file and subdirectory sizes and storing the results in a data structure that reflects the directory hierarchy. When size queries are made, the system retrieves pre-computed values instantaneously rather than performing aggregation operations at query time. This maintains comprehensive size measurement accuracy while dramatically improving query efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the directory structure as a data model that includes pre-calculated size information for each node. This copied structure allows rapid traversal and size retrieval without accessing the actual file system contents during queries, thereby maintaining comprehensive measurement capability while enhancing operational efficiency for directories containing large numbers of files.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11868401B2Electronic device and method for acquiring size of file or directory stored in file system
Publication Date: 2024.01.09 SAMSUNG ELECTRONICS CO LTD
  • US11868401B2 patent drawing
  • US11868401B2 patent drawing
  • US11868401B2 patent drawing

AI summary

Provided is an electronic device including a file system, a memory, and a processor. The memory stores at least one instruction that instructs, when executed, the processor to receive a request for access to a file or directory stored in a user data area of the file system. In response to the reception of the request, first information associated with the file or directory is store in the memory, and the size of the file or directory is displayed using the first information. When the first information is information associated with the file, the information indicates the size of the file. When the first information is information associated with the directory, the information indicates a sum of the sizes of all subdirectories and all files included in the directory.