Eagle 450 Upgrade Instructions, Rev. A00
Appendix B - Read-ahead and
Write Buffering
The AM-138 board uses a programmable RISC DMA controller for SCSI bus communications and for
data transfer to and from the AM-138's SCSI bus. The ColdFire CPU is only involved with setup before
and cleanup after a SCSI command is sent to a device
the rest of the command, including data transfer,
is handled by the RISC processor.
Having the RISC processor take care of these details allows both read-ahead and write buffering without
the need for a separate controller.
READ-AHEAD
The AM-138's SCSI disk driver, SCZ138.DVR, is able to perform read-ahead directly into the AMOS
(DCACHE) disk cache. When any program attempts to read a physical block from a disk, the SCZ138
driver will also read up to an additional seven sequential blocks from the disk drive and store these read-
ahead blocks in the cache.
This read-ahead scheme works very well when jobs on the system are doing a large number of sequential
reads. For example, data base searches and programs like REDALL may execute much faster because the
data they require is already in memory and only has to be transferred from the cache into the user
partition.
Programs that do significant random disk access (such as RNDRED) tend to slow down with this read-
ahead scheme. Most of the slowdown is caused by "thrashing" of the disk cache, where cache entries that
will be used again are removed from the cache due to the allocation requirements of the read-ahead
blocks (which typically are never used). The actual data transfer overhead is very little, as most SCSI
disk drives (especially fast SCSI-2 drives) have a track cache built into the drive allowing both the target
and read-ahead blocks to be transferred over the SCSI cable without delay.
Controlling Read-Ahead
For read-ahead to occur on the AM-138, both the AMOS disk cache (DCACHE.SYS) and the full SCSI
dispatcher (SCZ138.SYS) must be installed. The number of read-ahead blocks to be transferred into
cache on every physical disk read is contained in the disk driver. You can set this using the FIXLOG
program to generate a disk driver with the appropriate read-ahead blocking factor.
When you use FIXLOG to create a driver for the AM-138 board, you are asked to specify the number of
read-ahead blocks. For example, type: