Browse Prior Art Database

Software Polling Algorithm With Timeout Protection

IP.com Disclosure Number: IPCOM000035291D
Original Publication Date: 1989-Jul-01
Included in the Prior Art Database: 2005-Jan-28
Document File: 2 page(s) / 70K

Publishing Venue

IBM

Related People

Welman, GE: AUTHOR

Abstract

In processing data on a diskette, data transfer with the diskette controller must occur at a specified rate or the operation will fail with an overrun error. The operation may be either a write operation or a read operation. In most of the IBM Personal Computer family of products, the data rate is sustained by the use of direct memory access (DMA) whenever it needs to process data. However, in the IBM PCjr and the Wheelwriter Series II Diskette Option, DMA capability is not provided. Without DMA, the software must poll the diskette controller whenever data transfer is expected. A problem arises with the non-DMA method. The diskette controller may start a command but never transfer (Image Omitted) any data and thus never finish.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 57% of the total text.

Page 1 of 2

Software Polling Algorithm With Timeout Protection

In processing data on a diskette, data transfer with the diskette controller must occur at a specified rate or the operation will fail with an overrun error. The operation may be either a write operation or a read operation. In most of the IBM Personal Computer family of products, the data rate is sustained by the use of direct memory access (DMA) whenever it needs to process data. However, in the IBM PCjr and the Wheelwriter Series II Diskette Option, DMA capability is not provided. Without DMA, the software must poll the diskette controller whenever data transfer is expected. A problem arises with the non-DMA method. The diskette controller may start a command but never transfer

(Image Omitted)

any data and thus never finish. One solution is to count the number of times through the polling loop and quit after a reasonable number of tries. A software timing loop must be fast enough to meet the minimum data transfer time requirement. The PCjr uses a different solution, i.e., a timer circuit to force an interrupt if the command did not finish is used. When the timeout interrupt occurs, the software sets an error flag and transfers control to an error handling routine.

The flow chart and sample code of the polling routine used in the PCjr is shown in Fig. 1. The flow is based on the assumption that all instructions have already been prefetched into the instruction queue. Prefetched instruction execution times are s...