Answer the following questions.
Question 1: Polling, Interrupts, Traps [5, 5, 5, 5]
Part a) Polling and interrupts are two ways used by operating systems to check whether I/O is done.
Q: Describe how each of them works, and explain the difference between these two.
Part b) When would you prefer one over the other? As part of your answer, state which one is synchronous and why.
Part c) What is the difference between an interrupt and a trap?
Part d) How do interrupts help facilitate multiprogramming? Give an example with your explanation
Answer these questions in details and provide examples to support your rationale.