Your colleague is more or less correct. DMA removes the OS from data transfers involving the device; polling involves the OS with device-status checking.
Essentially, there is none. Both are interrupt driven, although using different interrupts. Polling requires that devices be tested, but that's not a major structural difference, and it's usually not the responsibility of the device driver. Figure 5.8 in the text shows a Device Status Table for the interrupt-driven device driver, but the polling device driver needs such a table too because it must also store request information between executions. The polling device driver needs a device handler, and it also needs the function of the interrupt handler, although those functions are not invoked in the same as they are for an interrupt-driven device driver.
Ideally, the device should have DMA; then it can use all of physical memory (or those parts allowed by the OS) as a buffer. In the absence of DMA, the OS is responsible for device data transfer, so it would be helpful if the device was slow, which lowers the fraction of time over an interval the OS spends tending to the device, as well as making precise timing constraints less important. For similar reasons, the device should work with small data units. It is desirable that the device support interrupts, but this us a universally desirable characteristic (subject to dollar costs) and not specific to the presence or absence of on-device buffers.
R1
and then R2
and the shared resources are accessed in
a loop, such as,
while true access R1 access R2
Under theses circumstances, does resource ordering still prevent deadlock? Explain.
It does, as long as a process releases both resources by the time an iteration ends.
This page last modified on 14 November 2004.