t-kernel/itron - · pdf fileitron/t-kernel is chip-agnostic, ... andescore, arc 600, arm...
Post on 26-Apr-2018
233 views
Embed Size (px)
TRANSCRIPT
T-Kernel/ITRON
Ken Sakamura
Professor at the University of Tokyo
Chair of T-Engine Forum
1Copyright 2014 by T-Engine Forum., All Rights Reserved.
What is ITRON/T-Kernel?
2Copyright 2014 by T-Engine Forum., All Rights Reserved.
Embedded Systems
Computers are not just PCs Embedded systems
Software systems embedded inside consumer electronics,
automobiles, sensors/actuators, , etc.
In fact, 98% of computing devices are embedded systems
By 2020, over 40 billion embedded processors are predicted to be
sold annually [ARTEMIS Joint Undertaking (EU)]
3Copyright 2014 by T-Engine Forum., All Rights Reserved.
What is Real-Time?
(Hard) Real-Time Computer must process the given jobs within a specific amount
of time (referred to as deadline)
PCs are NOT hard real-time systems Users can wait until to disappear for practically indefinite
amount of time
Embedded systems ARE real-time systems E.g., Automobile must cause its brakes to work immediately
The time MUST be assured to be upper-bounded; otherwise,
Same for other embedded systems
Because embedded systems interact with physical environments
4Copyright 2014 by T-Engine Forum., All Rights Reserved.
Real-Time OS
Real-Time Operating System (RTOS) Operating system with real-time assurance
Multi-task (multi-thread) model
Simplifies programming of operation workflows
Task switching with real-time assurance
5Copyright 2014 by T-Engine Forum., All Rights Reserved.
Response time not bounded
Real-Time OS
Is RTOS really needed? Is it practical for application programmers to write application
codes to assume real-time behavior on multiple tasks by hand?
Apparently too complex to handle The use of event-driven OS is thus limited to extremely-
constrained devices & simple application scenarios
6Copyright 2014 by T-Engine Forum., All Rights Reserved.
Real-Time OSThen, why not Linux or Android?
Too heavy to ensure hard real-time, even when real-time
scheduler is selected
Lets compare the boot sequence
7Copyright 2014 by T-Engine Forum., All Rights Reserved.
Linux (typically boots with 10 secs) T-Kernel 2.0 + T2EX (boots instantly)
TRON Project
TRON Project Started in 1984 to build an ideal computer architecture
The vision we pursue has been HFDS (highly functional
distributed system)
a.k.a. IoT (Internet of Things), Ubiquitous Computing, M2M,
One of the most important contributions is the
standard embedded real-time OS (RTOS)
ITRON (Industrial TRON) family (1987)
T-Kernel family (2002)
8Copyright 2014 by T-Engine Forum., All Rights Reserved.
ITRON
ITRON Features Real-time operating system
TRON sub-framework for embedded devices
Open architecture
Specification made publicly available without any fee
Chip Agnostic
Not restricted to a specific hardware nor chip
Efficient
Equipped with abundant synchronization/communication API
No virtualization, no processes
Optimization
Allows chip-dependent optimizations
Relaxed specifications of chip-dependant functions (like interrupts)
9Copyright 2014 by T-Engine Forum., All Rights Reserved.
The Birth of T-Kernel
Evolution of OS never ends As long as the computer evolves
e.g. 64-bit address space space-efficient page tables
e.g. higher clock frequency low-power (clock/power-gating, etc.)
e.g. multi-core, virtualization
Embedded technology advanced a lot since ITRON in 1987
T-Kernel is the ITRON for the 21st century Based on the ITRON, industrial-proven for long since 1980s
But with major revision to be adopted for computing technology
of the 21st century
10Copyright 2014 by T-Engine Forum., All Rights Reserved.
T-Kernel
Additional T-Kernel Features Open source
The source code for T-Kernel is distributed for free
Anyone can use it, alter them, and sell them
Higher compatibility
Achieved by the reference source code
The original source code defines the specification, with no
ambiguity
Middleware and applications made reusable
High compatibility makes software no longer strongly tied to
specific board or chip
Minimize the cost to develop richer embedded application systems
11Copyright 2014 by T-Engine Forum., All Rights Reserved.
Acceptance of ITRON/T-Kernel
ITRON/T-Kernel as a de facto standard Due to the successful concept and cooperation, ITRON/T-
Kernel is now one of the de facto standards in the world RTOS
According to a survey, ITRON/T-Kernel has had the topmost
share for 18 consecutive years
12Copyright 2014 by T-Engine Forum., All Rights Reserved.
TRON Ecosystem
13Copyright 2014 by T-Engine Forum., All Rights Reserved.
Maturity of ITRON/T-Kernel
14Copyright 2014 by T-Engine Forum., All Rights Reserved.
Maturity
ITRON/T-Kernel is a mature technology, having
almost 30 years of industrial experience
Thus accepted by mission critical applications Artificial satellites, spacecrafts,
15Copyright 2014 by T-Engine Forum., All Rights Reserved.
Space Ships
Hayabusa Launched in May 2013, and returned to the Earth in June 2010
Has continued to work for 7 years in space
Space Ship Hayabusa CPU: SH-3(SH7708) with triple redundancy
OS: ITRON
Space Probe MINERVA CPU: SH-3 (SH7708)
OS: ITRON
Copyright 2014 by T-Engine Forum., All Rights Reserved.
Artificial Satellites
Space Ship Akatsuki and Solar Power Sail IKAROS Launched in May 2010
Controlled by T-Kernel Camera control for Venus
atmosphere observation
Expansion and control of solar sail
Processing photographs
Space Telescope Hisaki (SPRINT-A) Launched in September 2013
Controlled by T-Kernel
17Copyright 2014 by T-Engine Forum., All Rights Reserved.
Proven Performance
T-Kernel performance proved to perform the best
in IEEE-authorized, third-party paper In both context-switching and interrupt-handling
18Copyright 2014 by T-Engine Forum., All Rights Reserved.
Source: T.Nguyen, B. Anh, S. Tan: Real-time operating systems for small microcontrollers,
IEEE Micro Sept./Oct. 2009, pp-30-45
Evolution of ITRON/T-Kernel
19Copyright 2014 by T-Engine Forum., All Rights Reserved.
Evolving T-KernelAgain, evolution of OS never ends
As long as the computer evolves
T-Kernel has continued to evolve to meet the
demands of the era T-Kernel Standard Extension
T-Kernel
MP T-Kernel (SMP/AMP)
T-Kernel 2.0
T-Kernel 2.0 Extension (T2EX)
T-Kernel 2.0
20Copyright 2014 by T-Engine Forum., All Rights Reserved.
Evolving T-Kernel
T-Kernel Standard Extension Extension to add PC-like rich OS functionalities to RTOS
File systems, processes, standard I/O,
Accepted in informational devices
Car navigation systems,
T-Kernel Compacted version of T-Kernel
Can be used with 8KB ROM and 4KB RAM
Suitable for 16-bit/32-bit processors with less ROM/RAM
21Copyright 2014 by T-Engine Forum., All Rights Reserved.
Evolving T-Kernel
MP T-Kernel Multi-processor and Multi-core support for T-Kernel
Support for two models: AMP and SMP
AMP (Asymmetric multi-processing)
Each OS instance for each processors/cores Suitable for I/O-intensive applications,
especially when tasks works with little dependencies
SMP (Symmetric multi-processing)
One OS instance works on multi-processors No need to define which task on which CPU Suitable for CPU-intensive applications Tend to lose real-time behavior by locks for resource protection
22Copyright 2014 by T-Engine Forum., All Rights Reserved.
Evolving T-Kernel
T1 to T2 After 10 years of T-Kernel, embedded computer systems have
drastically changed
At the same time, network, communication, and server-side
technologies have evolved
e.g., IPv6, WPAN, Cloud Computing,
23Copyright 2014 by T-Engine Forum., All Rights Reserved.
Now is the time for major update of T-Kernel:
T-Kernel 2.0 (T2) the new RTOS for the age of IoT(Internet of Things)
Evolving T-Kernel 2.0
T-Kernel 2.0 Major update of T-Kernel for the next decades
Real-time support beyond RTOS
Microsecond API (e.g., tk_dly_tsk_u)
Physical-timer functions
Fast locks (FastLock, FastMLock, )
Microwaits (WaitUsec, WaitNsec, )
Support for large-capacity devices
Embedded systems now handles large-capacity disks
e.g. Digital camera with MicroSD card > 4GB
24Copyright 2014 by T-Engine Forum., All Rights Reserved.
Evolving T-Kernel 2.0
Is Microsecond API really needed? Not always, but YES
e.g. engines and motors
When they rotate with 6,000 times per minute (6,000rpm), they
rotate 36 degrees in 1 millisecond
e.g. network communications
Inter-frame gap of Ethernet (10Mbps): 9.6s
Initial retransmit time of data-link layer protocols
(incresed by exponential backoff): 10s200s
25Copyright 2014 by T-Engine Forum., All Rights Reserved.
Evolving T-Kernel
T-Kernel 2.0 Extension (T2EX) RTOS Extension w