rOS-Instrumentation: An observer of operating system transactions - Fengshan Shen; Mingyuan Jiu (SoftwareX)
Instrumentation is a crucial technique for accurately and comprehensively observing the concurrent behavior of operating systems. The omission of certain key behaviors can lead to incomplete or inaccurate understanding. This paper presents the source-level instrumentation module rOS-Instrumentation for the teaching-oriented operating system rCore. The module adopts a layered design strategy to achieve dependency separation, decomposing the instrumentation functionality into functions with varying degrees of reliance on the kernel. The inner-layer stub functions, which weakly depend on the kernel, can operate in more host functions, capturing events where critical kernel functions such as interrupt handling and output are executed. Meanwhile, the outer-layer output functions, which are more kernel-dependent, output the kernel function execution information recorded in memory by the stub functions at safe locations. The rOS-Instrumentation module features low dependency on kernel functionality, zero reliance on non-native development toolchains, no installation or configuration required, ease of compilation, and low technical barriers to use and customization. Users only need to reference the module name and call the user interface functions provided by the module to utilize its functionality seamlessly. Customization can be achieved by merely modifying the stub point information table within the module.