Tuesday, December 22, 2015

Areas of RTOS

-----------------------------
RTOS concepts
-----------------------------
Why RTOS
Classification of RTOS
- hard real time
 - firm real time
- soft real time

RTOS Architecture


  1. Kernel
    • what does it do?
      • process - ready, running, blocked, suspended (Scheduler)
      • process priority
      • process communication
      • memory management
      • provide interfaces for UserSpace applications
      • interrupt and event handling
      • device io and device driver
      • file system
      • POSIX
    • kernel Types
      • monolithic (Most OS like Ubuntu kernel)
      • microkernel (Most RTOS like QNX)
      • exokernel
  2. Scheduler
    • First in first out
    • Earliest deadline first
    • Pre-emptive (Fixed priority)
    • Round robin
  3. Task
    • states - Ready, running, Blocked, Suspended
    • Task control block (ID, Priority, Status, register, PC, SP)
    • priority of task
    • task implementation - creation, deletion, suspend, resume
    • idle task
  4. Co-routines
    • states - ready, Running, Blocked
  5. Task synchronization
    • Binary semaphore
    • Counting semaphore
    • Mutex (Mutually Exclusion Semaphores)
      • Priority Inversion problem
      • Solution - 
        • Priority Inheritance
        • Priority ceiling
    • Recursive mutex
    • Task notifications
  6. Intertestk communication
    • Messgae queues (structured data exchnage )
      • Mailbox - messgae queue with length 1

    • Pipes (unstructured data exchange - byte stream)
    • Remote procedure calls (RPC) - one task initiating another task on remote computer. XMLRPC is a kind of RPC as used in project
  7. Memory Management
    • Stack management
    • Heap management
  8. Timer Management
    • Ticks counting used for task delay
    • Task alert
  9. Interrupt and Event Handling
    • defining Interrupt handler
    • creation and deletion of ISR
    • Enabling and disabling ISR
    • changing and referencing of interrupt mask
  10. Device I/O Management
    • Provide APIs of using device drivers
  11. Selection of RTOS
    • Technical consideration
      • Scalability
      • Portability
      • Run-time facilities
      • Development tools
    • Commercial Considerations
      • Costs
      • License
      • Supplier stability/ longevity
      • Usually there are no thread concepts in RTOS. Task are the only things.

No comments:

Post a Comment

PROFILE

My photo
India
Design Engineer ( IFM Engineering Private Limited )

Followers