This document discusses using lock-free parallel processing techniques to increase the robustness of guidance, navigation, and control systems. It presents benchmark results showing that lock-free approaches can process data faster using less CPU and power compared to traditional lock-based techniques. This deterministic and high-performance approach is proposed to help space applications like Earth observation and telecommunications that require processing large volumes of sensor data onboard with strict power constraints.
A Secure and Reliable Document Management System is Essential.docx
IAC 2020
1. A DETERMINISTIC AND HIGH PERFORMANCE
PARALLEL DATA PROCESSING APPROACH
TO INCREASE GUIDANCE NAVIGATION AND
CONTROL ROBUSTNESS.
pablo.ghiglino@klepsydra.com
www.klepsydra.com
2. CONTEXT: PARALLEL PROCESSING
• Recurrent mission
failures due to
software
• Access to sensor data
from Earth is time
consuming.
• Satellites struggle to
meet power
requirements
Consequences for Space applications
Challenges on on-board processing
CPU
Usage
Low Medium
Data volume
Modern hardware and old
software:
• Computers max out with low to
medium data volumes
• Inef
fi
cient use of resources
• Excessive power for low data
processing
3. COMPARE AND SWAP
• Compare-and-swap (CAS) is an instruction
used in multithreading to achieve
synchronisation. It compares the contents of
a memory location with a given value and,
only if they are the same, modi
fi
es the
contents of that memory location to a new
given value. This is done as a single
atomic operation.
• Compare-and-Swap has been an integral
part of the IBM 370 architectures since
1970.
• Maurice Herlihy (1991) proved that CAS can
implement more of these algorithms than
atomic read, write, and fetch-and-add
4. LOCK BASED PARALLELISATION VS
LOCK FREE PARALLELISATION
• Threads need to acquire lock to access resource.
• Context switch:
• Suspended while resource is locked by
someone else
• Awaken when resource is available.
• Not deterministic, power consuming context switch.
• Threads access resources using ‘Atomic Operations’
• Compare and Swap (CAS):
• Try to update a memory entry
• If not possible tried again
• No locks involved, but ‘busy wait’
• No context switch required.
5. BENCHMARK TEST
Mutex based queue Lock-free ring buffer
Sensor data serialisation example
• Sensor data is sent to a queue for processing.
• Consumer listening to the queue that collects sensor data.
• When a number of data instance is reached. It is serialised and stored.
6. 6
Technical Spec:
• Processor: Xilinx ZedBoard
• OS: PetaLinux
• Middleware: CAN-bus/CAN-open
Benchmark Scenario:
• Multi-sensor data processing
• Mutex-based vs Lock-free parallelisation
Stddev of processing time
Standar
Dev
(%)
0
5
9
14
18
23
Data Event Rate (Hz)
280 1120 1960 2800
Mutex-based Lock-free
Data Processing Rate Comparison
Data
Processing
Rate
(Hz)
2300
2500
2700
2900
3100
Time (s)
0 98 184 260 354
Mutex-based Lock-free
CPU Usage Comparison
Process
CPU
(%)
58
63
68
73
78
83
Data Event Rate (Hz)
280 1120 1960 2800
Mutex based Lock-free
Xilinx/CAN Benchmark (Linux)
Deterministic
7. Power consumption 2 Topic
CPU
(%)
42
49
55
Data Rate (Hz)
0 1 2
Klepsydra
Single Queue
Power consumption 4 Topic
CPU
(%)
50
60
70
Data Rate (Hz)
0 1 2
Klepsydra
Multi queue
Single Queue
Data Throughout 2 Topic
Process
data
rate
(Hz)
0
1
2
Data Rate (Hz)
0 1 2
Klepsydra
Single Queue
Data Throughout 4 Topic
Process
data
rate
(Hz)
0
1
2
Data Rate (Hz)
0 1 2
Klepsydra
Multi queue
Single Queue
GR716 Benchmark (RTEMS)
8. PROS AND CONS OF LOCK-FREE
PROGRAMMING
CPU
Usage
Data volume
CPU
Usage
Data volume
Lock-free programming
Pros:
• Less CPU consumption required
• Lower latency and higher data throughput
• Substantial increase in determinism
Cons:
• Extremely dif
fi
cult programming
technique
• Requires processor with CAS instructions
(90% of the market have them, though)
11. Vision-based navigation Earth Observation Telecommunications
• Process more images per
second
• Increase con
fi
dence in the
mission
• Reduce power consumption up
to 50%
• Faster access to data from Earth
• Increase processed request per
second (increase revenue)
• Enable AI telecomm (Cognitive
radios)
APPLICATION TO SPACE
11
12. KLEPSYDRA SDK
Cobham Gaisler Benchmark
Power consumption vs Data Processing
Power
(%)
10
33
55
78
100
Data processing rate (Hz)
0 10 20 30 40
Traditional
edge software Klepsydra
Klepsydra Software Development Toolkit
Sensors
External
Comms
Other Events
Application
Operating System
• Process 100% more data
• Reduce 30% power consumption
• No extra hardware, no cloud computing.
13. KLEPSYDRA AI
Data
processing
speed
Power
Saving
Klepsydra AI can process more data
with less power than the lead AI
software solutions for embedded
systems
AI power consumption comparison
Power
Consumption
(%)
40
70
100
Data rate (Hz)
0 1 2
Klepsydra
OpenCV
TensorFlow
AI data volume comparison
Processed
data
(Hz)
0
1
2
Data rate (Hz)
0 1 2
TensorFlow
Klepsydra AI
OpenCV
14. FUTURE WORK
• Lock-free programming techniques can be also of use in
hardware acceleration like FPGA and GPU
• Based on state of the art academic research, combining
pipelining with Lock-free memory synchronisation,
processing performance can be multiplied in at least 1 order
of magnitude with respect to standard techniques.
• Klepsydra is already working towards this goal.
15. CONCLUSIONS
• Lock-free programming techniques bring three main
bene
fi
ts to on-board processing:
• Faster data processing
• Reduce power consumption on-board
• Determinism
• The bene
fi
ts for Space system are clear for those areas
needing large data processing: EO, Navigation and telecom. Dr Pablo Ghiglino
pablo.ghiglino@klepsydra.com
+41786931544
www.klepsydra.com
linkedin.com/company/klepsydra-technologies