[20 points] [SHORT QUESTIONS] a. [5 points] When an interrupt occurs, the CPU (h
ID: 3734173 • Letter: #
Question
[20 points] [SHORT QUESTIONS] a. [5 points] When an interrupt occurs, the CPU (hardware) must be able to perform several operations atomically (i.e., as an indivisible step of operations). List these operations and discuss whey each of them is necessary. b. [5 points] What are fundamental differences between interrupts on the one hand, and exceptions (faults/system calls) on the other hand? c. [5 points] What are similarities between interrupts on the one hand, and exceptions (faults/system calls) on the other hand? d. [5 points) What is common between faults and system calls that let us classify them together as a class of exceptions?Explanation / Answer
Done all the questions. please leave a comment in case of any doubt.
Steps performed by CPU on getting a Hardware Interrupt
Interrupts and Exceptions are events that changes the normal flow of CPU to do something different. Interrupts can be software interrupt which is triggered by some software application running on the computer or Hardware interrupts which is triggered by some hardware attached to our computer like Printer, Mouse etc. So, whenever there is an interrupt the CPU is expected to do something different. But CPU cannot just move to a new process and leave everything in between. When the CPU detects the interrupt, it must save the registers in order to return the CPU to the same state as it was before the interrupt occurred. That is why CPU does lot of actions automatically to handle the interrupt appropriately.
2. Difference between Interrupts and Exception
There are few differences between the two.
Similarities between Interrupts and Exceptions
Both interrupts and exceptions are the u. Interrupts are actually exception that have been raised in response to external events.
Common between Fault and system call that lets you classify them together as a class exception
System call is a call to another routine in the system, similar to Faults. Both are synchronous. In case of both Fault and System call the processor only has to remember where to return to. Faults can be generally fixed and program can continue its execution normally. system call is one of the exceptions, there are other exceptions in the system like page fault, divide by zero etc. The basic mechanism of both are very similar.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.