AutoOS: Make Your OS More Powerful by Exploiting Large Language Models

1SKL of Processors, Institute of Computing Technology, CAS
2University of Chinese Academy of Sciences
3Intelligent Software Research Center, Institute of Software

Overview

With the rapid development of Artificial Intelligence of Things (AIoT), customizing and optimizing operating system (OS) kernel configurations for various AIoT application scenarios is crucial for maximizing system performance. However, existing approaches falter due to the overwhelming problem complexity (i.e., over 15,000 configuration options in the Linux kernel), together with the huge evaluation costs and error-prone options that may result in OS boot-up failure, which all make it an unresolved problem to optimize the Linux kernel automatically. In this paper, we introduce AutoOS, a novel framework exploiting Large Language Models for customizing and optimizing OS kernel configurations automatically for various AIoT application scenarios. Inspired by the inherently directory-structured kernel configuration process, we first formulate our research problem as optimizing on a dynamic tree. We then propose a novel framework integrating a state machine-based traversal algorithm as the observeprune-propose-act-correct loop, which can effectively refine the optimization space and ensure a successful OS boot-up. Experimental results show that AutoOS can automatically customize and optimize the OS kernel configurations without human effort. More importantly, AutoOS even achieves better performance by up to 25% than vendor-provided configuration.

An actual example of the optimization on the dynamic tree. (a) The AutoOS framework uses a state-machine-like prompt template with five stages to explore kernel configurations, optimize performance, and ensure successful OS boot-up. (b) An example of how the dynamic tree is traversed.

Main Results

​AutoOS was evaluated across three Linux distributions—PolyOS, Fedora, and Ubuntu—on two hardware platforms: a Hifive embedded development board (RISC-V architecture) and a PC with an Intel Core i7-13700F processor. The evaluation utilized UnixBench and LMbench benchmarks to assess performance improvements.

AutoOS outperforms both default configurations and LLM-Vanilla in AIoT scenarios, achieving performance improvements of up to 25.6% on Fedora and 8.4% on PolyOS. In the general-purpose scenario with Ubuntu, AutoOS achieves a 9.08% overall performance increase。

Here are the optimized configurations on PolyOS, Fedora and ubuntu seperately. The newly added configuration options appear at the end of the file, below the “#////” marker.

Possibility of Achieving Positive Results

AutoOS demonstrates its robustness on Fedora, exploring legal configurations in all 56 search trials, with 26.78% of trials surpassing the default performance. It consistently finds optimized configurations, with the best performance achieved within 24 trials.

Case Study of the Optimized OS Kernel Configuration

Here we present the configuration option modifications that led to a 25.6% performance enhancement for Fedora in our experiments. In the optimal configuration, AutoOS made modifications to a total of 45 kernel options, starting from the default settings.

BibTex

  
@inproceedings{chen2024autoos,
   title={AutoOS: Make Your OS More Powerful by Exploiting Large Language Models},
   author={Huilai Chen and Yuanbo Wen and Limin Cheng and Shouxu Kuang and Yumeng Liu and Weijia Li and Ling Li and Rui Zhang and Xinkai Song and Wei Li and others},
   booktitle={Forty-first International Conference on Machine Learning},
   url={https://github.com/xuewuyinhe/AutoOS},
}