Hash-Based Logical Address Allocation for VM Submission Queues
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for logical address allocation in virtual machine units via chain tables are inefficient and resource-intensive, leading to low allocation efficiency and high resource occupation.
Innovation Solution
A hash-based method is employed to allocate logical addresses, utilizing a hash table to quickly determine a target hash bucket and logical address, reducing the need for additional storage space and improving efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a chain table is used to manage logical addresses of virtual machine units, then the system can realize logical mapping from virtual machine to storage medium, but the allocation efficiency is low and resource occupation is high
Solution Approach 1:
The patent changes the data structure parameter from chain table to hash table. This parameter change transforms the address allocation mechanism from sequential traversal to direct indexing, thereby improving allocation efficiency while reducing storage resource occupation.
Solution Approach 2:
The patent replaces the mechanical chain table traversal mechanism with a hash-based direct addressing mechanism. This substitution eliminates the need for sequential searching and reduces the memory overhead associated with chain table nodes, thus improving both efficiency and resource utilization.
2Ease of operation
If a chain table is used for logical address allocation, then mapping functionality is achieved, but additional storage space is consumed for chain table data
Solution Approach 1:
The patent extracts the unnecessary chain table structure from the system and replaces it with a compact hash table. This extraction removes the harmful element (excessive storage consumption) while preserving the essential functionality of logical address mapping and registration.
Solution Approach 2:
The patent changes the storage structure parameter from chain table nodes to hash table buckets. This parameter change significantly reduces the storage space required while maintaining fast access capability, as hash tables provide O(1) average time complexity for insertions and lookups without the overhead of pointer structures.
Data Source
Figure 1
Figure 2
Figure 3~5
AI summary
The disclosure provides a logical address allocation method, apparatus, electronic device and storage medium. The method includes: receiving a first request sent by a target virtual machine unit, the first request being used for registering a logical address of a submission queue entry of the target virtual machine unit; performing a hash operation based on the first request to obtain a first hash value indicating the submission queue entry; acquiring a target hash table corresponding to the target virtual machine unit, and querying the target hash table based on the first hash value to obtain a target hash bucket to which the first hash value belongs; acquiring, based on a hash bucket identification of the target hash bucket, a target logical address corresponding to the hash bucket identification from currently available logical addresses; and registering the target logical address as a corresponding logical address to generate the submission queue entry.