Question: QUESTION TWO: Performance Assume we have a hard drive that can operate in both polling or interrupt mode. Assume further that the disk drive can
QUESTION TWO: Performance
Assume we have a hard drive that can operate in both polling or interrupt mode. Assume further that the disk drive can access data in either block or byte mode. Block mode uses the disk drive's internal buffer to store K bytes of data. In block mode the hard drive can run on its own after receiving the start address on disk and the number of bytes to read from the CPU. All these bytes are loaded into the buffer. If the number of bytes to read is greater than the size of the buffer only the bytes that fit into the buffer are loaded or if all the requested bytes have been read less than the buffer size an interrupt is sent to the CPU once the buffer is full or once the operation is completed. The CPU then needs to download the buffer to RAM, clear the buffer, and instruct the drive to continue reading if needed There is no DMI DMA to help do the download.
Byte mode simply copies a single byte of data from the hard disk given the address on disk of the byte This byte is stored in the disk drive buffer at the first byte of the buffer. No interrupt is sent. It is up to the CPU to know when to extract that byte from the buffer using palling. The disk drive has a status register that is set to integer when the drive is busy, O when it is not busy and no data is in the buffer, when it is not busy but a single byte is in the buffer, if it is not busy with a full buffer. The register uses integer numbers instead of bit flags. The status register is bits long.
Assume that polling for one byte takes ticks, while a single interrupt takes ticks. Assume we want to copy a one meg bytes file from disk to RAM. Assume further that all other assembler instructions, for simplicity, take only tick to execute. Assume you have a MHz million ticks per second processor.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
