Real-Time Embedded Systems

Book description

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 theoretical-only presentation of the subject, which frequently affects books on operating systems.

… an indispensable [resource] to gain a thorough understanding of the real-time systems from the operating systems perspective, and to stay up to date with the recent trends and actual developments of the open-source real-time operating systems."

—Richard Zurawski, ISA Group, San Francisco, California, USA

Real-time embedded systems are integral to the global technological and social space, but references still rarely offer professionals the sufficient mix of theory and practical examples required to meet intensive economic, safety, and other demands on system development. Similarly, instructors have lacked a resource to help students fully understand the field. The information was out there, though often at the abstract level, fragmented and scattered throughout literature from different engineering disciplines and computing sciences.

Accounting for readers’ varying practical needs and experience levels, Real Time Embedded Systems: Open-Source Operating Systems Perspective offers a holistic overview from the operating-systems perspective. It provides a long-awaited reference on real-time operating systems and their almost boundless application potential in the embedded system domain.

Balancing the already abundant coverage of operating systems with the largely ignored real-time aspects, or "physicality," the authors analyze several realistic case studies to introduce vital theoretical material. They also discuss popular open-source operating systems—Linux and FreRTOS, in particular—to help embedded-system designers identify the benefits and weaknesses in deciding whether or not to adopt more traditional, less powerful, techniques for a project.

