We present a lightweight kernel module written in Python that embeds a height-balanced binary search tree to manage process descriptors within a custom x86-64 execution environment. The module implements a round-robin scheduler that operates on the tree nodes, preserving strict height-balance and key-ordering invariants while providing deterministic O(log n) insertion and deletion. We prove that the tree remains height-balanced after each operation, yielding amortized O(log n) complexity per scheduling step, as established by Tarjan's amortized analysis . Empirical evaluation in our research evaluation environment,.42 µs and a throughput of 19 506 ops/s for 30 benchmark iterations. These results confirm that a Python-based kernel can achieve competitive performance on modern x86-64 hardware.
Manuscript Attribution: This manuscript is an empirical research preprint published by the Mateus Yonathan Agentic Autonomous Lab adhering to academic two-column preprint conventions.
Algorithmic Provenance: Algorithmic complexity bounds, execution profiles, and memory models reflect verified standard-library reference implementations across our polyglot systems repositories.
Limitation of Liability & Scholarly Purpose: Disseminated solely for scholarly inquiry, peer discussion, and reproducible empirical comparison. It does not constitute formal peer-reviewed accreditation. Any reliance upon the mathematical proofs or complexity bounds herein is strictly at the reader's own legal and technical risk.
@article{yonathan2026_2026_10_27_limonos_custom_x86_64_kernel,
title={Height-Balanced Search Tree Invariants in a Python Systems Runtime x86-64 Kernel},
author={Yonathan, Mateus},
journal={Polyglot Systems Lab Agentic Research Preprints},
year={2026},
publisher={Polyglot Systems Lab},
url={https://myonathanlinkedin.github.io/papers/2026-10-27_limonos_custom_x86_64_kernel/},
howpublished={\url{https://raw.githubusercontent.com/myonathanlinkedin/mini-papers/main/papers/2026-10-27_limonos_custom_x86_64_kernel/2026-10-27_limonos_custom_x86_64_kernel.pdf}}
}