Font Size: a A A

SQLite Database Porting And Optimizing Based On SpaceOS2 Operating System

Posted on:2022-01-03Degree:MasterType:Thesis
Country:ChinaCandidate:J Q HuFull Text:PDF
GTID:2518306605989329Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
With the continuous development of China's aerospace technology,the system functions of On-board embedded computers are becoming more and more complex,and the forms and types of tasks performed are becoming more and more diverse.Under the background of limited computing and storage resources,how to efficiently analyze and manage the stored data has become a new challenge.Embedded database is a kind of software that is directly embedded in the application program with zero configuration,light weight,and high efficiency.It can solve the problem of insufficient statistical analysis ability of a single file system for a large amount of data,and effectively reduce the complexity of application development,and improve the performance and stability of the application program.The SQLite database was transplanted to the On-board embedded real-time operating system Space OS2 based on the actual project requirements,combined with the limited resources of the On-board embedded computer.The SQLite database was successfully run on the Mars rover computer,and it's performance optimization design is carried out.The system structure of SQLite database and SQL execution process are analysed in detail,as well as the kernel structure of Space OS2 operating system and the underlying implementation of YAFFS2 file system.According to the software transplantation theory,the transplantation method of SQLite database on the Space OS2 operating system is given,including the replacement of the memory allocation system,the replacement of the mutex system,and the reconfiguration and realization of the virtual file system.The SQLite database is successfully transp Tlanted to the Space OS2 operating system,and runs normally on the rover computer,which verifies the correctness and effectiveness of the transplantation method.SQLite is also optimized for performance.This paper proposes a database engine similar to SQLite,SQL-KV,which uses the data structure based on LSM tree,while retaining the interface of SQLite.Through the SQLite interface,SQL-KV can be used by existing applications without any modification.The SQL-to-KV compiler can solve the problem of semantic mismatch and efficiently convert SQL statements into K/V operations.Coordinated read cache can effectively manage memory fragmentation,reduce data management differences between front-end SQLite statements and back-end data organization,cache query results,and improve performance of hot data query.Aiming at the problem of limited memory resources of On-board embedded computers,the metadata management scheme was redesigned to reduce the demand for memory.Experiments show that the write performance of SQL-KV can reach 6.9 times of SQLite,and the read performance can reach7.7 times of SQLite.
Keywords/Search Tags:embedded system, operating system, SQLite, software transplant, performance optimization
PDF Full Text Request
Related items