System Architecture for Block Devices

As mentioned, device drivers for block devices are generally stream interface drivers, and the block devices appear as ordinary disk drives. Applications access files on a block device through standard file APIs—for example, CreateFile and ReadFile—called on the appropriate device file name, such as “DSK1:” or “DSK2:”.

The following illustration shows the flow of control from an application call to ReadFile to the actual read from various kinds of block devices, using linear flash memory hardware.

The application calls ReadFile, using a handle to a file stored in linear flash memory. The file allocation table (FAT) file system, which is included with Windows CE, translates the read request to logical blocks. The FAT file system searches the buffer cache for the requested blocks. If these are not present, it issues an IOControl request to read bytes from the block device. The TrueFFS driver receives the IOControl request, then fulfills the request by accessing the linear flash memory block device through one of the socket layers.