Spooling and Sleek latency

SPOOLING

Spooling is a process in which data is temporarily held to be used and executed by a device, program or the system. Data is sent to and stored in memory or other volatile storage until the program or computer requests it for execution.
"Spool" is technically an acronym for simultaneous peripheral operations online.
Spooling works like a typical request queue or spool where data, instructions and processes from multiple sources are accumulated for execution later on. Generally, the spool is maintained on the computer’s physical memory, buffers or the I/O device-specific interrupts. The spool is processed in ascending order, working on the basis of a FIFO (first in, first out) algorithm.
The most common implementation of spooling can be found in typical input/output devices such as the keyboard, mouse and printer. For example, in printer spooling, the documents/files that are sent to the printer are first stored in the memory or printer spooler. Once the printer is ready, it fetches the data from that spool and prints it.



SLEEK LATENCY





The red circle is a track, you'll have many tracks. A sector is shown in purple. You should also note that the disk will be rotating and there's a head which reads from the rotating disk.

Let us label the tracks from 0 (innermost, inside red circle) to 3 (outermost circular strip). Similarly the purple sector as 0 and going clockwise we name the others till 7. For our convenience we can refer (x,y) as the track sector (aqua blue) whose track is x and sector is y.

Seek time: Say you're reading some data from the (0,4). You receive instructions to read from track (2,5). The time it takes for you to move from track 0 to track 2 is seek time.

Latency: Once you reach track 2, you realize the head is above the 1st sector you'll have to wait till the disk rotates to the 5th sector so that you can start reading from (2,5). The time you wait for the sector to be accessible by your head here is known as latency.