| Registry is a hierarchinal database developed by Microsoft that stores software configuration settings, hardware information and some kernel tuning parameters. In Linux and FreeBSD, there are no native registry-like configuration storage systems, which lead to a lot of inconvenience to the development of advanced applications. For example, gnome3 developers had to develop a configuration storage system dconf in order to make gnome desktop environment support some advanced fetures(i.e. real-time monitoring of software configuration changes). So it is necessary to develop a registry system under UNIX sytems.This thesis’ s goal is to implement a registry system on Linux and FreeBSD platforms. The system is implemented as a file system to provide a registry-like system service and it must support concurrent access and cost little system resources.This thesis first describes the basic concepts of file systems, the principles and difficulties when developing a new file system, and analyzes the kernel memory management and VFS layer design between Linux and Free BSD. By reading kernel source code of WRK and ReactOS, this thesis next figure out the classical registry core concepts, disk data structure, in-memory data structures, as well as details of data structure management.Then this thesis shows our main considerations when degisn RegFS, describes the final system design and the overall framework figure in detail, and gives a brief introduction to each RegFS module.The RegFS system follows a hierarchical design. The upper layer is responsible for maintenance of specific RegFS data structures regardless of specific operating system version. The lower layer is responsible for hidden the operating system-related functions and disk I/O operations. This thesis shows the upper layer and lower layer implementation in detail, and by using explanation for some system execution processes, we can get a clean undertand of how the internal data structures are maintained.Finally in this paper we test the RegFS performance. The experimental result shows that compared with the traditional file system, under the same test scenario, RegFS has no less performance and consumes fewer system resources. |