Embedded RTOS Design

Book description

Embedded RTOS Design: Insights and Implementation combines explanations of RTOS concepts with detailed, practical implementation. It gives a detailed description of the implementation of a basic real-time kernel designed to be limited in scope and simple to understand, which could be used for a real design of modest complexity. The kernel features upward-compatibility to a commercial real-time operating system: Nucleus RTOS. Code is provided which can be used without restriction.

Gain practical information on:

  • Scheduling, preemption, and interrupts
  • Information flow (queues, semaphores, etc.) and how they work
  • Signaling between tasks (signals, events, etc.)
  • Memory management (Where does each task get its stack from? What happens if the stack overflows?)
  • The CPU context: storage and retrieval after a context switch

With this book you will be able to:

  • Utilize a basic real-time kernel to develop your own prototype
  • Design RTOS features
  • Understand the facilities of a commercial RTOS
  • Explains the principles of RTOS and shows their practical implementation
  • Demonstrates how to prototype a real-time design
  • Code is fully available for free use

Table of contents

  1. Cover image
  2. Title page
  3. Table of Contents
  4. Copyright
  5. Dedication
  6. Foreword
  7. Preface
  8. 1. Program structure and real time
    1. Abstract
    2. Why use an operating system?
    3. Software structure
    4. Embedded program models
    5. What is real time?
  9. 2. Multitasking and scheduling
    1. Abstract
    2. Tasks, threads, and processes
    3. Schedulers
    4. Run to completion scheduler
    5. Round robin scheduler
    6. Time slice scheduler
    7. Priority scheduler
    8. Composite scheduler
    9. Task states
    10. Task suspend
    11. Other task states
    12. Task identifiers
    13. The context switch
    14. What is a task?
    15. Saving context
    16. Dynamic task creation
    17. Requirements for dynamic task creation
    18. Implications of dynamic task creation
    19. Interrupts
    20. Interrupts and the kernel
    21. Context save
    22. Interrupts and the scheduler
    23. Tick clock
  10. 3. RTOS services and facilities
    1. Abstract
    2. Intertask communication services
    3. Other RTOS services
    4. Beyond the kernel
  11. 4. Nucleus SE
    1. Abstract
    2. Nucleus SE target users
    3. Design decisions and trade-offs
    4. Memory utilization
    5. Application program interface implementation
    6. Scalability
    7. Which application program interface?
    8. Services
    9. Parameter checking
    10. Configuration
    11. Naming conventions
    12. Data structures
    13. Key differences from Nucleus RTOS
  12. 5. The scheduler
    1. Abstract
    2. Scheduling in Nucleus RTOS
    3. Scheduling in Nucleus SE
    4. Scheduler types
    5. Task states
    6. Options
    7. Context saving
    8. Global data
    9. Implementing other scheduling schemes
  13. 6. Tasks
    1. Abstract
    2. Configuring tasks
    3. Task service calls
    4. Task control services
    5. Task utility services
    6. Data structures
    7. Unimplemented API calls
    8. Compatibility with Nucleus RTOS
  14. 7. Partition memory
    1. Abstract
    2. Using partitions
    3. Configuring memory partitions
    4. Partition allocation and deallocation services
    5. Partition pool utility services
    6. Data structures
    7. Unimplemented API calls
    8. Compatibility with Nucleus RTOS
  15. 8. Signals
    1. Abstract
    2. Using signals
    3. Configuring signals
    4. Application program interface enables
    5. Signals service calls
    6. Signals send and receive services
    7. Data structures
    8. Unimplemented API calls
    9. Compatibility with Nucleus RTOS
  16. 9. Event flag groups
    1. Abstract
    2. Using event flags
    3. Configuring event flag groups
    4. Event flag service calls
    5. Event flag group set and retrieve services
    6. Event flag group utility services
    7. Data structures
    8. Unimplemented API calls
    9. Compatibility with Nucleus RTOS
  17. 10. Semaphores
    1. Abstract
    2. Using semaphores
    3. Configuring semaphores
    4. Semaphore service calls
    5. Semaphore obtain and release services
    6. Semaphore utility services
    7. Data structures
    8. Unimplemented API calls
    9. Compatibility with Nucleus RTOS
  18. 11. Mailboxes
    1. Abstract
    2. Using mailboxes
    3. Mailboxes and queues
    4. Configuring mailboxes
    5. Mailbox service calls
    6. Mailbox write and read services
    7. Mailbox utility services
    8. Data structures
    9. Unimplemented API calls
    10. Compatibility with Nucleus RTOS
  19. 12. Queues
    1. Abstract
    2. Using queues
    3. Queues and pipes
    4. Configuring queues
    5. Queue service calls
    6. Queue write and read services
    7. Queue utility services
    8. Data structures
    9. Unimplemented API calls
    10. Compatibility with Nucleus RTOS
  20. 13. Pipes
    1. Abstract
    2. Using pipes
    3. Pipe utility services
    4. Data structures
    5. Unimplemented API calls
    6. Compatibility with Nucleus RTOS
  21. 14. System time
    1. Abstract
    2. Time in an RTOS
    3. Configuring system time
    4. System time service calls
    5. System time set and obtain services
    6. Data structures
    7. Unimplemented API calls
    8. Compatibility with Nucleus RTOS
  22. 15. Application timers
    1. Abstract
    2. Using timers
    3. Configuring timers
    4. Timer service calls
    5. Timer services
    6. Timer utility services
    7. Data structures
    8. Unimplemented API calls
    9. Compatibility with Nucleus RTOS
  23. 16. Interrupts in Nucleus SE
    1. Abstract
    2. Native and managed interrupts
    3. Real time clock ISR
    4. Nucleus RTOS compatibility
  24. 17. Nucleus SE initialization and start-up
    1. Abstract
    2. Memory initialization
    3. The main function
    4. The NUSE_Init function
    5. Application code initialization
    6. Starting the scheduler
  25. 18. Diagnostics and error checking
    1. Abstract
    2. Configuration checks
    3. Application program interface parameter checking
    4. Task stack checking
    5. Version information
    6. Compatibility with Nucleus RTOS
    7. User diagnostics
    8. Tracing and profiling
  26. 19. Unimplemented facilities and compatibility
    1. Abstract
    2. The scheduler
    3. API calls
    4. API call functionality
    5. Data sizes
  27. 20. Using Nucleus SE
    1. Abstract
    2. What is Nucleus SE?
    3. CPU and tool support
    4. Configuring a Nucleus SE application
    5. Which application program interface?
    6. Debugging a Nucleus SE application
    7. Nucleus SE configuration checklist
  28. 21. Nucleus SE reference information
    1. Abstract
    2. Alphabetic API function list
    3. Nucleus SE symbols and data structures
    4. Typedefs
    5. Global data
    6. Kernel object tables
    7. Obtaining Nucleus SE source code
  29. Index

Product information

  • Title: Embedded RTOS Design
  • Author(s): Colin Walls
  • Release date: December 2020
  • Publisher(s): Newnes
  • ISBN: 9780128228524