Multi-Level Hash Table Directory Entry Lookup
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing directory entry lookup methods in storage devices require data structures that lead to inefficiencies, such as wasted storage space due to pre-allocated maximum filename lengths and the need for indexing structures, especially when dealing with large numbers of files and directories.
Innovation Solution
A multi-level hash table is used for directory entry lookup, where directory entries are stored without a traditional indexing structure, allowing for quick lookup by calculating a hash value that reflects both the target filename and the lookup level, and incrementing the level if the entry is not found, thereby avoiding the need for pre-allocated storage and minimizing waste.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If a hash table is used for directory entry lookup, then lookup speed is improved, but storage space is wasted due to pre-allocated maximum filename lengths and empty directory entries
Solution Approach 1:
The patent segments the directory entry storage into fixed-size slots organized in a hash table structure. Each slot can independently store a directory entry or remain empty, allowing efficient lookup while managing storage allocation in discrete units rather than continuous pre-allocation.
Solution Approach 2:
The patent changes the storage parameter from pre-allocated maximum filename lengths to fixed-size slots that can accommodate variable-length filenames through compact representation. This allows the storage system to adapt to actual filename lengths rather than reserving space for maximum possible lengths.
2Loss of substance
If a tree-based search method is used to solve hash collision problems, then storage space for empty directory entries is reduced, but lookup performance deteriorates for very large numbers of directory entries
Solution Approach 1:
The patent divides the hash table into multiple levels, where each level contains multiple buckets. This segmentation allows the system to maintain constant-time lookup O(1) by distributing entries across multiple slots at each level, avoiding the logarithmic time complexity O(log n) of tree-based methods while still efficiently managing storage space.
3Stability of the object's composition
If traditional indexing structures are used for directory entries, then data organization is improved, but device complexity increases due to additional data structures required
Solution Approach 1:
The patent makes the storage slots serve multiple functions: they act as both the storage container for directory entries and the indexing structure itself. The hash table with its array of slots provides both data organization and lookup functionality in a single structure, eliminating the need for separate indexing mechanisms.
Solution Approach 2:
The hash table structure is self-organizing and self-sufficient. The slots automatically provide both storage and indexing functions through the hash function mapping, without requiring external indexing structures or additional management overhead.
Data Source
AI summary
A storage device, a directory entry lookup method for the storage device, and a host running the method can provide a quick directory entry lookup. The host includes an interface for exchanging data with the storage device which stores a multi-level hash table comprising directory entries of each directory, and a file system module receiving a file lookup command designating a target directory and a target filename, calculating a hash value which reflects the target filename and a lookup level, and searching for a directory entry which comprises the target filename in a bucket corresponding to the hash value from among buckets at the lookup level which are included in a multi-level hash table of the target directory. If the search for the directory entry fails, the file system module increases the lookup level and again calculates the hash value and searches for the directory entry for the target filename.


