A "scatter gather list" is a list of tuples consisting each of a physical address and a length (ordinarily in bytes). They are used in device drivers typically for indicating to a device such as a scsi controller the regions of memory to or from which data should be transferred.

The typical sequence is for the OS to make a request of the driver to transfer so many bytes from such-and-such a virtual address to or from such-and-such a logical block address (LBA) on a disk device. The driver takes this virtual address and computes (in an OS/hardware dependent way) the physical addresses and lengths that the virtual address maps to (the "scatter gather list"), and constructs a "command" containing this scatter gather list. Typically the physical address of this command is then written out to a memory mapped register on the device. This typically causes the device to read the command from host memory, and perform the read or write (or whatever) using the scatter gather list. When the command is completed the device will interrupt the host processor, and the driver's interrupt handler is invoked. A register on the device is then typically read to determine which command just completed, and whatever actions are needed to inform the OS that its request is done are taken. That's the 10000 foot view anyway.

Log in or register to write something here or to contact authors.