Documente Academic
Documente Profesional
Documente Cultură
UNIT-III
Software Architecture of Embedded Systems:
We will discuss four architectures starting with the simplest one, which
practically has no control of your response and priorities, moving on to
others that give greater control but at a cost of increased complexity.
1)Round-Robin
3)Function-Queue-Scheduling Architecture
In this architecture, the interrupt service routines add function pointers
to a queue of function pointers.
The main routine just reads
pointers from the queue can
calls the function.
The advantages:
No rule says main has to call the functions in the order that the
interrupt routines occurred.
Any task code functions that need quicker response can be executed
earlier.
All this takes is a little clever coding in the routines that queue up the
function pointers.
worst wait: The length of the longest of the task code function s.
The trade-off/ compromise for better response:
The response for the lower-priority task code functions may get worse.
Lower-priority functions may never execute if the interrupt service
schedule the higher-priority functions frequently enough to use up all
of the microprocessor’s available time.
4)Real-Time Operating System Architecture (RTOS)
The difference b/w this architecture and others are that:
The necessary signalling b/w the ISR and the task code is handled by the
RTOS which is not present in this code (Fig 5.8), and does not use
shared variables for this purpose.
No loop in the code decides what needs to be done next, the code in
the RTOS decides which task code function/subroutine is more urgent
and should run.
The RTOS can suspend one task code subroutine in the middle of its
processing in order to run another.
Advantages:
RTOS can control task code response as well as ISR response.
The worst-case wait for the highest-priority task code is zero.
Therefore, your system’s response will be relatively stable.
RTOSs are widely available for purchase.
Disadvantage: RTOS itself uses certain amount of processing time by
getting better response at the expense of little bit of throughput.
Comparison:
5)Selecting an Architecture
Select the simplest architecture that will meet your response
requirements.
If your system has response requirements that might demand using a
RTOS use it.
Hybrid architectures make sense for some systems.
THE END