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.

How to minimize the interrupt latency of an operating system

Status
Not open for further replies.

sacrpio

Member level 3
Joined
May 24, 2004
Messages
56
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
500
isr latency

How we can minimize the interrupt latency of an operating system. What r the limitations to minimiz it. How we can measure the interrupt latency?

Thanks
 

Re: Interrupt Latency

You can minimize interrupt latency by making your interrupt routine as short as possible if your hardware does not allow interrupt priorities because in this case a started interrupt routine can not be interrupted by another (higher prority) interrupt.

Also avoid to disable interrupts in any routines if possible because interrupts will have to wait until allowed again.

best regards
 
Re: Interrupt Latency

Hi,

For mesuring interrupt latency, I think you need a oscilloscope or a logic state analyser. By entering the interrupt service routine (ISR), you need to activite an available port on your hardware (like a led port or so on) and desactivate it just before returning from the ISR. You can do that by writing the appropriate code.

By connecting one input of the oscilloscope (or logic state analyser) to the INTR pin of the microprocessor and the second one to the port you activate/desactivate, you can measure the latency time and the duration of the ISR.

I have done this with some succes in the past.
 

Re: Interrupt Latency

yuh, if not specified in the spec, i think the simple way to measure is through output pin..
 

Interrupt Latency

Hi,

I think there is no way to reduce ISR Latency unless
you do something on OS's scheduling module. That's why you need a real-time os or install some real-time extension on your os.
ISR Latency happens when you set interrupt vector
of a interrupt number to a specific interrupt service routine and os scheduling module doing task switching and push cpu register value into stack for future use after ISR finished execution.
Time delay between PIC received interrupt request and os start to execute isr is what we called ISR latency,so you only can reduce is using higher priority interrupt vector otherwise with real-time os or modify os by yourself.

Goodluck
 
Re: Interrupt Latency

shangwa said:
Hi,

I think there is no way to reduce ISR Latency unless
you do something on OS's scheduling module. That's why you need a real-time os or install some real-time extension on your os.
ISR Latency happens when you set interrupt vector
of a interrupt number to a specific interrupt service routine and os scheduling module doing task switching and push cpu register value into stack for future use after ISR finished execution.
Time delay between PIC received interrupt request and os start to execute isr is what we called ISR latency,so you only can reduce is using higher priority interrupt vector otherwise with real-time os or modify os by yourself.

Goodluck

Agreed. Interrupt latency is the feature of an OS. An RTOS will guarantee you a certain value for the interrupt latency. A General purpose OS may not give you this value, but you can find it from the many studies that people have made with varying loads.

Hence if you want to reduce interrupt latency, check with a different OS!
 

Re: Interrupt Latency

papyaki said:
Hi,

For mesuring interrupt latency, I think you need a oscilloscope or a logic state analyser. By entering the interrupt service routine (ISR), you need to activite an available port on your hardware (like a led port or so on) and desactivate it just before returning from the ISR. You can do that by writing the appropriate code.

By connecting one input of the oscilloscope (or logic state analyser) to the INTR pin of the microprocessor and the second one to the port you activate/desactivate, you can measure the latency time and the duration of the ISR.

I have done this with some succes in the past.
That's right. In the case of external trigger source, it's OK. But I wonder if it's a internal timer interrupt without output pin, should we need another way to measure the interrupt latency?
And another question, is the interrupt latency same in the same OS for different interrupt source?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top