Table of contents

  1. Cover Page
  2. Half title
  3. Title Page
  4. Copyright
  5. Foreword
  6. The Authors
  7. Acknowledgments
  8. Dedication Page
  9. List of Figures
  10. List of Tables
  11. Table of Contents
  12. 1 Introduction
  13. I Concurrent Programming Concepts
  14. 2 A Case Study: Vision Control
    1. 2.1 Input Output on Computers
      1. 2.1.1 Accessing the I/O Registers
      2. 2.1.2 Synchronization in I/O
      3. 2.1.3 Direct Memory Access (DMA)
    2. 2.2 Input/Output Operations and the Operating System
      1. 2.2.1 User and Kernel Modes
      2. 2.2.2 Input/Output Abstraction in Linux
    3. 2.3 Acquiring Images from a Camera Device
      1. 2.3.1 Synchronous Read from a Camera Device
      2. 2.3.2 Virtual Memory
      3. 2.3.3 Handling Data Streaming from the Camera Device
    4. 2.4 Edge Detection
      1. 2.4.1 Optimizing the Code
    5. 2.5 Finding the Center Coordinates of a Circular Shape
    6. 2.6 Summary
  15. 3 Real-Time Concurrent Programming Principles
    1. 3.1 The Role of Parallelism
    2. 3.2 Definition of Process
    3. 3.3 Process State
    4. 3.4 Process Life Cycle and Process State Diagram
    5. 3.5 Multithreading
    6. 3.6 Summary
  16. 4 Deadlock
    1. 4.1 A Simple Example
    2. 4.2 Formal Definition of Deadlock
    3. 4.3 Reasoning about Deadlock: The Resource Allocation Graph
    4. 4.4 Living with Deadlock
    5. 4.5 Deadlock Prevention
    6. 4.6 Deadlock Avoidance
    7. 4.7 Deadlock Detection and Recovery
    8. 4.8 Summary
  17. 5 Interprocess Communication Based on Shared Variables
    1. 5.1 Race Conditions and Critical Regions
    2. 5.2 Hardware-Assisted Lock Variables
    3. 5.3 Software-Based Mutual Exclusion
    4. 5.4 From Active to Passive Wait
    5. 5.5 Semaphores
    6. 5.6 Monitors
    7. 5.7 Summary
  18. 6 Interprocess Communication Based on Message Passing
    1. 6.1 Basics of Message Passing
    2. 6.2 Naming Scheme
    3. 6.3 Synchronization Model
    4. 6.4 Message Buffers
    5. 6.5 Message Structure and Contents
    6. 6.6 Producer–Consumer Problem with Message Passing
    7. 6.7 Summary
  19. 7 Interprocess Communication Primitives in POSIX/Linux
    1. 7.1 Threads and Processes
      1. 7.1.1 Creating Threads
      2. 7.1.2 Creating Processes
    2. 7.2 Interprocess Communication among Threads
      1. 7.2.1 Mutexes and Condition Variables
    3. 7.3 Interprocess Communication among Processes
      1. 7.3.1 Semaphores
      2. 7.3.2 Message Queues
      3. 7.3.3 Signals
    4. 7.4 Clocks and Timers
    5. 7.5 Threads or Processes?
    6. 7.6 Summary
  20. 8 Interprocess Communication Primitives in FreeRTOS
    1. 8.1 FreeRTOS Threads and Processes
    2. 8.2 Message Queues
    3. 8.3 Counting, Binary, and Mutual Exclusion Semaphores
    4. 8.4 Clocks and Timers
    5. 8.5 Summary
  21. 9 Network Communication
    1. 9.1 The Ethernet Protocol
    2. 9.2 TCP/IP and UDP
    3. 9.3 Sockets
      1. 9.3.1 TCP/IP Sockets
    4. 9.4 UDP Sockets
    5. 9.5 Summary
  22. 10 Lock and Wait-Free Communication
    1. 10.1 Basic Principles and Definitions
    2. 10.2 Multidigit Registers
    3. 10.3 Application to the Readers/Writer Problem
    4. 10.4 Universal Constructions
    5. 10.5 Summary
  23. II Real-Time Scheduling Analysis
  24. 11 Real-Time Scheduling Based on the Cyclic Executive
    1. 11.1 Scheduling and Process Models
    2. 11.2 The Cyclic Executive
    3. 11.3 Choice of Major and Minor Cycle Length
    4. 11.4 Tasks with Large Period or Execution Time
    5. 11.5 Summary
  25. 12 Real-Time, Task-Based Scheduling
    1. 12.1 Fixed and Variable Task Priority
      1. 12.1.1 Preemption
      2. 12.1.2 Variable Priority in General Purpose Operating Systems
    2. 12.2 Rate Monotonic
      1. 12.2.1 Proof of Rate Monotonic Optimality
    3. 12.3 The Earliest Deadline First Scheduler
    4. 12.4 Summary
  26. 13 Schedulability Analysis Based on Utilization
    1. 13.1 Processor Utilization
    2. 13.2 Sufficient Schedulability Test for Rate Monotonic
      1. 13.2.1 Ulub for Two Tasks
      2. 13.2.2 Ulub for N Tasks
    3. 13.3 Schedulability Test for EDF
    4. 13.4 Summary
  27. 14 Schedulability Analysis Based on Response Time Analysis
    1. 14.1 Response Time Analysis
    2. 14.2 Computing the Worst-Case Execution Time
    3. 14.3 Aperiodic and Sporadic Tasks
    4. 14.4 Summary
  28. 15 Task Interactions and Blocking
    1. 15.1 The Priority Inversion Problem
    2. 15.2 The Priority Inheritance Protocol
    3. 15.3 The Priority Ceiling Protocol
    4. 15.4 Schedulability Analysis and Examples
    5. 15.5 Summary
  29. 16 Self-Suspension and Schedulability Analysis
    1. 16.1 Self-Suspension and the Critical Instant Theorem
    2. 16.2 Self-Suspension and Task Interaction
    3. 16.3 Extension of the Response Time Analysis Method
    4. 16.4 Summary
  30. III Advanced Topics
  31. 17 Internal Structure of FreeRTOS
    1. 17.1 Task Scheduler/Context Switch
    2. 17.2 Synchronization Primitives
    3. 17.3 Porting FreeRTOS to a New Architecture
    4. 17.4 Summary
  32. 18 Internal Structures and Operating Principles of Linux Real-Time Extensions
    1. 18.1 The Linux Scheduler
    2. 18.2 Kernel Preemption
    3. 18.3 The PREEMPT_RT Linux Patch
      1. 18.3.1 Practical Considerations
    4. 18.4 The Dual-Kernel Approach
      1. 18.4.1 Adeos
      2. 18.4.2 Xenomai
      3. 18.4.3 RTAI
    5. 18.5 Summary
  33. 19 OS Abstraction Layer
    1. 19.1 An Object Oriented Interface to Threads and Other IPC Mechanisms
      1. 19.1.1 Linux Implementation
      2. 19.1.2 FreeRTOS Implementation
    2. 19.2 A Sample Multiplatform Application
    3. 19.3 Summary
  34. 20 Control Theory and Digital Signal Processing Primer
    1. 20.1 Case Study 1: Controlling the Liquid Level in a Tank
      1. 20.1.1 The Use of Differential Equations to Describe the Dynamics of the System
      2. 20.1.2 Introducing an Integral Gain
      3. 20.1.3 Using Transfer Functions in the Laplace Domain
      4. 20.1.4 Deriving System Properties from Its Transfer Function
      5. 20.1.5 Implementing a Transfer Function
      6. 20.1.6 What We Have Learned
    2. 20.2 Case Study 2: Implementing a Digital low-pass Filter
      1. 20.2.1 Harmonics and the Fourier Transform
      2. 20.2.2 Low-Pass Filters
      3. 20.2.3 The Choice of the Sampling Period
      4. 20.2.4 Building the Digital Low-Pass Filter
      5. 20.2.5 Signal to Noise Ratio (SNR)
    3. 20.3 Summary
  35. Bibliography
  36. Index

Product information

  • Title: Real-Time Embedded Systems
  • Author(s): Ivan Cibrario Bertolotti, Gabriele Manduchi
  • Release date: December 2017
  • Publisher(s): CRC Press
  • ISBN: 9781351833486