Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: Easy RTOS and Interprocess Communication
Description: So do you wanna learn about RTOS and Interprocess Communication in easy way ? If you missed your lectures and you wanna learn about core concepts of RTOS AND IPC then this notes may help you in great way. It has concepts regarding RTOS, deadlock , starvation , Task Synchronization, etc -SIMPLE LUCID LANGUAGE -EASY TO UNDERSTAND -IMPORTANT POINTS ARE COVERED -STUDY AND GET GOOD GRADE
Description: So do you wanna learn about RTOS and Interprocess Communication in easy way ? If you missed your lectures and you wanna learn about core concepts of RTOS AND IPC then this notes may help you in great way. It has concepts regarding RTOS, deadlock , starvation , Task Synchronization, etc -SIMPLE LUCID LANGUAGE -EASY TO UNDERSTAND -IMPORTANT POINTS ARE COVERED -STUDY AND GET GOOD GRADE
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
Topic 6 (M 18)
RTOS & Inter-process Communication
6
...
2 Multitasking
6
...
4 Starvation, Deadlock, Multiple process
6
...
” – WIKIPEDIA
...
RTOS comprises of two components, namely, “Real-Time” and “Operating System”
...
The expectant response depicts the logical correctness of the result produced
...
Operating System
Operating System (OS) is a system program that provides an interface between hardware and
application programs
...
RTOS is therefore an operating system that supports real-time applications and embedded
systems by providing logically correct result within the deadline required
...
Why RTOS for Real-Time Application
RTOS is not a required component of all real-time application in embedded systems
...
But as the complexity of applications expands beyond simple tasks, benefits of having an RTOS
far outweigh the associate costs
...
And as more features are put into them in each iteration, application programs running on the
embedded system platforms will become increasingly complex to be managed as they strive to
meet the system response requirements
...
Features of RTOS
The design of an RTOS is essentially a balance between providing a reasonably rich feature set for
application development and deployment and, not sacrificing predictability and timeliness
...
Multitasking and Preemptibility
An RTOS must be multi-tasked and preemptible to support multiple tasks in real-time
applications
...
ii
...
In RTOS, such capability is achieved by
assigning individual task with the appropriate priority level
...
iii
...
iv
...
v
...
The behavior
metrics are:
• Task switching latency: The time needed to save the context of a currently executing task
and switching to another task is desirable to be short
...
• Interrupt dispatch latency
...
vi
...
Task Synchronization
Synchronization is essential for tasks to share mutually exclusive resources (devices, buffers, etc) and/or
allow multiple concurrent tasks to be executed (e
...
Task A needs a result from task B, so task A can only
run till task B produces it)
...
Event objects are used when task synchronization is required without
resource sharing
...
An event
object can exist in either of two states: triggered and non-triggered
...
In contrast, if the event object is in a nontriggered state, a
waiting task will need to stay suspended
...
o Assume thread T1 has exclusive access to resource R1
...
o If T1 needs exclusive access to R2 and T2 needs exclusive access to
R1, o Neither thread can continue
...
oThe simplest way to avoid a deadlock is for threads to: Acquire all resources
before proceeding Acquire the resources in the same order Release the resource in the revere
order
How to Prevent deadlock:
Deadlock is the situation in which multiple concurrent threads of execution in a system are blocked
permanently because of resources requirement that can never be satisfied
...
Each thread of execution can acquire multiple resources of various types throughout its
lifetime
...
Following is a deadlock situation between two tasks
...
g
...
Task synchronization is achieved using two types of mechanisms:
a) Event Objects b) Semaphores
a) Event objects : Event objects are used when task synchronization is required without resource
sharing
...
Event
object can exist either in triggered or non-triggered state
...
b) b) Semaphores :A semaphore functions like a key that define whether a task has the access to
the resource
...
A
semaphore has an associated resource count and a wait queue
...
The wait queue manages the tasks waiting for resources from the
semaphore
...
Inter process communication techniques are divided into
methods for message passing, synchronization, shared memory and remote procedure calls
...
Message Queue
2
...
Remote procedure call
4
...
Signal
Starvation:
Starvation: Starvation is a resource management problem where a process does not get the
resources it needs for a long time because the resources are being allocated to other processes
...
Where High Priority (Lower
Number = Higher Priority) requests get processed first
...
For example:
Consider priority based scheduling with scheduling criteria as the shortest process first
...
If there is
a continuous supply of shortest process then the longer process may never get scheduled on CPU
which leads to its starvation
...
Embedded system are generally specific but need to
perform many task for same application let us consider example of grinding control machine A
simple microcontroller program can only do one thing at a time
...
The question is, how do you program it so it
will divide its attention between multiple tasks, Round robin and round robin with interrupts are
ways to achieves the multitasking Imagine now a program with 25 steps in the main function plus 5
sub-functions (heating water, updating the display, watching 3 push buttons)
...
Very, very quickly the complexity of
the program becomes quite impossible to untangle
...
What is deadlock? How can it be prevented?
2
...
Explain the features of RTOS
...
What is intertask communication? State various mechanisms to achieve it
...
Describe starvation with example
Title: Easy RTOS and Interprocess Communication
Description: So do you wanna learn about RTOS and Interprocess Communication in easy way ? If you missed your lectures and you wanna learn about core concepts of RTOS AND IPC then this notes may help you in great way. It has concepts regarding RTOS, deadlock , starvation , Task Synchronization, etc -SIMPLE LUCID LANGUAGE -EASY TO UNDERSTAND -IMPORTANT POINTS ARE COVERED -STUDY AND GET GOOD GRADE
Description: So do you wanna learn about RTOS and Interprocess Communication in easy way ? If you missed your lectures and you wanna learn about core concepts of RTOS AND IPC then this notes may help you in great way. It has concepts regarding RTOS, deadlock , starvation , Task Synchronization, etc -SIMPLE LUCID LANGUAGE -EASY TO UNDERSTAND -IMPORTANT POINTS ARE COVERED -STUDY AND GET GOOD GRADE