uC/OS The Real-Time Kernel - PowerPoint PPT Presentation

About This Presentation
Title:

uC/OS The Real-Time Kernel

Description:

Task is a simple program that thinks it has the CPU all to itself. ... the interrupted task is suspended and the new higher priority task is resumed. ... – PowerPoint PPT presentation

Number of Views:125
Avg rating:3.0/5.0
Slides: 19
Provided by: Sam3103
Category:
Tags: kernel | real | resumed | time

less

Transcript and Presenter's Notes

Title: uC/OS The Real-Time Kernel


1
uC/OSThe Real-Time Kernel
By Sam 2001/07/25 MICETEK International Inc.
2
Contents
  • Part 1 Real_time Kernel Concepts
  • Part 2 Kernel Structure
  • Part 3 Interrupt Processing
  • Part 4 Communication
  • Part 5 Initialization Configuration
  • Part 6 Function Lists and Examples

3
Part 1 Real_time Kernel Concepts 1
  • RTOS/Embedded system examples
  • Process control
  • Automotive
  • Office automation
  • Computer peripherals
  • Robots
  • Aerospace
  • Domestic

4
Part 1 Real_time Kernel Concepts 2
  • Task (Thread) States
  • Task is a simple program that thinks it has the
    CPU all to itself. Each task has its priority,
    its own set of CPU registers and its own stack
    area.
  • States
  • DORMANT
  • READY
  • RUNNING
  • DELAYED
  • PENDING
  • INTERRUPTED

5
Part 1 Real_time Kernel Concepts 3
  • Multiple Tasks

6
Part 1 Real_time Kernel Concepts 4
  • Preemptive Kernel vs. Non-Preemptive Kernel
  • Preemptive Kernel is used when system
    responsiveness is important. The highest priority
    task ready to run is always given control of the
    CPU. When a task makes a higher task ready to
    run, the current task is preempted(suspended and
    the higher priority task is immediately given
    control of the CPU. If a ISR makes a higher
    priority task ready, when the ISR completes, the
    interrupted task is suspended and the new higher
    priority task is resumed. )
  • Non-Preemptive kernel require that each task does
    something to explicitly give up control of CPU.
    It is also called cooperative multitasking. The
    kernel is much simpler to design than preemptive
    kernels. One of the advantages of a
    non-preemptive kernel is that the interrupt
    latency is typically low. Non-reentrant functions
    can be used by each task without fear of
    corruption by another task.
  • Task Priority
  • Static, Dynamic

7
Preemptive Kernel vs. Non-Preemptive Kernel
8
Part 1 Real_time Kernel Concepts 5
  • Semaphores
  • Why to use?
  • Access to a shared resource
  • Signal the occurrence of event
  • Allow two tasks to synchronize
  • Type
  • Binary
  • Counting
  • Message Mailboxes
  • Message Queues

9
Part 1 Real_time Kernel Concepts 6
  • Clock Tick System heart beat
  • Performance
  • Context Switching Time
  • Interrupt Response Time
  • Determinism

10
Part 2 Kernel Structure
  • Critical Sections
  • Tasks
  • Task Control Blocks
  • Task Scheduling
  • Lock/ Unlock
  • Changing Priority
  • Delaying a task

11
Part 3 Interrupt Processing
  • Interrupt Service Routine
  • Interrupt Latency, Response and Recovery
  • Clock Tick

12
Part 4 Communication
  • Events
  • Semaphores
  • Message Mailboxes
  • Message Queues

13
Semaphores
14
Semaphores
15
Semaphores
16
Mailbox and Queue
17
Part 5 Init Config
  • InitConfig
  • OS_IDLE_TASK_STK_SIZE
  • OS_MAX_TASKS
  • OS_MAX_QS
  • OSInit(), OSStart()

18
Part 6 Function Lists and Examples
  • System Functions Lists
  • OSInit OSStart OSStartHighRdy
  • OSTimeDly OSTimeTick OSTickISR
  • OSIntEnter OSIntExit
  • OSCtxSw OSIntCtxSw
  • OSSched OSChangePrio
  • OSTaskCreate OSTaskDelete
  • OSLock OSUnlock
  • OSSemInit OSSemPost OSSemPend
  • OSMboxInit OSMboxPost OSMboxPend
  • OSQInit OSQPost OSQPend
  • OSTCBGetFree OSTCBPutFree
  • Exapmples
  • Test 1 Run Test1
  • Test 2 Run Test2
Write a Comment
User Comments (0)
About PowerShow.com