Embedded Operating Systems { Basic notions of Operating Systems Objectives of an Operating System Make the computer system convenient to use in an efficient manner. Internet of Things Hide the details of the hardware resources from the users. Embedded Operating Systems Provide users a convenient interface to use the computer system. Act as an intermediary between the hardware and its users, Ioannis Chatzigiannakis making it easier for the users to access and use other resources. Sapienza University of Rome Manage the resources of a computer system. Department of Computer, Control, and Management Engineering (DIAG) Keep track of who is using which resource, granting resource requests, and mediating conflicting requests from different Lecture 3: programs and users. Embedded Operating Systems Provide efficient and fair sharing of resources among users and programs. 1 / 36 2 / 36 Embedded Operating Systems { Basic notions of Operating Systems Embedded Operating Systems { Basic notions of Operating Systems Main elements of an Operating System Main services of an Operating System Operating System (OS) Operating System (OS) A collection of software that manages the hardware resources and A collection of software that manages the hardware resources and provides various service to the users. provides various service to the users. 1 Processor 1 Process management. Performs the data processing functions. Load into main memory, execute programs. Controls the operation of the computer. 2 Resource Allocation 2 Main Memory 3 Memory Management volatile storage. Allocate/de-allocate memory. 3 I/O Modules Virtual memory. non volatile storage, 4 File System communications, 5 Communication terminals. Interprocess communication, across Computer Networks. 4 System Bus 6 Error detection and response. communication among components. 7 Authentication, Authorization, Accounting. 3 / 36 4 / 36 Embedded Operating Systems { Basic notions of Operating Systems Embedded Operating Systems { Basic notions of Operating Systems Interacting with the Operating System Type of Operating Systems Kernel mode: 1 Batch systems: jobs entered as a whole and in sequence. has complete access to all Purpose specific. the hardware 2 Interactive systems: allow multiple jobs Purpose specific or General purpose. can execute any instruction Turnaround: Faster than batch { slower than real-time. that a machine is capable of 3 Hybrid systems { combination of batch and interactive. executing 4 Network operating systems { for network devices. has high privileged (rights) 5 Real-time systems Purpose specific { reliability is critical. User mode: Used in time-critical environments { fixed time constraints. can execute only subset Hard vs Soft: Hard: total failure if deadline missed (few) of the machine Soft: suffer performance degradation due to a missed deadline. instructions 6 Embedded systems { single machine / purpose specific. has less privileged (rights) 7 Wireless sensor systems { multiple nodes / purpose specific. 8 Smart card operating systems 5 / 36 6 / 36 Embedded Operating Systems { Operating Systems for IoT Embedded Operating Systems { Operating Systems for IoT Software platforms for IoT Operating systems for IoT Memory: Kilobytes instead of Gigabytes. CPU: Megahertz instead of Gigahertz. TinyOS { statically linked applications. Energy: Milliwatt instead of Watt. ContikiOS { dynamic linking of binaries, no thread support. Potentially limited storage capabilities. FreeRTOS { real-time operating system. Probably without direct connectivity to Internet. RIOT { focuses on constrained devices + interoperability. Diverse hardware peripherals that can be connected. ARM mbed { targeting ARM Cortex M series. no standard platform to develop applications. Zephyr { real-time on constrained devices. 7 / 36 8 / 36 Embedded Operating Systems { STM32 Nucleo Development Process Embedded Operating Systems { ARM MBed ARM Mbed OS STM32 family provides wide range of devices with limited resources: Memory as low as 16KB. Some may have direct connectivity to Internet. Arm Mbed OS is a free, open-source embedded operating system designed specifically for the Applications can be "things" in the Internet of Things. It includes all developed by tools: the features you need to develop a connected 1 STM32CubeMX product based on an Arm Cortex-M 2 Middleware microcontroller (32 bit). 3 IDE 9 / 36 10 / 36 Embedded Operating Systems { ARM MBed Embedded Operating Systems { ARM MBed Main Features Modular - Ease of Use With a modular library structure, the necessary underlying support for your application will be automatically included on your device. By using the Mbed OS API, your application code can remain clean, portable and simple. End to End Security It addresses security in device hardware, software, communication. Open Source https://github.com/ARMmbed/mbed-os Community Big community support and Forum. Possibility to use drivers and libraries developed by third party. 11 / 36 12 / 36 Embedded Operating Systems { ARM MBed Embedded Operating Systems { ARM MBed Toolchains and IDE ARM MCU to Cloud Two possibilities: Offline toolchains, (Arm Online IDE, no setup and Compiler 6, GCC and IAR) that easiest way to get started. support Arm Mbed CLI. 13 / 36 14 / 36 Embedded Operating Systems { ARM MBed Embedded Operating Systems { ARM MBed ARM MBED Cloud Platform 15 / 36 16 / 36 Embedded Operating Systems { Zephyr OS Embedded Operating Systems { Zephyr OS Zephyr OS Main Features Provide an OS that runs best on MCUs for wearable and IoT devices, where the cost of the silicon is minimal. Highly Configurable. Kernel mode only Zephyr OS is a scalable, real-time operating Nanokernel { Limited functionality targeting small footprint system (RTOS) for embedded devices. (below 10k) Microkernel (superset of nanokernel): with additional Open source. functionality and features. Cross-architecture with broad SoC and No user space and no dynamic runtimes development board support. Memory and Resources are typically statically allocated Cross architecture (IA32, ARM, ARC) 17 / 36 18 / 36 Embedded Operating Systems { Zephyr OS Embedded Operating Systems { Zephyr OS Native Execution Native vs Normal Build Zephyr as native Linux application Enable large scale simulation of network or Bluetooth tests without involving HW Improve test coverage of application layers Use any native tools available for debugging and profiling Develop GUI applications entirely on the desktop Optionally connect to real devices with TCP/IP, Bluetooth, and CAN Reduce requirements for HW test platforms during development 19 / 36 20 / 36 Embedded Operating Systems { Zephyr OS Embedded Operating Systems { Zephyr OS Zephyr Architecture Highly Configurable, Highly Modular Cooperative and Preemptive Threading Memory and Resources are typically statically allocated Integrated device driver interface Memory Protection: Stack overflow protection, Kernel object and device driver permission tracking, Thread isolation Bluetooth Low Energy (BLE 5.1) with both controller and host, BLE Mesh 802.15.4 OpenThread Native, fully featured and optimized networking stack 21 / 36 22 / 36 Embedded Operating Systems { Zephyr OS Embedded Operating Systems { Zephyr OS Zephyr Ecosystem Zephyr Project Governance 23 / 36 24 / 36 Embedded Operating Systems { RIOT Embedded Operating Systems { RIOT Goals for IoT Operating Systems Interoperability Goal Driven by a grassroots community Modular structure, adaptive to diverse hardware instead from the hardware providers/manufacturers. Micro-kernel architecture (contrary to Linux) Linux-like approach. minimal requirements around 1kB RAM Open source + Free licensed under LGPLv2.1. 2.8kB RAM, 3.2kB ROM on 32-bit Cortex-M Less garbage with less IoT device lock-down support for 50+ different IoT boards/devices. Functionalities of a full-fledged operating system. Efficient Hardware Abstraction Layer (HAL) Needed memory & energy efficiency to fit IoT devices. minimized hardware-dependent code. Faster innovation by spreading IoT software dev. costs support for 8/16/32 bit, ARM, AVR, MIPS. Setting Privace & Security at core: Supported vendors: Microchip, NXP, STMicroelectronics, 1 Long-term IoT software robustness & security Nordic, TI, ESP, RISC-V, etc. 2 Trust, transparency & protection of IoT users' privacy Large list of sensors and actuators supported (e.g drivers) native board: run RIOT as process on your computer +100 boards supported Compliance with common system standards POSIX sockets, pthreads standard C, C++ application coding 25 / 36 26 / 36 Embedded Operating Systems { RIOT Embedded Operating Systems { RIOT Hardware Abstraction Layer Modular Operating System Features are libraries ! only build what's required 3 blocks: boards, cpus, drivers CPUs are organized as follows: xtimer { high-level timer subsystem architecture (ARM) ! family (stm32) ! type (stm32l4) ! Full abstraction from the model (stm32l476rg) hardware timer Can set callbacks, put a Generic API for cpu peripherals thread to sleep, etc (gpio, uart, spi, pwm, etc) shell { interactive command same API for all architectures line Only based on vendor header files Others: crypto, fmt, math, (CMSIS) etc less code duplication, more efficient but more work Also: External packages provided and maintained by third parties. One application ! one board ! one cpu model 27 / 36 28 / 36 Embedded Operating Systems { RIOT Embedded Operating Systems { RIOT Core: Real-time scheduler Core: Multi-Threading and IPC Tickless scheduler { energy efficient. Fixed priorities { deterministic. Separate thread contexts with separate
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages9 Page
-
File Size-