The Clockwise real-time file server overview

Clockwise schedules disks. It waits for disk requests from clients and it drives the original disk drivers to read and write data on a real disk. Internally, Clockwise maintains two per-disk queues where clients drop requests into and a Clockwise deamon retrieves requests from. One queue is for best-effort traffic, the other is for real-time traffic. Queue selection is based on the availability of a Quality of Service (QoS) setting on a stream.

The Clockwise disk scheduler is an altered non-preemptive Earliest Deadline First disk scheduler. The reason for using a non-preemptive version of the scheduler is obvious: once a disk request is activated, there is no way the request can be interrupted until it finishes. To facilitate best-effort requests, Clockwise maintains a slack time value (called delta L). The Clockwise scheduler uses this slack time to prioritize queued best-effort traffic: if there is slack time available, a best-effort request takes precedence over real-time traffic.

Clockwise organizes ranges of consecutive disk blocks in dynamic partition blocks (e.g. of 1MB each). A number of these dynamic partition blocks, possibly from multiple disks form a dynamic partition. A dynamic partition work much like a real raw partition: it is a abstraction from the real disk.

Clockwise for Linux is implemented as a block and character device driver. The device driver's major device number selects the Clockwise driver, and the minor device number selects the dynamic partition. The block interface can be used to layout a Linux file system (e.g. EXT2FS), the character device is used for raw access to the dynamic partition. Currently, one can only associate a QoS setting on the character interface. To facilitate double buffering, the character device allows a-synchronuous transfers.