Evaluating LLM Reasoning on Operating System Algorithms via Step-Level Verification

Jalluri Mahesh Kumar, Junjunoori Sri Chakri, Yash Kothari, Murari Mandal, Yash Sinha, Dhruv KumarCTB @ ICML 2026

TL;DR

This paper introduces SVAC, a novel benchmark for evaluating Large Language Models' (LLMs) ability to perform step-by-step reasoning on operating system algorithms. The benchmark reveals that while LLMs can handle simple algorithmic tasks, they struggle with maintaining state and avoiding error cascades in more complex scenarios, with surprising results regarding the effectiveness of chain-of-thought prompting.

What Problem Does This Paper Address?

Modern LLMs are increasingly being applied to tasks requiring logical reasoning, but existing benchmarks often focus on final answers rather than the intermediate reasoning process. This is particularly problematic for domains like operating system (OS) algorithms, which involve sequential, stateful operations. It's unclear if LLMs can faithfully trace these algorithms step-by-step, maintaining internal state and correctly propagating it through dozens of operations. The authors aim to fill this gap by creating a benchmark that specifically tests this procedural reasoning fidelity.

Methods

The core of the paper is the SVAC (Step-Level Verification of Algorithm Correctness) benchmark. SVAC evaluates LLMs on three canonical OS resource-management algorithm families: page replacement, process scheduling, and disk scheduling. For each problem instance, LLMs are tasked with generating a complete, step-by-step execution trace in JSON format. Crucially, models are forbidden from using code or external tools, forcing them to rely on symbolic reasoning.

SVAC employs:

  • Deterministic Ground Truth: For each algorithm and instance, a ground-truth trace is generated by a deterministic solver. This allows for precise, step-level comparison.
  • Fine-Grained Scoring: Models are evaluated on metrics like Step Accuracy (SA), First Error Position (FEP), and Error Cascade Rate (ECR), providing detailed insights into where and how reasoning breaks down.
  • Complexity Levels: Instances are generated across five complexity levels, increasing parameters like reference string length, number of frames, process count, and request queue length.
  • Prompting Strategies: The benchmark tests three prompting strategies: zero-shot, few-shot (one example), and chain-of-thought (CoT), to understand how different prompting methods affect performance.
  • Domain-Specific Error Taxonomies: Detailed error categories are defined for each algorithm family to diagnose specific failure modes.

Datasets

The paper introduces the SVAC benchmark, which comprises synthetic instances for three OS algorithm families:

  • Page Replacement: FIFO, LRU, OPT, Clock.
  • Process Scheduling: SJF, Round Robin, MLFQ.
  • Disk Scheduling: FCFS, SSTF, SCAN, C-SCAN, LOOK.

These instances are generated with varying complexity levels and locality modes to probe different aspects of algorithmic reasoning. No pre-existing datasets were used for evaluation; SVAC is a newly created benchmark.

Key Insights and Ideas

  • The "Degradation Cliff": LLMs don't fail gradually with increasing complexity. Instead, there's often a sharp "cliff" where performance plummets after a certain threshold (e.g., between complexity levels 2 and 3 for page replacement). This suggests a hard limit on their working memory or state-tracking capacity.
  • Error Cascades are Dominant: Once an LLM makes a single mistake in an OS algorithm trace, subsequent steps are highly likely to be incorrect as well. This "error cascade" highlights the brittle nature of procedural reasoning in these models.
  • Chain-of-Thought is Harmful (Sometimes): Counterintuitively, the popular chain-of-thought prompting strategy, often beneficial for reasoning tasks, actively hurts performance on CPU and disk scheduling. This suggests that the "thinking" steps can introduce spurious state changes or errors rather than correcting them in these specific domains.
  • Algorithm-Specific Vulnerabilities: Different algorithms expose unique weaknesses. For instance, OPT (page replacement) is uniformly difficult due to its lookahead requirement, while LOOK (disk scheduling) trips up models that confuse its reversal logic with SCAN's.
  • Prompting Matters, but Not Universally: While few-shot prompting generally performs well, the effectiveness of zero-shot and CoT varies significantly across algorithm families.

Key Results

  • Step Accuracy Degradation: Step Accuracy (SA) consistently decreases with increasing complexity across all models and algorithm families. For example, in page replacement, SA can drop from over 90% to below 20% as complexity increases.
  • Error Cascade Rates are High: Error Cascade Rates (ECR) are consistently high, often exceeding 0.9 at higher complexity levels, confirming the brittleness of LLM traces.
  • Model Performance Varies: Models like grok-4.1-fast and deepseek-v3.2 show better resilience to complexity than others like gemma-3-27b-it.
  • Prompting Strategy Impact: Few-shot prompting generally yields the best results. Chain-of-thought prompting leads to the lowest accuracy for CPU and disk scheduling, sometimes falling below zero-shot performance.
  • Failure Modes: Common failure modes include hit/miss misclassification, incorrect eviction choices, frame state corruption, and premature termination of traces.

Limitations and Future Work

  • Limited Scope: The benchmark currently focuses on three specific OS algorithm families. Future work could expand SVAC to include other OS concepts or different domains requiring procedural reasoning.
  • Synthetic Data: While controlled, the use of synthetic data might not fully capture the nuances of real-world scenarios.
  • Model Families: The evaluation covers a selection of LLMs; a broader range of models could provide more comprehensive insights.

The authors suggest that SVAC can serve as a valuable tool for future research into improving LLM procedural reasoning, understanding their limitations, and developing more robust AI systems for technical domains.

Summary updated

BibTeX
@inproceedings{kumar2026evaluating,
  author = {Jalluri Mahesh Kumar and Junjunoori Sri Chakri and Yash Kothari and Murari Mandal and Yash Sinha and Dhruv Kumar},
  title = {{Evaluating LLM Reasoning on Operating System Algorithms via Step-Level Verification}},
  booktitle = {CTB @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=VD46qztSQe},
}
Figure