Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Reading: I/O Devices . Read OSTEP chapter 36 and answer the following questions

ID: 3715451 • Letter: R

Question

Reading: I/O Devices. Read OSTEP chapter 36 and answer the following questions by editing hw13.txt.

1) When would you tend to prefer polling to interrupts in interacting with an I/O device? a) when the device supports many commands, b) when the device can perform a command quickly, or c) when the interrupt handler table is very large.

2) (Yes/No) Is it possible for software to interact with an I/O device using both polling and interrupts?

3) (T/F) About ? of the Linux source code is device driver code.

4) In Figure 36.5, in function ide_start_request(), what kind of register is written to on the line with comment '// this is a WRITE' ? a) a command register b) a data register c) a status register.

5) In the IDE example of Section 36.8, how many bytes are used to identify a location on disk where a read or write will be performed?

Explanation / Answer

Even I can see you havn't given here the hw13.txt file and figure.

But still i would reply yoru question and request you to ask with missing details.

If interrupts will keep handled the CPU will be keep busy in serving the interrputs and other necessary work would be missed. So in frequent events polling is better than interuppt.

And if the event is synchronous then CPU can code to poll the event on external device.

In the case where interrupt handler table too large there also it's best option to go for polling.

Yes it's possible for driver software to interact with I/O device using polling mechanisme as well as interrupt handler.

And entire linux code is not driver code. As complete code doesn't interact with exernal devices.

Please provide the further images to reply your question.

Thanks.