Reading: I/O Devices . Read OSTEP chapter 36 ( http://pages.cs.wisc.edu/~remzi/O
ID: 3716917 • Letter: R
Question
Reading: I/O Devices. Read OSTEP chapter 36 (http://pages.cs.wisc.edu/~remzi/OSTEP/file-devices.pdf) and answer the following questions:
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.
Explanation / Answer
Answers:
1)
c): when the interrupt handler table is very large.
explanation:
Instead of polling the device repeatedly ,the OS can issue a request ,put the calling procees to sleep and context switch to another task. When the device is finally finished with the operation ,it will raise a hardware interrupt ,causing the CPU tojump into the OS at a ISR or interrupt handler.
2) yes
It is possible for sodtware to interact with an I/O device using both polling and interrupts.
3)
False
Reason : Studiesof the linux kernel reveal that over 70% of OS code is found in device drivers.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.