Kernel Image Loading with Multi-Core Parallel Decompression
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing methods for loading kernel image files in electronic devices result in excessively long startup times due to slow loading processes, affecting user experience.
Innovation Solution
A method utilizing a multi-core processor with a first core group for data block retrieval and a second core group for parallel decompression, where data blocks are checked and then decompressed simultaneously, forming a pipeline to increase processing speed and reduce loading time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If a single core reads and decompresses the entire compressed kernel image file sequentially, then the loading process is simple to implement, but the loading time becomes excessively long
Solution Approach 1:
The compressed kernel image file is divided into multiple data blocks, and different cores are assigned to process different blocks simultaneously. The file is segmented into chunks that can be processed in parallel, with each core handling specific blocks from the decompression queue.
Solution Approach 2:
The patent transitions from sequential single-core processing to multi-core parallel processing, adding a dimensional aspect of concurrency. Multiple cores operate simultaneously on different data blocks, transforming the time dimension from sequential to parallel execution.
2Reliability
If the entire compressed kernel image file is read and checked before decompression, then data integrity is ensured, but the startup time of the device becomes excessively long
Solution Approach 1:
Data blocks are pre-validated and placed into a decompression queue before actual decompression begins. The validation process prepares data blocks in advance, allowing decompression to start immediately when blocks are ready, rather than waiting for complete file validation.
Solution Approach 2:
The patent implements a continuous pipeline where data blocks are constantly being validated, queued, and decompressed without idle waiting periods. Multiple cores maintain continuous operation by continuously pulling blocks from the queue and processing them, eliminating gaps in the useful work flow.
3Productivity
If parallel decompression is implemented across multiple cores, then loading speed is significantly improved, but the system complexity increases
Solution Approach 1:
A decompression queue acts as an intermediary data structure between the validation stage and the parallel decompression stage. This queue manages the flow of data blocks to multiple cores, coordinating their access and ensuring proper sequencing without requiring complex inter-core communication protocols.
Solution Approach 2:
The patent creates independent copies of data blocks in the decompression queue that can be safely accessed by multiple cores simultaneously. Each core works on its own copy or assigned blocks, avoiding conflicts and race conditions that would otherwise require complex synchronization mechanisms.
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
Embodiments of the present invention disclose a method for fast loading a kernel image file, and the method is executed by a multi-core processor. The multi-core processor is connected to a nonvolatile storage and a memory. The multi-core processor includes a first core group and a second core group. The first core group includes at least one core, and the second core group includes a plurality of cores. The method includes: obtaining, by the first core group, a plurality of data blocks in a compressed kernel image file from the nonvolatile storage; checking, by the first core group each time obtaining a data block, the currently obtained current data block, and when it is checked that the data block is correct, putting, by the first core group, the current data block into a decompression queue; and obtaining, by at least two of the plurality of cores in the second core group when there is a data block in the decompression queue, the data block in the decompression queue, and after obtaining a plurality of data blocks, decompressing the plurality of obtained data blocks into the memory in parallel to finally obtain the kernel image file.