{
  "slug": "freeblock-scheduling",
  "term": "Freeblock scheduling",
  "aliases": [],
  "definition": "Freeblock scheduling fits background HDD transfers into predicted rotational delays while aiming to preserve the next foreground transfer's timing.",
  "note": "The foreground request is selected first; background work uses the remaining positioning opportunity. Extra seeks consume some of that opportunity. This is not simply waiting until the request queue is empty. [freeblock2000]\n\nLarge sets of unordered blocks give the scheduler more choices. The last blocks of a scan can be awkward to reach; promoting them to foreground priority trades scan completion against foreground interference. [freeblock2000]\n\nThe FAST 2002 external prototype used limited command queueing and adjacent-request merging to handle timing and drive-cache behavior. Imperfect prediction and control reduced usable bandwidth relative to the earlier simulation. [freeblock2002]\n\nThe external prototype could merge a background read into a not-yet-issued destination request, but could not extend the already-issued source request. Separate commands on one track could trigger unwanted prefetch behavior. A wraparound opportunity therefore did not necessarily fit one permitted command. [freeblock2002]\n\nFigure 11 offers LBN ranges 1326-1334 and 1112-1145, containing 9 and 34 sectors. The prototype takes the larger range and leaves 9 sectors unused. Hesela's calculation gives 34/43 of this opportunity, not a disk-wide bandwidth or scan-completion fraction. [opportunity]\n\nSeek-time conservatism trades fewer missed rotations for fewer accepted background transfers. More background bandwidth can also reflect a less efficient foreground policy, so evaluate both workloads together. [freeblock2002]\n\nAPI contract: FAST 2004 also uses idle time. Tasks have no ordering guarantee; reads need not reflect registration-time contents. A write may complete through another write to the same location. Scheduling completion does not establish a point-in-time backup. [freeblock2004]",
  "status": "research",
  "advantages": [
    {
      "text": "The FAST 2004 getbuffer_fn callback acquires a write buffer only when selected for service and can decline an unavailable buffer, avoiding a lock throughout the potentially long scheduling wait.",
      "citationIds": [
        "freeblock2004"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Prediction errors can miss the intended sector passage and add a rotation of delay.",
      "citationIds": [
        "freeblock2002"
      ]
    },
    {
      "text": "Stable snapshot contents do not imply stable block addresses. In the paper's FreeBSD snapshot-COW case, the backup checks returned blocks with the snapshot system and re-registers relocated reads. Application-COW instead preserves the snapshot map.",
      "citationIds": [
        "freeblock2004"
      ]
    }
  ],
  "related": [
    "rotational-latency",
    "io-scheduler",
    "anticipatory-scheduling",
    "data-scrubbing",
    "semi-preemptible-io",
    "snapshot",
    "eager-writing"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-02",
  "citations": [
    {
      "id": "freeblock2000",
      "title": "Lumb et al. Towards Higher Disk Head Utilization: Extracting \"Free\" Bandwidth from Busy Disk Drives. OSDI 2000, sections 2, 5.2 and 6.",
      "url": "https://static.usenix.org/events/osdi2000/full_papers/lumb/lumb_html/index.html",
      "accessed": "2026-11-09"
    },
    {
      "id": "freeblock2002",
      "title": "Lumb, Schindler and Ganger. Freeblock Scheduling Outside of Disk Firmware. FAST 2002, pp. 275-288; sections 2-5.",
      "url": "https://www.usenix.org/legacy/publications/library/proceedings/fast02/full_papers/lumb/lumb_html/index.html",
      "accessed": "2026-11-09"
    },
    {
      "id": "hesela",
      "title": "Hesela: HDD rotational slack versus waiting for demand",
      "url": "https://hesela.com/analyses/ssd-fairness-shared-queues/#freeblock-scheduling",
      "accessed": "2026-11-09"
    },
    {
      "id": "opportunity",
      "title": "Hesela: FAST 2002 Figure 11 range-count reconstruction, code, tests and scope",
      "url": "https://hesela.dev/research/freeblock-opportunity/README.md",
      "accessed": "2026-11-30"
    },
    {
      "id": "freeblock2004",
      "title": "Thereska, Schindler, Bucy, Salmon, Lumb and Ganger. A Framework for Building Unobtrusive Disk Maintenance Applications. FAST 2004, sections 2-4.",
      "url": "https://www.usenix.org/legacy/event/fast04/tech/thereska/thereska_html/",
      "accessed": "2026-12-01"
    }
  ],
  "provenance": [
    "Historical source synthesis, not a current Linux scheduler option, SSD capability or reproduced benchmark.",
    "The Figure 11 calculation checks inclusive LBN counts under one-request eligibility. It does not reconstruct track geometry, command timing or measured performance."
  ]
}
