Embedded erlang-fscons-2010
-
Upload
fscons -
Category
Technology
-
view
2.017 -
download
0
Transcript of Embedded erlang-fscons-2010
![Page 1: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/1.jpg)
Embedded ErlangDevelopment environment for Embedded Erlang
Fredrik Andersson, Niclas Axelsson, Fabian Bergström, Christoffer Ferm, Henrik Nordh, Gustav Simonsson
Erlang Solutions Ltd.
FSCONSGothenburg, November 2010
Erlang Solutions Ltd.
![Page 2: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/2.jpg)
Copyright 2010 Erlang Solutions, Ltd
Background
• Thesis projects– Uppsala University and Erlang Solutions
• Embedded Platform– OS platform for embedded devices
• Embedded Erlang– Erlang on embedded devices
• Erlang VM Extensions– Better hardware utilization
• Framework for data sharing– Automatic data sharing
![Page 3: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/3.jpg)
Copyright 2010 Erlang Solutions, Ltd
Motivation
![Page 4: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/4.jpg)
Copyright 2010 Erlang Solutions, Ltd
Erlang
• Development started 1987 at Ericsson Computer Science Lab. Released as opensource 1998, Ericsson is still the active maintainer
• Native support for SMP and Concurrency using message passing
• History in Telecom buisness. Designed with Robustness and Low Down Time in mind.
• Used by among others, Facebook (Facebook chat), T-Mobile (WAP, SMS), Klarna (e-commerce)
![Page 5: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/5.jpg)
Embedded PlatformHenrik Nordh, Gustav Simonsson
![Page 6: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/6.jpg)
Copyright 2010 Erlang Solutions, Ltd
Embedded OS Usage
![Page 7: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/7.jpg)
Copyright 2010 Erlang Solutions, Ltd
Goals
• Minimal Linux system with Erlang and tools
• Different versions for different purposes
• Easy-to-install package
• Reduce time-to-productivity for embedded Erlang developers
![Page 8: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/8.jpg)
Copyright 2010 Erlang Solutions, Ltd
Metrics
• Evaluating Linux distributions– memory– disk usage– boot times– harware support
• Embedded focus
![Page 9: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/9.jpg)
Copyright 2010 Erlang Solutions, Ltd
Allocated Memory After Boot
Ubuntu-10.04-minimal-armel
Ångström console-image
Debian-5.0-lenny-arm
Ångström minimal-image
Modified Ångström
0 5 10 15 20 25 30
![Page 10: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/10.jpg)
Copyright 2010 Erlang Solutions, Ltd
Root File System Size
Ubuntu-10.04-minimal-armel
Ångström console-image
Debian-5.0-lenny-arm
Ångström minimal-image
Our Modified Ångström
0 50 100 150 200 250 300
![Page 11: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/11.jpg)
Copyright 2010 Erlang Solutions, Ltd
The Ångström Distribution
• Linux for embedded devices
• Smallest image uses 11 MB disk, 16.2 MB memory
• Default distribution for several devices– BeagleBoard– Gumstix– Pandora (portable gaming console)
• Easy to customise with OpenEmbedded
![Page 12: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/12.jpg)
Copyright 2010 Erlang Solutions, Ltd
OpenEmbedded
• Framework for building embedded Linux Distributions
• Several hardware architectures
• 1000+ packages pre-defined
• Quite complex, but powerful
• Handles dependencies, sources, configuration, cross-compilation etc.
![Page 13: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/13.jpg)
Copyright 2010 Erlang Solutions, Ltd
uClibc
• Much smaller than glibc, smaller than EGLIBC
• Source compatible with glibc, not binary compatible
• Highly configurable
![Page 14: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/14.jpg)
Copyright 2010 Erlang Solutions, Ltd
BusyBox
• Smaller versions of UNIX utilities in a single binary
• Written with size-optimisation and limited resources in mind
• Very modular and configurable
• Well-tested against uClibc
![Page 15: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/15.jpg)
Copyright 2010 Erlang Solutions, Ltd
Maintaining Different Versions
• “Minimal”
• “Debug”
• “Extended”
• Binary installation packages for common platforms
• Latest Erlang version included
![Page 16: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/16.jpg)
Adapting Erlang forEmbedded Systems
Fredrik Andersson, Fabian Bergström
![Page 17: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/17.jpg)
Copyright 2010 Erlang Solutions, Ltd
Goals
The Virtual machine must be adapted to the limited resources of embedded systems.
• Low RAM consumption– How can we reduce RAM usage?– How will this impact performance?
• Low Disk usage– How can we keep disk usage low?– Performance?
• Benchmarks, analysis and documentaion.
![Page 18: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/18.jpg)
Copyright 2010 Erlang Solutions, Ltd
Progress, Memory Usage
70k
80k
70k
60k
60k60k
60k
60k 60k
70k
80k
60k
60k
60k 60k
60k 60k
70k 60k
60k 60k
60k
![Page 19: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/19.jpg)
Copyright 2010 Erlang Solutions, Ltd
Progress, Disk Usage
Vanilla ErlangCompressed Applications
-Os, strip, stripped beams
0
1
2
3
4
5
6
7
Size on disk
Me
ga
byt
es
![Page 20: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/20.jpg)
Copyright 2010 Erlang Solutions, Ltd
Progress, Hardware
• VM compiled for Gumstix, BeagleBoard– BeagleBoard is a prototyping platform– Gumstix is a much smaller system for commercial use
• TI OMAP35x– Another thesis project for OpenGL and DSP from Erlang
![Page 21: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/21.jpg)
Copyright 2010 Erlang Solutions, Ltd
The Future
• Support for more hardware– Pandaboard, utilizing the latest multicore ARM processor
• Documentation for embedded Erlang development– How should you utilize Erlang tools for handling project mangement
• Real world application– Small measuring nodes in larger distributed systems
![Page 22: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/22.jpg)
Adding support for special purpose computing units to the Erlang VM
Christoffer Ferm
![Page 23: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/23.jpg)
Copyright 2010 Erlang Solutions, Ltd
Erlang VM Charasterics
• Good support for SMP– Added in 2006
• Easy approach to utilizing SMP for developers– Message passing– Lightweight processes
![Page 24: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/24.jpg)
Copyright 2010 Erlang Solutions, Ltd
Modern Processing Units
• CPU– Already supported
• GPU– OpenCL– Other GPGPU
• Digital Signal Processor
• Cryptoprocessors
![Page 25: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/25.jpg)
Framework for Data ExchangeBetween Mobile Nodes
Niclas Axelsson
![Page 26: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/26.jpg)
Copyright 2010 Erlang Solutions, Ltd
Introduction
• Mobile devices with limited resources– Phones– Cars
• Dynamic ad-hoc networks
• Delay tolerant data
![Page 27: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/27.jpg)
Copyright 2010 Erlang Solutions, Ltd
Features
• Written in Erlang
• Simple to configure
• Takes care of the communication between nodes
• Handles storage of data
• A subscription system
![Page 28: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/28.jpg)
Copyright 2010 Erlang Solutions, Ltd
Example Applications
• Music player – share songs
• Announcement systems
• Statistics gathering
![Page 29: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/29.jpg)
The erlang-embedded homepage
![Page 30: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/30.jpg)
Copyright 2010 Erlang Solutions, Ltd
www.erlang-embedded.com
• First release “Stag Beetle” is already out.– Next release is scheduled around the 16th of november
• Mailinglist– [email protected]
• Github– http://github.com/esl/erlang-embedded
![Page 31: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/31.jpg)
Copyright 2010 Erlang Solutions, Ltd
Thank you
Questions?
![Page 32: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/32.jpg)
Copyright 2010 Erlang Solutions, Ltd
The Hardware
![Page 33: Embedded erlang-fscons-2010](https://reader033.fdocuments.in/reader033/viewer/2022052523/5552de48b4c905014c8b4c1c/html5/thumbnails/33.jpg)
Copyright 2010 Erlang Solutions, Ltd
Embedded Market
• 2006: 4 billion embedded processors sold worldwide
• 2010: 16 billion
• 2020: 40 billion
• Intel estimates 15 billion will be connected in swarms or over the Internet by 2015
• ARM announced embedded multi-core CPU in okt 2009