Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

What happens when a proccess is in a critical section and an interrupt is generated?

Status
Not open for further replies.

avssunil

Junior Member level 1
Joined
Nov 13, 2006
Messages
19
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,281
Activity points
1,416
Whenever a proccess is in a critical section and an interrupt is generated,what will happen to tht interrupt,how is that processed??/
What will happen if no of interrupts are generated at the same time????
 

Re: About Interrupts

hai

the controller does not know which part of the section is critical.
so if the interrupt generates at that time, the system will stop the present
process and will service the interrupt. the programmer should take care of this .one colution is that you can mask the interrupt when the system is on a purticular job (the critical process) so that until the job gets finished,the interrupt will not get the attention.and you should activate the interrupt after finishing the job so that it will responce to interrupts.this way you can save your critical processes. normally interrupts are there to service critical processes


regards

sun
 

About Interrupts

Generally it is designed such that when a code runs through a critical section, interrupts are waited in a queue. After processing the task it is handled. But it may happen that a interrupt is intended to occur for the help of that task i.e. for a particular event to occur which is needed in that task. If no interrupts are generated then it 'll go through as usally.
 

Re: About Interrupts

avssunil said:
Whenever a proccess is in a critical section and an interrupt is generated,what will happen to tht interrupt,how is that processed??

When the process is in critical section the interrupts are disabled (if this is not the case then you can't call it as critical section). If interrupt occurs at this time a pending flag will be set for the corresponding interrupt and the interrupt handler will be executed once the interrupts are enabled again while exiting from the critical section. If more then one interrupt is pending they will be served based on there priority.

avssunil said:
What will happen if no of interrupts are generated at the same time????

Nothing, your critical section will be executed without any interruption.
 

Re: About Interrupts

Generally speaking, when we have a critical section then all interrupts are disabled so what happen to the interrupt depends on two things:
1) What is the time needed for the interrupt to be served? In other words what is the
response time for this interrupt?
2) How is the system designed to handle interrupt?

Incase your interrupt’s response time is very big (longer than the critical section duration) the critical section will end and the interrupt will be served, in case it’s small (less than the critical section duration) it will depend on your system, if it saves interrupts then all interrupt will be saved and responded to after the critical section, if it doesn’t save the interrupts then it will be discarded
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top