Real-Time Systems Development with RTEMS and Multicore Processors
- Available for pre-order. Item will ship after November 23, 2020
The proliferation of multicore processors in the embedded market for Internet-of-Things (IoT) and Cyber-Physical Systems (CPS) makes developing real-time embedded applications increasingly difficult. What is the underlying theory that makes multicore real-time possible? How does theory influence application design? When is a real-time operating system (RTOS) useful? What RTOS features do applications need? How does a mature RTOS help manage the complexity of multicore hardware?
This book answers these questions and more with the exemplar Real-Time Executive for Multiprocessor Systems (RTEMS) RTOS to provide concrete advice and examples for constructing useful, feature-rich applications. RTEMS is free open-source software that supports multi-processor systems for over a dozen CPU architectures and over 150 specific system boards in applications spanning the range of IoT and CPS domains such as satellites, particle accelerators, robots, racing motorcycles, building controls, medical devices, and more.
The focus of this book is on enabling real-time embedded software engineering while providing sufficient theoretical foundations and hardware background to understand the rationale for key decisions in RTOS and application design and implementation. The topics covered in this book include:
- Cross-compilation for embedded systems development
- Concurrent programming models used in real-time embedded software
- Real-time scheduling theory and algorithms used in wide practice
- Usage and comparison of two application programmer interfaces (APIs) in real-time embedded software: POSIX and the RTEMS Classic APIs.
- Design and implementation in RTEMS of commonly found RTOS features for schedulers, task management, time-keeping, inter-task synchronization, inter-task communication, and networking.
- The challenges introduced by multicore hardware, advances in multicore real-time theory, and software engineering multicore real-time systems with RTEMS.
All the authors of this book are experts in the academic field of real-time embedded systems. Two of the authors are primary open-source maintainers of the RTEMS software project.
Table of Contents
Chapter 1 Introduction
PART I Operating System Basics
Chapter 2 Cross-Compilation Toolchain
2.1 From Source Code to the Executable Image
2.2 Linker Scripts
2.3 GNU Make and Makefiles
2.4 Basic Description of RTEMS and its Configuration System
Chapter 3 Concurrent Programming and Scheduling Algorithms
3.1 Foundations of Concurrent Programming
3.2 Scheduling Policies, Mechanisms, and Algorithms
Chapter 4 Scheduling Analysis and Interrupt Handling
4.1 Basics of Real-Time Scheduling Analysis
4.2 Practical Considerations on Interrupt Handling
PART II Task Management and Timekeeping
Chapter 5 Task Management and Timekeeping, Classic API
5.1 Task Management Basics
5.2 Scheduler Manager and Single-Core Scheduling Algorithms
5.3 RTEMS Classic and POSIX API
5.4 Task Management
5.5 The Rate Monotonic Manager
5.6 Timekeeping: Clocks and Timers
5.7 Preemption and Interrupt Management
Chapter 6 Task Management and Timekeeping, POSIX API
6.1 Attribute Objects
6.2 Thread Creation and Termination
6.3 Thread Scheduling
6.4 Forced Thread Termination (Cancellation)
6.5 Signal Handling
PART III InterTask Synchronization and Communication
Chapter 7 Inter-Task Synchronization and Communication (IPC) Based on Shared Memory
7.1 Race Conditions and Mutual Exclusio
7.4 RTEMS API for Shared-Memory IPC
Chapter 8 IPC, Task Execution, and Scheduling
8.1 Priority Inversion
Chapter 9 IPC Based on Message Passing
9.1 Unified Synchronization and Data Exchange
9.2 Message Passing Synchronization Models
9.3 Direct and Indirect Naming
9.4 RTEMS API for Message Passing
PART IV Network Communication
Chapter 10 Network Communication in RTEMS
10.1 Internal Structure of the RTEMS Networking Code
10.2 Protocol Stack Organization
10.3 Main Data Structures
10.4 RTEMS Port and Adaptation Layer
Chapter 11 POSIX Sockets API
11.1 Main Features
11.2 Communication Endpoint Management
11.3 Local Socket Address
11.4 Connection Establishment
11.5 Connectionless Sockets
11.6 Data Transfer
11.7 Socket Options
11.8 Non-Blocking I/O and Synchronous I/O Multiplexing
PART V Multicores in Realtime Embedded Systems
Chapter 12 Multicores in Embedded Systems
12.2 Multiprocessors and Multicores
12.3 Software Challenges Introduced by Multicores
Chapter 13 Multicore Concurrency: Issues and Solutions
13.1 Classes of Multicore Scheduling Algorithms
13.2 Multicore Scheduling Algorithms in RTEMS
13.3 Schedulers Configuration
13.4 Multicore Synchronization Devices
13.5 Lock-Free and Wait-Free Communication
13.6 Spinlocks and Interrupt Handling Synchronization
Gedare Bloom works at the Department of Computer Science at University of Colorado, Colorado Springs as an Assistant Professor. Since 2011 Professor Bloom has been a maintainer for the RTEMS open-source hard real-time OS, which is used in robotics frameworks, unmanned vehicles, satellites and space probes, automotive, defense, building automation, medical devices, industrial controllers, and more.
Joel Sherrill joined On-Line Applications Research Corporation in 1989 and is currently the Director of Research and Development. He is one of the original developers of the free real-time operating system RTEMS and current project lead.
Tingting Hu works as a research scientist in the University of Luxembourg with the Faculty of Science, Technology and Medicine. She also works as industrial consultant for leading national industries in the provision of software design solutions for real-time embedded systems, in the domain of industrial ovens, building automation and motion control.
Ivan Cibrario Bertolotti is associated with the Istituto di Elettronica e di Ingegneria dell’Informazione e delle Telecomunicazioni (IEIIT), Turin, Italy.