1. Trang chủ
  2. » Cao đẳng - Đại học

RTOS building blocks for system development

31 535 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 31
Dung lượng 521,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Data Types• Using C compiler primitive data types is not wise.. • RTOSes provide special data types.. Data Types cont’d• RTOS defines its own data types.. o Most RTOSes consist of a sing

Trang 1

RTOS Building Blocks for System

Development

Trang 2

About SwiftACT

• A Technology services startup company

o Under establishment

• Areas of specialties:

o Mobile telecommunication services development

o Embedded systems development

Trang 3

About Me

• Graduated 2004

o ECE, ASU: 5 yrs distinction

• 5+ years in embedded systems development

Trang 4

• Materials in this course is the property of Amr Ali Abdel-Naby

• Reproduction or transmission of the materials in any manner without the copyright owner permission is a law violation

Trang 7

o Thread management APIs, Mutex management APIs…

Trang 9

Defining Public Resources

• Some objects are public

o They can be accessed from any thread.

• Accessing a public object is not like owning it

o Mutex can be accessed from any thread A public object 

o A mutex has only 1 owner at a time A private ownership 

Trang 11

Data Types

• Using C compiler primitive data types is not wise

o int, char, double…

• C code should be portable

• RTOSes provide special data types

o The wrap the C compiler primitive ones.

o They ensure compiler and architecture portability.

o In uCOS-II: INT8U, INT8, INT16U…

Trang 12

Data Types cont’d

• RTOS defines its own data types

o To define its own objects

o In uCOS-II: OS_EVENT, OS_STK, OS_FLAG_GROUP…

Trang 14

• Independent program segment

o Independent execution, independent processing

• Has its own stack

• Threads in the same process share the same address space

• Every process has at least 1 thread

o Most RTOSes consist of a single process and multiple threads.

Trang 15

Thread cont’d

• Each thread has a Task Control Block (TCB)

• Every task is assigned a TCB when created

Trang 16

Thread cont’d

• A TCB contains:

o Task’s priority

o Task’s state

o A pointer to the task’s top of stack

o Other task’s related data

• TCBs reside in RAM

Trang 18

Memory Pools

• Memory Block Pool

o Fixed size based

o Used in most of RTOSes

• Memory Byte Pool

o Smallest size is byte

Trang 26

Event Flag Group

• Event flag 1 bit

• Used for threads synchronization

• Event flag group group of flags

• Threads can operate on any

or all of the event flags

Trang 28

Message Queue

• Used for thread intercommunication

• Queue that can hold 1 message = Mail box

Thread

Thread Thread

Thread Thread

Trang 30

Summary of Thread Synchronization and Communication

Trang 31

Summary of Thread Synchronization and Communication cont’d

Thread Synchronization

Event Notification

Mutual Exclusion

Inter-thread Communication

Ngày đăng: 10/08/2016, 09:57

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN