| With the rapid development of electronic communications technology and computing technology, network embedded systems, especially CPS (Cyber Physical System), has become a major research area at home and abroad, and CPS node operating system is a key trend of the research. Thereinto, file system as an important part of CPS node operating system, has a high value in development of society and scientific research. Therefore designing and implement a file system, which fits for hardware resource limitations and the requirements of CPS node operating system, is the main objective of this paper.Based on the research and analysis of existing storage management technologies, combining with requirements of node operating system, research objects in file system design of node operating system, including real-time, reliability, expandability and energy-efficient, were summarized and proposed. In order to improve real-time and reliability of file system, this paper proposes and implements a mapping management strategy which integrates virtual sector and cascading log, allowing files to grow dynamically. Also this paper presents file system hardware abstraction and data aging method to further improve the expandability of the file system and data viability in the local storage.Firstly, based on referring to a mass of relevant literatures both here and abroad, this paper thoroughly studies the existing wireless sensor networks and storage management technologies, analyses and indicates their defects. Secondly, based on the detailed analysis of storage requirements and characteristics of CPS node operating system, classification of data on sensor nodes are proposed, with a feasibility analysis of building log-structured file system on flash of sensor node. Again, for expandability requirements of file system, hardware abstraction of storage is built. And based on this, critical design strategies, including virtual sector mapping, cascading log and data aging are proposed to guarantee the predictability of file operation’s time and reliability of file system. Meanwhile, this paper presents and implements a three-levels failure recovery mechanism, and other design strategies, such as buffer management, storage compression, error-handling and so on, are also reasonably applied in our file system, with best effort to achieve wear-leveling mechanism. Finally, theoretical analysis and simulation experiment results prove that the file system designed in this paper is basically to meet the research objectives and the requirements of CPS node operating system, with merit of further research and practical application. |