814 views
1 votes
1 votes
Can someone explain that will Interrupt Service routine will also follow that time sharing environment like other normal processes in system.?

I think not. But i want to know difference in execution of normal process and Interrupt subroutine.  

@Arjun Sir

1 Answer

1 votes
1 votes

interrupts follow time sharing approach ? the answer depend on the situation.

basically interrupts are of two types hardware and software. the hardware interrupts like cpu overheating will never follow time sharing. they have to services as they can cause the failure of the cpu. but if a interrupt is generated by a process definitely it will be context switched as the process will be pre empted. what matter here is the priority of interrupt. a flag is used to do so.

Higher-priority interrupts can preempt interrupts that have lower priority. To allow you to control preemption, use the preemption flags to specify whether an interrupt can be preempted.

  • Entering 1 indicates that the interrupt can be preempted.

  • Entering 0 indicates the interrupt cannot be preempted.

how interrupt handled is simple. interrupt is just a piece of code which is present at a special address. whenever an interrupt occur cpu just go to that address, and execute that code. so a process generated an interrupt the cpu has to  execute that code first it goes to that address which i think is called "vector address". if it is a software interrupt it can be preempted if the process can be preempted by the cpu and on the return the cpu will start servicing the interrupt where it has left it. 

so in some case yes and no in some cases.

Related questions

0 votes
0 votes
1 answer
1
its_vv asked Jul 1, 2022
960 views
Both internal and software caused by executing the program instructions . So both are same ?
0 votes
0 votes
1 answer
2
amitqy asked Feb 16, 2019
480 views
Under the SOFTWARE METHOD – POLLING heading.What is the meaning of this line?“In this method, all interrupts are serviced by branching to the same service program”....
0 votes
0 votes
0 answers
4
Harsh Kumar asked Jun 2, 2018
503 views
Are Vectored Interrupts possible in CPU having single Interrupt Request line? How/Why not?