Skip to content

LHY-24/BYOS

Repository files navigation

BYOS: Knowledge-driven Large Language Models Bring Your Own Operating System More Excellent

Official resources of "BYOS: Knowledge-driven Large Language Models Bring Your Own Operating System More Excellent ". Hongyu Lin, Yuchen Li, Haoran Luo, Kaichun Yao, Libo Zhang, Mingjie Xing, Yanjun Wu. [paper]

License

Overview

Framework

BYOS (Bring Your Own Operating System more excellent) is a novel knowledge-driven framework that automates Linux kernel tuning using Large Language Models (LLMs). BYOS achieves 7.1%-155.4% performance improvements over default configurations across standard benchmarks and real-world applications.

Key Features

  • 🏗️ Structured Knowledge Construction: Dual-layer Knowledge Graph (OD-KG) bridges high-level tuning objectives with low-level config options.
  • 🧠 Knowledge-driven Configuration: Mitigates LLM hallucinations through graph-guided reasoning.
  • 🔄 Continuous Knowledge Maintenance: Incremental updates adapt to rapid kernel evolution.
  • 🚀 Performance Gains: Up to 155.4% improvement on UnixBench, 42.7% latency reduction in Nginx.

Installation

git clone https://github.com/LHY-24/BYOS.git
cd BYOS
pip install -r requirements.txt

Quick Start

1. Init environment

# replace your OpenAI key (and base_url) in Config.py file and init_env.sh
source init_env.sh
# downloads linux kernel source code from https://www.kernel.org/pub/linux/kernel/. Use v6.2.16 as an example.
wget https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.2.16.tar.gz
tar -zxf https://www.kernel.org/pub/linux/kernel/v6.x/linux-6.2.16.tar.gz

2. Initialize the knowledge base:

python3 build_kg.py /path/to/linux/kernel/source_code

3. Run kernel tuning:

python3 BYOS.py /path/to/linux/kernel/source_code -t "Your optimize target" -o "config output filename"

4. Apply configurations:

Move the config generated by Step 3 to linux source code directory and rename it to ".config". Then compile the linux kernel.

mv config_output /path/to/linux/kernel/source_code/.config

Citation

@misc{lin2025byosknowledgedrivenlargelanguage,
      title={BYOS: Knowledge-driven Large Language Models Bring Your Own Operating System More Excellent}, 
      author={Hongyu Lin and Yuchen Li and Haoran Luo and Kaichun Yao and Libo Zhang and Mingjie Xing and Yanjun Wu},  
      year={2025},
      eprint={2503.09663},
      archivePrefix={arXiv},
      primaryClass={cs.OS},
      url={https://arxiv.org/abs/2503.09663}, 
}

Feedback

Contributions and feedback are greatly appreciated! Whether you've found a bug, have a question, or want to suggest improvements, please open an issue. Your input helps make BYOS better for everyone.

For further questions, please contact: hongyu2021@iscas.ac.cn, liyuchen2021@iscas.ac.cn, luohaoran@bupt.edu.cn.

Acknowledgements

This repo benefits from AutoOS and LightRAG. Thanks for their wonderful works. 

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •