How do you handle interrupts in the appropriate context?

jj1984

Member
It occurred to me that interrupt handling has to be process dependent.

That is, the same interrupt fired when process 1 is running may be handled differently than when process 2 is running.

This is most evident in browser processes with Javascript attached mouse interrupt handlers.

So, my question is how does the computer know how to handle an interrupt given the process context?

When the OS loads a new process context, does it repopulate the entire IDT?

Or does the IDT remain unchanged and the handlers for all interrupts entail a process context checker?

The OS keeps some kind of process context data structures.

Is that where all the process specific interrupt handlers are stored?
 

Cromewell

Administrator
Staff member
It occurred to me that interrupt handling has to be process dependent.

That is, the same interrupt fired when process 1 is running may be handled differently than when process 2 is running.
Except the process that handles hardware interaction like this is the os kernel.

When you move the mouse or click a button, the OS decides what process to send the event to. The process can then do whatever it wants, but the interrupt as you are thinking of it isn't the same.
 
Top