InterviewSolution
| 1. |
Why is it that a single serial port is controlled by a single interrupt-driven I/O (input/ output), but a front-end processor, such as a terminal concentrator, is managed by a polling I/O? Answer this in context to OS. |
|
Answer» Interrupt is a hardware method by which a device alerts the CPU that it NEEDS its ATTENTION. Interruptions might happen at any time. As a result, when the CPU receives an interrupt signal over the indicator interrupt-request line, it suspends the current process and responds to the interrupt by giving control to the interrupt HANDLER, which serves the device. Polling is a PROCEDURE in which the CPU checks if the device requires attention on a regular basis. When a device tells the process unit that it wants hardware processing, the process unit polls the I/O device to see if it wants CPU processing. The CPU is constantly checking each and every device connected to it to see if any of them requires hardware attention. A serial port may have a tiny NUMBER of I/O requests, and therefore, interrupts should be used whenever possible. Serial ports in a terminal concentrator are a different matter. A terminal concentrator has several serial ports, which can result in the formation of multiple brief I/O instances, which can increase the system's burden unnecessarily if interrupts are used. Instead, by looping through without the need for I/O, a polling loop can dramatically reduce the amount of burden on the system. Hence, polling is believed to be more efficient than interrupt-driven I/O when the I/O is frequent and of extremely short duration. Therefore, we may conclude that interrupts are used for single ports because the frequency of I/O on such a port is low and can be managed successfully, whereas polling is used for many ports because the frequency of I/O grows and the duration is short, which suits polling. |
|