Top Banner
Introduction to Real-Time Operating Systems
17

Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

May 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Introduction to Real-Time Operating Systems

Page 2: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

GPOS vs RTOS

• General purpose operating systems• Real-time operating systems

Page 3: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

GPOS vs RTOS: Similarities

• Multitasking• Resource management• OS services to applications• Abstracting the hardware

Page 4: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Characteristics of RTOS

• Reliability in embedded application• Scale up or down ability• Faster performance• Reduced memory requirement• Scheduling policies for real-time• Diskless• portability

Page 5: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating
Page 6: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating
Page 7: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Kernel Objects

• Help developers creates applications for real-time embedded systems

Page 8: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Scheduler

• Determine which task executes when• Schedulable entities-a kernel object that

can compete for execution on a system-> process, task

• Multitasking: many thread of execution appear to be running concurrently

Page 9: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Scheduler

• Context: the state of CPU registers• Context switch• When a new task is created, TCB(task

control block) is also created• TCB: system data structure

Page 10: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating
Page 11: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Scheduling Algorithms

• Preemptive priority-based scheduling• Round-robin scheduling

Page 12: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating
Page 13: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

• 256 priority levels• 0: highest• 256: lowest

Page 14: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating
Page 15: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Objects

• Tasks• Semaphore: token-like objects for

synchronization & mutual exclusion• Message queue: buffer-like data structures

Page 16: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Common Real-Time Design Problems

• Concurrency• Activity synchronization• Data communication

• Developers combine basic kernel objects

Page 17: Introduction to Real-Time Operating Systemsccrs.hanyang.ac.kr/webpage_limdj/rt_lab/ch4.pdf · Introduction to Real-Time Operating Systems. GPOS vs RTOS • General purpose operating

Key Characteristics of RTOS

• Reliability• Predictability• Performance• Compactness• Scalability