Explore AI that moves inference closer to the data — from the edge to the device itself.
Can this image classifier maintain its intelligence while becoming small enough for the edge?
Can this image classifier maintain its intelligence while becoming small enough for the edge?
Explore the ideas, systems and connections that shape technology — choose any node to begin your journey.
Deploying neural networks and intelligent decision loops on raw silicon targets.
Comparing FCFS, SSTF, SCAN, and C-SCAN disk scheduling algorithms and latency mitigation.
When an operating system is running a modern workload, it is rarely serving one file request at a time. The system's virtual memory manager may be swapping pages, a database might be writing transaction logs, and a web browser could be downloading images simultaneously.
As these operations stack up, they form a Request Queue at the storage driver layer.
For a simplified hard disk model, suppose the controller receives a queue of read/write requests targeting specific LBA cylinder tracks:
And the physical read/write head is currently positioned at:
To complete these tasks, the operating system must decide the order in which to visit these locations. This coordination is known as Disk Scheduling.
To understand why the order of serving requests matters, we must look at the physical architecture of a traditional mechanical Hard Disk Drive (HDD):
The device is composed of the following physical units: * Platter: Magnetic circular disk spinning at high speeds (e.g., 7200 RPM). * Spindle: The central shaft that rotates the platters. * Tracks: Concentric logical rings on the platter surface where data is recorded. * Sectors: Segments dividing each track. Each sector holds a fixed amount of data (traditionally 512 bytes or 4 KB). * Read/Write Head: A tiny sensor that floats just above the platter surface, reading magnetic orientations. * Actuator Arm: A mechanical arm that moves the head radially inward or outward to target different tracks.
Because of this mechanical design, reading or writing data from a physical track requires mechanical movements that introduce physical delay:
$$\text{Access Time} \approx \text{Seek Time} + \text{Rotational Latency} + \text{Transfer Time}$$
Mechanical seek time and rotational latency take milliseconds—an eternity compared to CPU registers or memory. If the head must repeatedly jump between distant tracks, the actuator arm spends all its time seeking, causing overall I/O performance to plummet.
The simplest scheduling policy is First-Come, First-Served (FCFS):
* Advantage: It is simple to implement and perfectly fair. Requests are served in the exact order they arrive, ensuring zero starvation. * Problem: It completely ignores the head's physical location. The head is forced to sweep wildly back and forth across the platter, resulting in massive cumulative seek distance (640 cylinders for our sequence).
To minimize seek overhead, Shortest Seek Time First (SSTF) prioritizes proximity:
At each step, the algorithm calculates the distance from the head's current position to all pending requests and moves to the closest one. * Advantage: Considerably reduces total seek distance (cut from 640 to 236 cylinders in our example), boosting throughput. * Problem: Prone to starvation. If the queue constantly receives new requests located near the active middle tracks, distant requests (such as LBA 183) may wait indefinitely.
To combine efficiency with fairness, SCAN sweeps the disk symmetrically:
Like a building elevator, the head moves in one direction (e.g., inward toward track 0), servicing all requests encountered along the way. Upon reaching the edge, it reverses direction and sweeps outward toward the other edge (track 199). * Advantage: Eliminates starvation because the head always completes its sweep to both boundaries, ensuring every sector is eventually reached. * Problem: Uniformity. Sectors near the middle are visited twice as often as those at the extreme edges, making response times uneven.
C-SCAN improves on SCAN by moving in one direction only:
The head services requests while moving in a single direction (e.g., increasing track numbers). Once it reaches the outer edge (199), it jumps straight back to the inner edge (0) without servicing requests on the return run, then starts another sweep. * Advantage: Provides a much more uniform waiting time distribution across all tracks. * Problem: The return sweep is a wasted movement (though on real drives, a full reset sweep is optimized to be extremely fast).
Use the simulator below to select an algorithm tab and compare how FCFS, SSTF, SCAN, and C-SCAN schedule the same sequence of cylinder requests:
Below is a summary of the trade-offs involved in each strategy:
| Algorithm | Core Selection Rule | Major Strength | Major Weakness |
|---|---|---|---|
| FCFS | Serves by arrival order | Simple, fair, no starvation | High seek distance |
| SSTF | Serves closest request | Minimizes total seek time | Vulnerable to starvation |
| SCAN | Sweeps back and forth | Prevents starvation | Uneven edge wait times |
| C-SCAN | Sweeps in one direction | Uniform response times | Wasteful return sweep |
The physical characteristics of the underlying media dictate whether these scheduling algorithms are used:
However, storage request scheduling does not disappear completely. Modern solid-state storage stacks still must optimize: * Queueing & Fairness: Ensuring multiple active processes get fair shares of device bandwidth. * Request Merging: Grouping contiguous block requests into larger sequential I/O commands to reduce controller transaction overhead. * Latency & Controller Pipelines: Coordinating writes and reads to leverage the controller's internal device-level parallelism without bottlenecks.
The focus changes from reducing physical arm motion to maximizing throughput in electronic controllers.
As you study storage, be careful not to confuse the roles of filesystem allocation and device scheduling:
* File Allocation: Decides which blocks represent a file (e.g., extents, indexed structures, or linked lists). * Disk Scheduling: Decides in what order pending read/write blocks should be sent to the physical device.
Disk scheduling can decide which waiting request should be served first.
But storage systems have another problem.
What happens when the system loses power or crashes in the middle of a write?
PrajnaEdge is a technology company exploring the space between understanding technology, experimenting with ideas, and turning them into things that can be experienced.
PrajnaEdge began with Embedded Systems — exploring the foundations that connect hardware, software and intelligent computation.
The first technology universe is built around that foundation. The journey will expand as new ideas, experiments and products emerge.
PrajnaEdge is a technology company created by Devaharsha Meesarapu.
I am the engineer behind the design, development, and content of PrajnaEdge. I build low-level systems where code directly controls hardware, bridging the gap between register-level silicon behavior and intelligent edge decision loops.
I am an Embedded Firmware Engineer focused on developing software for resource-constrained systems. My experience spans bare-metal firmware, device drivers, microcontroller peripherals, and communication protocols, working across the boundary between hardware and software.
My work has involved microcontroller-based systems, real-time behaviour, hardware interfaces, and communication technologies such as CAN, CAN FD, UART, SPI, and I²C. I am particularly interested in understanding systems from the lowest level upward—from registers and peripherals to intelligent edge systems.
Engineering is not just about writing code; it is about managing constraints, timings, and physical hardware characteristics. True mastery of complex systems comes from understanding the interactions across different layers of the stack.
This conviction is why I built PrajnaEdge—to bridge the gap between conceptual theory and direct, register-level physical reality.
Software that runs directly on hardware without an operating system.
"Every embedded application begins long before main()."
An Operating System manages hardware and software resources so complex applications can work efficiently.
"When one loop is no longer enough to carry the burden."
PrajnaEdge is an independent education platform built to make knowledge freely accessible.
If you find PrajnaEdge useful, you can support its continued development.
Your support helps fund the time, tools, infrastructure, and experimentation that go into building and maintaining PrajnaEdge.
Product Terms & Licensing
PrajnaEdge is an interactive learning platform designed for systems engineers, developers, and technology enthusiasts. The educational materials, simulation blocks, and visual code tracers are provided for instruction and concept validation. We make no warranty regarding their completeness or applicability to real-world industrial systems.
The software, interactive widgets, diagrams, illustrations, custom SVG architectures, and textual documentation on this site are copyright © 2026 PrajnaEdge. All rights reserved. Reproduction, modifications, or scraping of this content without prior written permission is strictly prohibited.
PrajnaEdge is committed to learning privacy. We do not sell user data. Analytical event tracking is used solely to study click telemetry and help improve visual guides.