Embedded Systems: Department of Electrical and Computer Engineering MWU University
Embedded Systems: Department of Electrical and Computer Engineering MWU University
Lecture 4
Chapter 4
Real-time Operating systems
3
Real-Time Operating System (RTOS)
RTOS Architecture
4
Real-Time Operating System (RTOS)
Multitasking
allowing a user to perform more than one
computer task at a time
to keep track of where you are in these tasks
go from one to the other without losing
information
multitasking not equal multithreading
Examples:-
MS Windows 2000, IBM's OS/390, Linux
5
Real-Time Operating System (RTOS)
• Multithreading
thread is placeholder information associated with a
single use of a program that can handle multiple
concurrent users
If multiple users are using one program, a thread is
created and maintained for each of them
thread information is kept in a special data area and
putting the address in a register
Languages that support OOP also accommodate and
encourage multithreading, like Java
6
Real-Time Operating System (RTOS)
Interrupt
Is a signal from a program (or from a device) that
causes the main program (the operating system) to
stop and figure out what to do next
Almost all personal (or larger) computers today are
interrupt-driven
Basically, a computer can perform only one
instruction at a time. But, because of interrupt, it can
handle many tasks. (multitasking and multithreading)
Every OS has an interrupt handler (to handler priority,
save the queue, etc)
There are HW interrupts and SW interrupts
7
Real-Time Operating System (RTOS)
8
Real-Time Operating System (RTOS)
9
Real-Time Operating System (RTOS)
• Scheduling Techniques
Most RTOSs do their scheduling of tasks using a
scheme called "priority-based preemptive scheduling"
Each task in a software application must be assigned a
priority (high, low)
"Preemptive" means that the scheduler is allowed to
stop any task at any point in its execution, if it
determines that another task needs to run
immediately
The Highest Priority Task that is Ready to Run, will be
the Task that Must be Running.
10
Real-Time Operating System (RTOS)
11
Real-Time Operating System (RTOS)
12
Real-Time Operating System (RTOS)
13
Real-Time Operating System (RTOS)
14
Real-Time Operating System (RTOS)
15
Real-Time Operating System (RTOS)
16
Real-Time Operating System (RTOS)
17