![Page 1: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/1.jpg)
Latency in Embedded Systems
1December 16, 2009
Sean Simmons
Director, DSP
RIM
![Page 2: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/2.jpg)
Latency - Definitions
“Time delay between input event being applied to a
system and the associated output action from the
system”
• Input event can be things like:
• Change in sound - someone tells you a joke.
2
• Change in sound - someone tells you a joke.
• Change in voltage - interrupt line activation.
• Arrival of a message from another thread/process/computer.
• Output action can be things like:
• Change in sound - you laugh at a joke.
• Change in voltage - output pin changes polarity.
• Sending of a message to another thread/process/computer.
![Page 3: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/3.jpg)
Latency – When is it Important?
• Typically when there is feedback:
• Conversation between two people. Conversations suffer when
there is a large time delay between what you say and then hearing
their response.
• Client-server protocols. Either end may have expectations on how
long a response should take
• Control systems. Car breaking systems or home heating systems.
3
• Control systems. Car breaking systems or home heating systems.
• User interfaces. Time from key press to displaying character on
screen.
• Typically not important when there is no feedback:
• Broadcast. Of course there are limits – a latency of
hours/days/years might be problematic.
• Recording something for playback at some later time.
![Page 4: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/4.jpg)
Latency – How Much?• Tolerance to increasing latency is system dependent.• Most systems have a point at which they cease to
“function” as designed.• “Point” of failure is very system dependent.
Varies over many orders of magnitude– nanoseconds to hours.
4
• Failure mode (or degradation) is system dependent.• For most computer protocols degradation is catastrophic.• For control systems degradation usually results in instability.• For end-to-end-delay in speech tele-services, perceived
degradation is gradual and “smooth”.
![Page 5: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/5.jpg)
Latency – Categorization• Scheduling
• Buffering to manage different clock domains (radio/packet clock vssample clock)
• Buffering for network queuing 'jitter' of packets• Buffering for task scheduling (sharing of processor resources)• Inherent in system design (TDM Radio Interface)
• Resource Limitations
5
• Resource Limitations• Time to execute functions (processor clock rate),• Influence of memory hierarchies/system design• HW limitations (serial ports)
• Algorithmic• Delay in filters• Interleavers
![Page 6: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/6.jpg)
Latency in Phone Calls
6
• One way delays >150 ms start to impact call quality.
• Delay can vary between calls.• Delay can vary within calls.
![Page 7: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/7.jpg)
GSM Handset Block Diagram
7
![Page 8: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/8.jpg)
GSM Handset – Radio Timing
8
![Page 9: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/9.jpg)
GSM Handset – Timing and Latency
9
![Page 10: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/10.jpg)
GSM Handset – Scheduling Jitter
10
![Page 11: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/11.jpg)
GSM Handset – Memory Hierarchy
11
![Page 12: Latency in Embedded Systemsmkarsten/cs856-W10/lec06.pdf · Latency - Definitions “Time delay between inputevent being applied to a system and the associated outputaction from the](https://reader033.vdocuments.us/reader033/viewer/2022042403/5f1790ae38375b4d250a326b/html5/thumbnails/12.jpg)
VoIP
12