Specifications
Page B-3Read-Ahead and Write Buffering
When you use FIXLOG to create a driver for the AM-137 board, a new option will
appear, which is the number of read-ahead blocks. For example, type:
FIXLOG
RETURN
FIXLOG.LIT Version x.x(xxx)
1. Change the number of logicals
2. Create a sub-system driver
Enter choice: 2
RETURN
Enter name of generic driver to be used: SCZRR
RETURN
Enter number of logical units per physical unit: 10
RETURN
Enter SCSI id (0-6): 0
RETURN
Enter number of read-ahead blocks (0-7): 5
RETURN
Enter new driver name: MAX
RETURN
New driver is now in memory.
To save the driver you have created, type:
SAVE MAX.DVR
RETURN
If you wish to disable or change the number of read-ahead blocks, simply use the
FIXLOG program to generate a new disk driver and if the disk driver is for the DSK:
device, don’t forget to use MONGEN and embed the new driver into the system monitor.
The generic AM-137 SCSI disk driver (SCZRR.DVR) is setup for seven read-ahead
blocks.
B.3WRITE BUFFERING FOR SCSI-1 AND SCSI-2 DISK DRIVES
AMOS (and therefore every application written for AMOS) understands only 512 byte
disk blocks. Therefore, when a disk write request is made by a program, a single block
transfer is made to the disk drive. If the program then writes the next sequential block,
the system must wait the latency time of the drive (i.e., the time it takes the drive to
complete one revolution) before the next block can be written. Latency even on fast
SCSI-2 drives is around 7ms.
In order to speed up the write process, when write buffering is enabled, all writes to the
SCSI disk are first transferred into a buffer. If the write buffer becomes at least half full,
or around three quarters of a second passes with no reads, or if a preset "guaranteed
flush" timeout occurs, the SCZRR.DVR disk driver will begin scanning through the write
buffer, finding blocks that need to be written out to the drive. The algorithm used to flush
blocks out to the drive is able to find up to eight consecutive blocks and write them to
the disk drive as a single write command, therefore dramatically improving system
performance.
PDI-00137-50, Rev. A01