1st Edition

Real-Time Embedded Systems Open-Source Operating Systems Perspective

534 Pages 134 B/W Illustrations
by CRC Press

534 Pages 134 B/W Illustrations
by CRC Press

534 Pages 134 B/W Illustrations
by CRC Press

From the Foreword: "…the presentation of real-time scheduling is probably the best in terms of clarity I have ever read in the professional literature. Easy to understand, which is important for busy professionals keen to acquire (or refresh) new knowledge without being bogged down in a convoluted narrative and an excessive detail overload. The authors managed to largely avoid... Read more

Introduction

 

I: Concurrent Programming Concepts


A Case Study: Vision Control

Input Output on Computers

Input/Output Operations and the Operating System

Acquiring Images froma Camera Device

Edge Detection

Finding the Center Coordinates of a Circular Shape


Real-Time Concurrent Programming Principles

The Role of Parallelism

Definition of Process

Process State

Process Life Cycle and Process State Diagram

Multithreading


Deadlock

A Simple Example

Formal Definition of Deadlock

Reasoning about Deadlock: The Resource Allocation Graph

Living with Deadlock

Deadlock Prevention

Deadlock Avoidance

Deadlock Detection and Recovery


Interprocess Communication Based on Shared Variables

Race Conditions and Critical Regions

Hardware-Assisted Lock Variables

Software-Based Mutual Exclusion

From Active to Passive Wait

Semaphores

Monitors


Interprocess Communication Based on Message Passing

Basics ofMessage Passing

Naming Scheme

Synchronization Model

Message Buffers

Message Structure and Contents

Producer–Consumer Problem with Message Passing


Interprocess Communication Primitives in POSIX/Linux

Threads and Processes

Interprocess Communication among Threads

Interprocess Communication among Processes

Clocks and Timers

Threads or Processes?


Interprocess Communication Primitives in FreeRTOS

FreeRTOS Threads and Processes

Message Queues

Counting, Binary, and Mutual Exclusion Semaphores

Clocks and Timers


Network Communication

The Ethernet Protocol

TCP/IP and UDP

Sockets

UDP Sockets


Lock and Wait-Free Communication

Basic Principles and Definitions

Multidigit Registers

Application to the Readers/Writer Problem

Universal Constructions

 

II: Real-Time Scheduling Analysis


Real-Time Scheduling Based on the Cyclic Executive

Scheduling and Process Models

The Cyclic Executive

Choice of Major and Minor Cycle Length

Tasks with Large Period or Execution Time


Real-Time, Task-Based Scheduling

Fixed and Variable Task Priority

Rate Monotonic

The EarliestDeadline First Scheduler


Schedulability Analysis Based on Utilization

Processor Utilization

Sufficient Schedulability Test for Rate Monotonic

Schedulability Test for EDF


Schedulability Analysis Based on Response Time Analysis

Response Time Analysis

Computing the Worst-Case Execution Time

Aperiodic and Sporadic Tasks


Task Interactions and Blocking

The Priority Inversion Problem

The Priority Inheritance Protocol

The Priority Ceiling Protocol

Schedulability Analysis and Examples


Self-Suspension and Schedulability Analysis

Self-Suspension and the Critical Instant Theorem

Self-Suspension and Task Interaction

Extension of the Response Time Analysis Method

 

 

III: Advanced Topics


Internal Structure of FreeRTOS

Task Scheduler/Context Switch

Synchronization Primitives

Porting FreeRTOS to a New Architecture


Internal Structures and Operating Principles of Linux Real-Time Extensions

The Linux Scheduler

Kernel Preemption

The PREEMPT RT Linux Patch

The Dual-Kernel Approach


OS Abstraction Layer

An Object Oriented Interface to Threads and Other IPC Mechanisms

A Sample Multiplatform Application


Control Theory and Digital Signal Processing Primer

Case Study 1: Controlling the Liquid Level in a Tank

Case Study 2: Implementing a Digital Low-Pass Filter

Biography

Bertolotti, Ivan Cibrario; Manduchi, Gabriele