{
  "slug": "anticipatory-scheduling",
  "term": "Anticipatory scheduling",
  "aliases": [
    "anticipatory disk scheduling"
  ],
  "definition": "Anticipatory scheduling briefly delays dispatch to wait for another request from a process whose I/O queue has just become empty.",
  "note": "A synchronous reader may need a short computation after completion before submitting its next read. Immediately serving another process can force an avoidable head seek, even with pending work elsewhere. This temporary absence of the desired request is deceptive idleness. [iyer2001]\n\nUnlike prefetching, anticipation waits for a demand request instead of guessing and issuing its read. The original framework wraps a scheduling policy with adaptive waiting heuristics; seek reduction and proportional service need different criteria. [iyer2001]\n\nLinux 6.16 BFQ retains idling for selected synchronous queues. On flash with internal command queueing, it may sacrifice throughput for latency or fairness. With strict_guarantees disabled, writing slice_idle=0 disables idling; it is not a universal performance fix. [bfq616] [bfq-source]\n\nA zero slice_idle readback alone does not prove disabled idling. A sub-millisecond slice_idle_us value truncates to zero milliseconds, and strict mode takes precedence over the zero-interval check. Inspect both tunables and strict_guarantees. [bfq-source]\n\nFIOS applies anticipation to flash fairness rather than seek reduction. It can delay an epoch switch while a task has unused timeslice, or delay a write while waiting for a reader. Its waiting budget follows a configured idle-time fraction, and the waiting cost is charged to the anticipating task. [fios2012]\n\nAntfarm explores process-aware anticipation across guests; inferred process identity and read attribution have separate limitations. [antfarm2006]",
  "status": "research",
  "advantages": [],
  "limitations": [
    {
      "text": "Waiting consumes device time when the expected request does not arrive soon enough.",
      "citationIds": [
        "iyer2001"
      ]
    }
  ],
  "related": [
    "io-scheduler",
    "bfq",
    "readahead",
    "work-conserving-scheduler",
    "flashfq",
    "fios",
    "antfarm"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-02",
  "citations": [
    {
      "id": "fios2012",
      "title": "Park and Shen. FIOS: A Fair, Efficient Flash I/O Scheduler. FAST 2012, section 4.4.",
      "url": "https://www.cs.rochester.edu/u/kshen/papers/fast2012.pdf",
      "accessed": "2026-11-08"
    },
    {
      "id": "iyer2001",
      "title": "Iyer and Druschel. Anticipatory scheduling: A disk scheduling framework to overcome deceptive idleness in synchronous I/O. SOSP 2001, sections 2-5.",
      "url": "https://www.sosp.org/2001/papers/iyer.pdf",
      "accessed": "2026-11-08"
    },
    {
      "id": "bfq616",
      "title": "Linux 6.16: BFQ, device idling, slice_idle and strict_guarantees",
      "url": "https://docs.kernel.org/6.16/block/bfq-iosched.html",
      "accessed": "2026-11-08"
    },
    {
      "id": "hesela",
      "title": "Hesela: Sharing an SSD: who pays for the slowdown?",
      "url": "https://hesela.com/analyses/ssd-fairness-shared-queues/",
      "accessed": "2026-11-08"
    },
    {
      "id": "bfq-source",
      "title": "Linux v6.16: bfq-iosched.c, bfq_better_to_idle and slice_idle show/store functions",
      "url": "https://github.com/torvalds/linux/blob/v6.16/block/bfq-iosched.c",
      "accessed": "2026-12-02"
    },
    {
      "id": "antfarm2006",
      "title": "Jones, Arpaci-Dusseau and Arpaci-Dusseau. Antfarm: Tracking Processes in a Virtual Machine Environment. USENIX ATC 2006, sections 4, 6 and 7.",
      "url": "https://www.usenix.org/legacy/events/usenix06/tech/full_papers/jones/jones_html/index.html",
      "accessed": "2026-12-02"
    }
  ],
  "provenance": [
    "The 2001 experiments used FreeBSD 4.3 and rotating disks; their gains are not predictions for present-day SSDs. [iyer2001]",
    "This entry describes a research framework and its scheduling principle, not an available scheduler name in every current kernel.",
    "Primary-source synthesis only; no hardware benchmark or paper replication was performed."
  ]
}
