Real-Time Embedded Systems with Open-Source Operating Systems Second Edition ( etc.) (z-library.sk, 1lib.sk, z-lib.sk)
c
This book aims to provide readers with hands-on knowledge about real-time operating systems and their possible application in the embedded systems domain to streamline, simplify, and make software development more efficient, without requiring any significant previous experience with them.
2
Views
0
Downloads
0.00
Total Donations
Registered users can read the full content for free
Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.
Page
1
(This page has no text content)
Page
2
Real-Time Embedded Systems with Open-Source Operating Systems This book aims to provide readers with hands-on knowledge about real-time operating systems and their possible application in the embedded systems domain to streamline, simplify, and make software development more efficient, without requiring any signifi- cant previous experience with them. A thorough presentation of operating system-based programming techniques is especially important because they enjoy an ever-increasing popularity in the embedded systems domain but are often misunderstood, because they still lack comprehensive support in the scientific and technical literature. The book analyzes in detail three realistic case studies of increasing complexity, of which the first one requires only a commonly available PC or laptop, while the other two involve low-cost, open-source hardware platforms readily available to the majority of readers. They serve as starting points and running examples while introducing theoretical con- cepts, as well as real-time operating systems’ operations and interfaces. A set of exercises and their solutions completes the book, to enable readers to self-assess their knowledge as they proceed. Moreover, the source code developed for the case studies is freely available for download and further experimentation. • Provides hands-on description of the most important real-time operating system concepts • Includes case studies of practical interest to experiment with while reading the book • Provides an in-depth, but accessible presentation of real-time scheduling theory • A balanced mix of operating system theory, exercises, and case studies in a single book The use cases involve inexpensive hardware boards readily available on the market Together, the topics covered by this book help embedded system designers understand the benefits and shortcomings of real-time operating systems and then decide whether it may be worth adopting one of them for their next project instead of relying on more traditional, but less powerful, techniques. At the same time, students will acquire all the knowledge and skills they need to take part in real-world embedded software development without sacrific- ing a proper theoretical foundation. In this context, the case studies play the crucial role of underlining the strong relationship between operating system theory and application, along with the relevance of theoretical concepts in day-to-day project design and implementation.
Page
3
(This page has no text content)
Page
4
Real-Time Embedded Systems with Open-Source Operating Systems Second Edition Ivan Cibrario Bertolotti and Gabriele Manduchi
Page
5
Designed cover image: Shutterstock Second edition published 2026 by CRC Press 2385 NW Executive Center Drive, Suite 320, Boca Raton FL 33431 and by CRC Press 4 Park Square, Milton Park, Abingdon, Oxon, OX14 4RN CRC Press is an imprint of Taylor & Francis Group, LLC © 2026 Ivan Cibrario Bertolotti and Gabriele Manduchi First edition published by CRC Press 2012 Reasonable efforts have been made to publish reliable data and information, but the author and pub- lisher cannot assume responsibility for the validity of all materials or the consequences of their use. The authors and publishers have attempted to trace the copyright holders of all material reproduced in this publication and apologize to copyright holders if permission to publish in this form has not been obtained. If any copyright material has not been acknowledged, please write and let us know so we may rectify in any future reprint. Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmitted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented, including photocopying, microfilming, and recording, or in any information stor- age or retrieval system, without written permission from the publishers. For permission to photocopy or use material electronically from this work, access www.copyright. com or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400. For works that are not available on CCC, please contact mpkbookspermissions@ tandf.co.uk Trademark notice: Product or corporate names may be trademarks or registered trademarks and are used only for identification and explanation without intent to infringe. ISBN: 978-1-032-97371-5 (hbk) ISBN: 978-1-032-97651-8 (pbk) ISBN: 978-1-003-59341-6 (ebk) DOI: 10.1201/9781003593416 Typeset in Nimbus Roman font by KnowledgeWorks Global Ltd. Publisher’s note: This book has been prepared from camera-ready copy provided by the authors.
Page
6
To Maria Cristina, Samuele, and Guglielmo — ICB To Ornella, Silvia, and Laura — GM
Page
7
(This page has no text content)
Page
8
Contents Foreword................................................................................................................xiii Preface...................................................................................................................xvii Authors...................................................................................................................xix SECTION I Concurrent Programming Concepts Chapter 1 Introduction .....................................................................................2 Chapter 2 A Case Study: Vision Control .........................................................9 2.1 Input Output on Computers ....................................................9 2.1.1 Accessing the I/O Registers .....................................10 2.1.2 Synchronization in I/O.............................................14 2.1.3 Direct Memory Access (DMA) ...............................17 2.2 Input/Output Operations and the Operating System.............19 2.2.1 User and Kernel Modes............................................19 2.2.2 Input/Output Abstraction in Linux...........................22 2.3 Acquiring Images from a Camera Device ............................24 2.3.1 Synchronous Read from a Camera Device ..............25 2.3.2 Virtual Memory........................................................30 2.3.3 Handling Data Streaming from the Camera Device ......................................................................33 2.4 Edge Detection......................................................................38 2.4.1 Optimizing the Code ................................................40 2.5 Finding the Center Coordinates of a Circular Shape ............49 2.6 Summary...............................................................................55 2.7 Exercises ...............................................................................56 Chapter 3 Real-Time Concurrent Programming Principles ...........................59 3.1 The Role of Parallelism ........................................................59 3.2 Definition of Process.............................................................60 3.3 Process State .........................................................................63 3.4 Process Life Cycle and Process State Diagram ....................65 3.5 Multithreading ......................................................................69 3.6 Summary...............................................................................71 3.7 Exercises ...............................................................................72 vii
Page
9
viii Contents Chapter 4 Deadlock........................................................................................73 4.1 A Simple Example................................................................73 4.2 Formal Definition of Deadlock.............................................76 4.3 Reasoning about Deadlock: The Resource Allocation Graph ....................................................................................77 4.4 Living with Deadlock ...........................................................79 4.5 Deadlock Prevention.............................................................80 4.6 Deadlock Avoidance .............................................................83 4.7 Deadlock Detection and Recovery .......................................89 4.8 Summary...............................................................................92 4.9 Exercises ...............................................................................93 Chapter 5 Interprocess Communication Based on Shared Variables .............95 5.1 Race Conditions and Critical Regions ..................................95 5.2 Hardware-Assisted Lock Variables.....................................104 5.3 Software-Based Mutual Exclusion .....................................107 5.4 From Active to Passive Wait...............................................111 5.5 Semaphores.........................................................................115 5.6 Monitors..............................................................................120 5.7 Summary.............................................................................128 5.8 Exercises .............................................................................129 Chapter 6 Interprocess Communication Based on Message Passing...........130 6.1 Basics of Message Passing .................................................130 6.2 Naming Scheme..................................................................131 6.3 Synchronization Model.......................................................134 6.4 Message Buffers .................................................................138 6.5 Message Structure and Contents.........................................139 6.6 Producer–Consumer Problem with Message Passing.........141 6.7 Summary.............................................................................143 6.8 Exercises .............................................................................144 Chapter 7 Interprocess Communication Primitives in POSIX/Linux ..........146 7.1 Threads and Processes ........................................................146 7.1.1 Creating Threads....................................................149 7.1.2 Creating Processes .................................................155 7.2 Interprocess Communication among Threads ....................161 7.2.1 Mutexes and Condition Variables ..........................161 7.3 Interprocess Communication among Processes..................166 7.3.1 Semaphores ............................................................166 7.3.2 Message Queues.....................................................169 7.3.3 Signals....................................................................172 7.4 Clocks and Timers ..............................................................173
Page
10
Contents ix 7.5 Threads or Processes?.........................................................174 7.6 Summary.............................................................................175 7.7 Exercises .............................................................................175 Chapter 8 Interprocess Communication Primitives in FreeRTOS ...............180 8.1 FreeRTOS Threads and Processes ......................................181 8.2 Message Queues .................................................................188 8.3 Counting, Binary, and Mutual Exclusion Semaphores.......195 8.4 Clocks and Timers ..............................................................201 8.5 Summary.............................................................................204 8.6 Exercises .............................................................................205 Chapter 9 Network Communication ............................................................207 9.1 The Ethernet Protocol .........................................................207 9.2 TCP/IP and UDP.................................................................209 9.3 Sockets ................................................................................212 9.3.1 TCP/IP Sockets ......................................................213 9.4 UDP Sockets .......................................................................219 9.5 Summary.............................................................................224 9.6 Exercises .............................................................................226 SECTION II Real-Time Scheduling Analysis Chapter 10 Real-Time Scheduling Based on the Cyclic Executive ...............230 10.1 Scheduling and Process Models .........................................230 10.2 The Cyclic Executive..........................................................234 10.3 Choice of Major and Minor Cycle Length .........................236 10.4 Tasks with Large Period or Execution Time.......................237 10.5 Summary.............................................................................241 10.6 Exercises .............................................................................241 Chapter 11 Real-Time, Task-Based Scheduling.............................................243 11.1 Fixed and Variable Task Priority ........................................244 11.1.1 Preemption .............................................................244 11.1.2 Variable Priority in General Purpose Operating Systems ..................................................................245 11.2 Rate Monotonic ..................................................................247 11.2.1 Proof of Rate Monotonic Optimality .....................249 11.3 The Earliest Deadline First Scheduler ................................254 11.4 Summary.............................................................................255 11.5 Exercises .............................................................................256
Page
11
x Contents Chapter 12 Schedulability Analysis Based on Utilization .............................258 12.1 Processor Utilization...........................................................258 12.2 Sufficient Schedulability Test for Rate Monotonic.............260 12.2.1 Ulub for Two Tasks .................................................261 12.2.2 Ulub for N Tasks .....................................................265 12.3 Schedulability Test for EDF ...............................................268 12.4 Summary.............................................................................272 12.5 Exercises .............................................................................274 Chapter 13 Schedulability Analysis Based on Response Time Analysis.......275 13.1 Response Time Analysis.....................................................275 13.2 Computing the Worst-Case Execution Time ......................279 13.3 Aperiodic and Sporadic Tasks ............................................283 13.4 Summary.............................................................................288 13.5 Exercises .............................................................................289 Chapter 14 Task Interactions and Blocking ...................................................290 14.1 The Priority Inversion Problem ..........................................290 14.2 The Priority Inheritance Protocol .......................................294 14.3 The Priority Ceiling Protocol..............................................304 14.4 Schedulability Analysis and Examples...............................308 14.5 Summary.............................................................................314 14.6 Exercises .............................................................................314 Chapter 15 Self-Suspension and Schedulability Analysis .............................315 15.1 Self-Suspension and the Critical Instant Theorem .............315 15.2 Self-Suspension and Task Interaction.................................318 15.3 Extension of the Response Time Analysis Method ............323 15.4 Summary.............................................................................325 15.5 Exercises .............................................................................326 SECTION III Case Studies Chapter 16 General-Purpose IoT/Embedded Controller................................328 16.1 Hardware and Firmware Overview.....................................329 16.2 The Canudp Library............................................................343 16.3 Deadlock Analysis ..............................................................346 16.4 Linux Test Program ............................................................350 16.5 Summary.............................................................................353 16.6 Exercises .............................................................................353
Page
12
Contents xi Chapter 17 Real-Time, High-Performance Data Acquisition ........................355 17.1 FPGA Development............................................................356 17.2 The Linux Driver ................................................................364 17.3 Using the Driver..................................................................377 17.4 Summary.............................................................................382 17.5 Exercises .............................................................................382 Chapter 18 Control Theory and Digital Signal Processing Primer ................385 18.1 Case Study 1: Controlling the Liquid Level in a Tank .......385 18.1.1 The Use of Differential Equations to Describe the Dynamics of the System ..................................387 18.1.2 Introducing an Integral Gain..................................389 18.1.3 Using Transfer Functions in the Laplace Domain...................................................................391 18.1.4 Deriving System Properties from Its Transfer Function .................................................................393 18.1.5 Implementing a Transfer Function.........................396 18.1.6 What We Have Learned .........................................401 18.2 Case Study 2: Implementing a Digital Low-Pass Filter .....402 18.2.1 Harmonics and the Fourier Transform...................402 18.2.2 Low-Pass Filters.....................................................406 18.2.3 The Choice of the Sampling Period .......................413 18.2.4 Building the Digital Low-Pass Filter .....................416 18.2.5 Signal to Noise Ratio (SNR)..................................419 18.3 Summary.............................................................................420 18.4 Exercises .............................................................................421 Answers to Selected Exercises.............................................................................423 References .............................................................................................................437 Index......................................................................................................................443
Page
13
(This page has no text content)
Page
14
Foreword Real-time embedded systems have become an integral part of our technological and social space. But is the engineering profession equipped with the right knowledge to develop those systems in ways dictated by the economic and safety aspects? Likely yes. But the knowledge is fragmented and scattered among different engineering dis- ciplines and computing sciences. Seldom anyone of us has the clear picture of the whole. If so, then parts of it are at an abstract level. That poses a question whether the academic system provides education in a way holistic enough to prepare graduates to embark on the development of real-time embedded systems, frequently complex and imposing safety requirements. How many electrical and computer engineering departments offer subjects focusing on the application-dependent specialized com- munication networks used to connect embedded nodes in distributed real-time sys- tems. If so, then the discussion is confined to the Controller Area Network (CAN), or sometimes FlexRay, in the context of automotive applications—usually a small unit of an embedded systems subject. (The impression might be that specialized com- munication networks are mostly used in automotive applications.) The requirement for the underlying network technology to provide real-time guarantees for message transmissions is central to proper functioning of real-time systems. Most of computer engineering streams teach operating systems. But real-time aspects are scantly cov- ered. Computer science students, on the other hand, have very little, if any, exposure to the “physicality” of the real systems the real-time operating systems are intended to interact with. Does this put computer science graduates in a disadvantaged posi- tion? In the late 1990s and early 2000s, I was involved in the Sun Microsystems lead initiative to develop real-time extensions for the Java language. The working group comprised professionals mostly from industry with backgrounds largely in comput- ing sciences. I was taken aback by the slow pace of the process. On reflection, the lack of exposure to the actual real-time systems in different application areas and their physicality was likely to be behind difficulties to identify generic functional requirements to be implemented by the intended extensions. In the second part of 1980s, I was teaching digital control to the final year stu- dents of the electrical engineering course. The lab experiments to illustrate different control algorithms were designed around the, at that time, already antiquated Data General microNOVA MP/200 minicomputer, running one of the few real-time oper- ating systems commercially available at that time—QNX, if I remember correctly. Showing things work was fun. But students’ insight into the working of the whole system stopped at the system-level commands of the operating systems. The mystery had to be revealed by discussing hypothetical implementations of the system level calls and interaction with the operating system kernel—of course, at the expense of the digital control subject. At that time, seldom any electrical engineering curriculum had a separate subject dedicated to operating systems. Of frustration and to avoid the “black box” approach to illustrating control systems in action, I have written in C a xiii
Page
15
xiv Foreword simple multitasking real-time executive for MS-DOS-based platforms, to be run on an IBM PC (Intel 8088). Students were provided with the implementation documen- tation in addition to the theoretical background; quite a lot of pages to study. But the reward was substantial: they were now in full “control.” With the support of an enterprising post-graduate student, the executive was intended to be grown into more robust RTOS with a view for commercialization. But it was never to be. Academic life has other priorities. Around 1992, I decided to harness the MINIX operating system, which I then taught to the final-year graduate students, to run my real-time control lab experiments to illustrate control algorithms in their supporting real-time operating system environment. But soon after that came the Linux kernel. If you are one of those professionals with the compartmented knowledge, partic- ularly with the electrical and computer engineering or software engineering back- ground, with not much theoretical knowledge of and practical exposure to real-time operating systems, this book is certainly an invaluable help to “close the loop” in your knowledge, and to develop an insight into how things work in the realm of real- time systems. Readers with a background in computer science will benefit from the hands-on approach, and a comprehensive overview of the aspects of control theory and signal processing relevant to the real-time systems. The book also discusses a range of advanced topics which will allow computer science professionals to stay up-to-date with the recent developments and emerging trends. The book was written by two Italian researchers from the Italian National Re- search Council (CNR) actively working in the area of real-time (embedded) operat- ing systems, with a considerable background in control and communication systems, and a history of the development of actual real-time systems. Both authors are also involved in teaching several courses related to these topics at Politecnico di Torino and University of Padova. The book has been written with a remarkable clarity, which is particularly appre- ciated whilst reading the section on real-time scheduling analysis. 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 convo- luted 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. Selected concepts are illustrated by practical programming ex- amples developed for the Linux and FreeRTOS operating systems. As the authors stated: Linux has a potential to evolve in a fully fledged real-time operating system; FreeRTOS, on the other hand, gives a taste of an operating system for small footprint applications typical of most of embedded systems. Irrespective of the rationale for this choice, the availability of the programming examples allows the reader to de- velop insight into the generic implementation issues transferrable to other real-time (embedded) operating systems.
Page
16
Foreword xv This book is an indispensable addition to the professional library of anyone who wishes to gain a thorough understanding of real-time systems from the operating systems perspective, and to stay up to date with the recent trends and actual develop- ments of the open-source real-time operating systems. Richard Zurawski ISA Group, San Francisco, California
Page
17
(This page has no text content)
Page
18
Preface This book is the outcome of more than 10 years of research and teaching activity in the field of real-time operating systems and real-time control systems. During this time, we have been positively influenced by many other people we came in contact with, both from academy and industry. They are too numerous to mention individually, but we are nonetheless indebted to them for their contribution to our professional growth. A special thank you goes to our university students, who first made use of the lecture notes this book is based upon. Their questions, suggestions, and remarks were helpful to make the book clearer and easier to read. We would also like to express our appreciation to our coworkers for their support and patience while we were busy with the preparation of the manuscript. A special mention goes to one of Ivan’s past teachers, Albert Werbrouck, who first brought his attention to the wonderful world of embedded systems. Last, but not least, we are grateful to Richard Zurawski, who gave us the oppor- tunity to write the first edition of this book. We are also indebted to the CRC Press publishing and editorial staff, Nora Konopka and Sifat Kaur Keer in particular. With- out their help, the book would probably not exist. xvii
Page
19
(This page has no text content)
Page
20
Authors Ivan Cibrario Bertolotti earned the Laurea degree (summa cum laude) in computer science from the University of Torino, Turin, Italy, in 1996. Since then, he has been a researcher with the National Research Council of Italy (CNR). Currently, he is senior researcher with the Istituto di Elettronica e di Ingegneria dell’Informazione e delle Telecomunicazioni (IEIIT), Turin, Italy. His research interests include real-time operating system design and implementa- tion, industrial communication systems and protocols, and formal methods for secu- rity and dependability analysis of distributed systems. Along the years, he published more than 100 peer-reviewed articles on these subjects, while also co-authoring sev- eral book chapters and three books. His contribution encompasses both theoretical work and practical applications, carried out in cooperation with leading Italian and international companies. He has taught various courses on real-time operating systems at Politecnico di Torino, Turin, Italy, starting in 2003, as well as a PhD degree course at the Uni- versity of Padova in 2009. He regularly serves as a technical referee for the main international conferences and journals on industrial informatics, factory automation, and communication. He has been an IEEE member since 2006. Gabriele Manduchi obtained the Laurea Degree (summa cum laude) in Electronic Engineering from the University of Padua, Italy, in 1987. Since then, he has been a researcher with the National Research Council (CNR). He is currently with the Istituto Gas Ionizzati (IGI), Padua, Italy. Since 1989 he has been involved in the design and development of acquisition and real-time control systems for large physics experiments. In particular, he is one of the developers of MDSplus, an open-source data acquisition system widely adopted in nuclear fusion experiments. He is also one of the developers of the real-time con- trol system of the RFX, a nuclear fusion experiment in the framework of the co- ordinated European Fusion Development Agreement. He has been also involved as deputy project leader in the International Tokamak Modeling European task aiming at building a comprehensive simulation framework for thermonuclear fusion. Since 2021 he has been the project leader of the Control and Data Acquisition task for the nuclear fusion experiment DTT in Rome, Italy. His current research interests include real-time system design and implementa- tion, large data management and supervision for mission-critical systems. Since 1995 Gabriele Manduchi has been teaching introductory and advanced courses on computer architectures at the University of Padua. In recent years, he has also taught PhD courses on Software Design Patterns and on Concurrent and Real-time Programming in the same University. xix
The above is a preview of the first 20 pages. Register to read the complete e-book.
AI Reading Assistant
Whole-book reading guide from stratified index samples; jump to passages in the text
AI guide
# Real-Time Embedded Systems with Open-Source Operating Systems, Second Edition
## 【One-Line Pitch】
A hands-on guide for embedded developers and software engineers who want to master real-time operating systems (RTOS) using open-source platforms like Linux, covering everything from hardware fundamentals to advanced concurrency and interprocess communication—no prior RTOS experience required.
## 【Book Arc】
- **Opening (~0%–10%)**: Introduces the book's purpose—providing practical RTOS knowledge for embedded systems—and outlines the full table of contents, spanning deadlock, interprocess communication (shared variables, message passing), POSIX/Linux primitives, and a vision control case study. It also emphasizes the multidisciplinary nature of embedded development, where software engineers benefit from basic control engineering and electronics knowledge.
- **Early (~10%–23%)**: Covers hardware foundations, including memory-mapped I/O, PCI/SCSI bus architectures, and bridge configuration, then transitions into operating system fundamentals—specifically how user/kernel mode switching works via interrupts and software interrupts, and how system calls enable user programs to perform I/O safely.
- **Early (~23%–32%)**: Presents a detailed vision control case study using Video4Linux2 (V4L2), walking through the complete workflow: device setup, buffer allocation via mmap(), enqueuing/dequeuing buffers, using select() for synchronization, and streaming capture—with concrete code examples showing each ioctl() step.
- **Middle (~32%–42%)**: Delves into performance optimization for the vision application, discussing compiler optimizations, pipeline data hazards, superscalar processor considerations, and the limits of compiler optimization—particularly around pointer-based memory access. Also introduces the process model and multiprogramming as the foundation for concurrent system design.
- **Middle (~42%–48%)**: Explores real-time concurrent programming principles, including the scheduler's role in process selection, process state diagrams, and process attributes that drive scheduling decisions. Introduces multithreading with examples like media players needing concurrent UI, audio decoding, and background tasks.
## 【Key Takeaways】
- **Multidisciplinary collaboration is essential in embedded development** (Early): Successful embedded systems require input from control engineers, electronics specialists, and software engineers—and even in large teams, overlapping knowledge improves communication and reduces requirement gaps or over-engineering.
- **Memory-mapped I/O and bus bridges decouple device addressing** (Early): Address mapping windows with configurable offsets let processors access I/O devices without knowing their physical bus addresses, and hierarchical bridge configuration (memory→PCI→SCSI) enables scalable device connectivity.
- **Interrupts are the key to safe kernel-mode entry** (Early): Hardware interrupts switch the processor to kernel mode for device drivers, while software interrupts provide a controlled mechanism for user programs to request privileged operations—preventing malicious code from bypassing the protection barrier.
- **select() is essential for multi-device I/O synchronization** (Early): Since read() blocks, programs handling multiple devices risk suspending on one device while others have data ready; select() monitors multiple descriptors and returns only when I/O can proceed without blocking.
- **V4L2 streaming requires careful buffer management** (Early): The vision control case study demonstrates a complete workflow—requesting buffers, mapping driver memory to user space via mmap(), enqueuing buffers in a circular list, starting streaming, and using select() with timeouts to wait for ready frames.
- **Compiler optimization has limits—especially with pointers** (Middle): While compilers excel at instruction scheduling and pipeline hazard avoidance, they cannot fully optimize pointer-based memory access patterns, leaving room for manual optimization in performance-critical embedded code.
- **The process model simplifies concurrent system design** (Middle): By abstracting away whether hardware truly executes processes in parallel, multiprogramming lets developers design at the process level, trusting the scheduler to ensure all processes make progress over time.
- **Multithreading addresses the need for concurrent related activities** (Middle): Modern applications like media players require simultaneous handling of UI, audio streaming, and background data retrieval—each a distinct activity sharing a common goal, motivating thread-based design.
## 【Reading Tips】
- **Skim the hardware chapters (Early ~10%–19%)** if you're already familiar with bus architectures and memory mapping—the key concept to retain is how address mapping windows work, as it recurs in later driver discussions.
- **Deep-read the vision control case study (Early ~23%–32%)**: This is the book's practical heart, with complete code showing the V4L2 workflow. Follow along with the ioctl() calls and buffer management steps—they're directly reusable in real projects.
- **Pay special attention to the select() and mmap() explanations** (Early): These are common pain points for embedded developers and are explained with concrete examples that clarify the address space translation between driver and user space.
- **The optimization discussion (Middle ~32%–42%)** is valuable but dense—focus on the conceptual takeaways about compiler limits and pointer aliasing rather than the specific pipeline details unless you're doing low-level performance work.
- **Use the exercises at each chapter's end** (visible in the table of contents) to test understanding—they're designed to reinforce the practical skills each chapter teaches.
## 【Coverage Limits】
This guide covers the book's opening through the middle sections (~48%), including hardware foundations, OS fundamentals, the vision control case study, and early concurrency concepts. The excerpts do not cover the later chapters on deadlock prevention/avoidance, semaphores, monitors, message passing details, or POSIX/Linux IPC primitives in depth—these appear only in the table of contents.
##
Passage locations
Page 9
...............................................................120 5.7 Summary.............................................................................12...
View in text
Excerpt 2
ll the devices in the system are directly accessible by the processor at given addresses over the memory bus. Properly setting all the bridges in the system...
View in text
Excerpt 3
in the driver’s space. Such an address, returned in field m.offset of the v4l2_buffer structure passed to ioctl(), cannot be used directly in the program sin...
View in text
Excerpt 4
m, not all possible choices will produce meaningful results. For example, if a certain process P makes use of some values computed by another process Q, exec...
View in text
Recommended for You
{{#thumbnailUrl}}
{{/thumbnailUrl}}
{{^thumbnailUrl}}
{{/thumbnailUrl}}
Loading recommended books...
Failed to load, please try again later
Tip the Site
Scan the WeChat Pay or Alipay code to tip. No login required.
WeChat Pay
Alipay