EXAM 1 Flashcards
Hard RTS
- Must meet its deadline with zero flexibility ( or near-zero degree of flexibility)
- Result is useless if computed after the dealine
- If the deadline is missed, it can be catastrophic, costly, may involve human life or entire system damage
Soft RTS
- There is a level of flexibility in meeting the deadline
- Applied when
- > Does not involve catastrophic failures
- > It is still acceptable ( within a frame of tolerance)
- > Can be somehow corrected by approximation, etc.
- Occasional soft or permanent soft RTS
RTS Requirement
Computation must be finished before reaching a given deadline
Differentiation of Hard vs. Soft
- Hard RTS – at deadline you have a deterministic value/action
- Soft RTS – the value can be an estimation
Corrections for Hard and Soft
- Hard systems make every effort in predicting if a pending deadline might be missed
- > Anticipation of a missed deadline
- > Envelope of deadline ‘safety zone’
- > Able to apply corrective actions before a catastrophe
- > Compensate by computing estimations forward instead relying on precise values
- Soft systems may have recovery actions after the deadline is missed – think about resynchronization
Deterministic Character
- In RTS, timing correctness complements functional correctness – they coexist
- You work with functional and timing issues, and moreover, you synchronize functions by means of accepting/issuing timing events
- RTS have substantial knowledge of the controlled environment as well as the controlled system itself
- RTS have deterministic character
- > Because the response time to a dedicated event is bonded
- -> Fixed bonding
- -> Flexible bonding
- > Actions are taken in response to an event as known a-priori
- > They are less adaptable to the changing environment
- -> Dedication to a mission
- -> Because of lack of adaptation they can be less robust
- > Levels of determinism and robustness can be balanced (some form of adaptation may be permitted)
- > This balancing is application specific
Round Robin Scheduling
Tasks all get an equal amount of time, sharing the processing unit equally. Typically, there is a variation of scheduling algorithms used, such as preemptive attributes allow a round robin scheduler to have higher priority task interrupt a task execution.
Preemptive Priority Scheduling
Tasks are executed based of priority. This is often used in conjunction with another algorithm, such as round robin.
Objects
- Special constructs that are the building blocks for application development for RTOS
- > Tasks - concurrent and independent threads of execution that can compete for CPU execution time
- > Semaphores - are token-like objects that can be incremented/decremented by tasks for synchronization or mutual exclusion
- > Message queues - are buffer-like data structures that can be used for synchronization, mutual exclusion, and data exchange by passing messages between tasks.
- Developers can combine these objects (and others) to solve common real-time problems such as concurrency, activity synchronization, and data communication
Services
- Help developers to create applications
- They comprise sets of API calls to kernel objects, or in general to facilitate timer management, interrupt handling, device I/O, and memory management
The five key characteristics of an RTOS
- Reliability
- Predictability
- Performance
- Compactness
- Scalability
Reliability
- One of the most important characteristics
- Must need to operate for long periods of time without human intervention
- Some may allow reset, others will not allow due to consequences
- Reliability is influenced by all components (hardware and software)
Predictability
- Meeting time requirements
- Deterministic - must have predictable behavior
- Measuring:
- > Testing time responses in different situations
- > Computing the variance of the response times for each type of system call
Performance
- How fast deadlines are met
- Measuring:
- > MCU MIPS
- > Throughput - measure overall system performance
- -> The rate at which a system can generate outputs based on inputs coming in
- -> The amount of data transferred divided by the time taken (bps)
- > Call-by-call
- -> Use of timestamps to indicate when a system call started and when finished
Compactness (plus weight and software size)
- Physical size (final product)
- Resources taken (understanding memory requirements is very important
Scalability
- RTOS should scale-up (or scale-down) to meet a wide variety of applications
- Depends on a number of functionalities used
- Ability to add extra modules/services
Tasks
An independent thread of execution, which it can compete with other tasks for execution.
Idle task
- This is a system task of lowest priority executing an endless loop
- Executed when no other task can run
- It can be a user supplied routine
Task execution states
- Ready state
- Blocked state
- Running state
Task states must be maintained by a kernel.