Browse Prior Art Database

Polling Method for Data Transmission in a Multitasking Operating System

IP.com Disclosure Number: IPCOM000115789D
Original Publication Date: 1995-Jun-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 103K

Publishing Venue

IBM

Related People

Claggett, K: AUTHOR [+2]

Abstract

Disclosed is a polling method for parallel port data transfer in a preemptive multitasking operating system, such as OS/2*. This method differs from the conventional interrupt method in the way it handles a device busy state between each byte of data transmitted. The polling method spins in an iterative fashion within an instruction loop, obtaining the state of the device and testing for the device state transition from busy to not busy. When the device is not busy, the polling method sends the next byte of data.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 52% of the total text.

Polling Method for Data Transmission in a Multitasking Operating
System

      Disclosed is a polling method for parallel port data transfer
in a preemptive multitasking operating system, such as OS/2*.  This
method differs from the conventional interrupt method in the way it
handles a device busy state between each byte of data transmitted.
The polling method spins in an iterative fashion within an
instruction loop, obtaining the state of the device and testing for
the device state transition from busy to not busy.  When the device
is not busy, the polling method sends the next byte of data.

      The interrupt method, used with OS/2 prior to OS/2 Warp, blocks
the current thread of execution, once the first character is
transmitted, until the device signals receipt of the byte of data.
When the device transitions the acknowledge signal at the trailing
edge of the pulse, the interrupt method receives a hardware
interrupt, and the device driver code is executed to transmit the
next byte of data.  This method checks the state of the device for
not busy before sending the byte of data.

      However, the interrupt method requires that the parallel port
adapter of the system must have its hardware interrupt level set
correctly and that the cable to the parallel device must be wired
correctly to return the acknowledge signal.  These requirements are
sometimes not met in a system on which OS/2 is installed, if the
system has been used previously with an operating system, such as DOS
or DOS with Windows**, using a polling method.  In particular, the
hardware interrupt level of the parallel port in such a system may
have been assigned to another hardware adapter.

      The polling method is preferably provided in an operating
system, along with the interrupt method, with the polling method
being given priority.

      The Figure is a block diagram showing the operation of a
polling device driver in a multitasking operating system.  An
algorithm begins by initializing a count in step 1.  The device
status is next read in step 2, and tested in step 3 to determine
whether the device is busy.  If the device is not busy, the next byte
of data is transmitted to the device in step 4.  If the device is
busy, a loop 5 is used repeatedly to poll the device.  With each pass
through the loop 5, the count initialized in step 1 is decremented in
step 6, and the resulting count is compared to zero in step 7.  If
the count is not equal to zero, the loop is continued; if it is equal
to zero, the device driver gets the yield flag of scheduler in step
8.  This flag i...