Lecture 9 - Embedded operating systems Flashcards
What is the difference between a process and the operating system?
The process defines the state of an executing program, and the OS provides mechanisms to switch execution between processes
Why can using OS and processes be beneficial in embedded systems?
Combining these can allow us to implement complex applications with greater flexibility that satisfy timing requirements.
When abstracting the control required to switch between processes to the OS, it is easier to meet timing requirement while keeping the control within the processes cleaner.
What is a RTOS?
Real-time Operating System
An OS that facilitates to meet real time requirements.
An RTOS allocates resources using algorithms that takes timing into account.
How does resource allocation differ in an OS and a RTOS?
An OS will try to allocate resources using the criteria of fairness, giving the different parts of the CPU equally much resources.
A RTOS need to take timing into account. If a RTOS allocate resources equally without thinking about timing, deadlines are likely to be missed.
Define the term “Task” in regards to real-time computing
A set of real-time programs that communicates.
What is a task-graph?
Graph showing the different subtask and dependencies between these.
The edge-arrows defines dependencies between subtasks
What is a process?
Single execution of a program.
Has its own state, memory and registers.
What are threads?
Processes that run in the same address space.
What is multirate systems?
A system where multiple rates of computation must be handled.
Certain operations must execute periodically, and each operation is executed at its own rate.
What are two types of timing requirements that are important for processes?
Initiation time and deadlines
What is the initiation time?
The time at which the process goes from the waiting state to the ready state.
How are aperiodic processes initialized?
The initiation time is measured from the event that initialises it (arrival of extern data, computation of data from another process)
How are periodic processes initialised?
Can be ready at the beginning of a period.
Others may set initiation time at the arrival time of certain data after the start of the period
What are deadlines?
Specifies when computation must be finished.
How are deadlines for aperiodic processes measured?
Deadlines are measured from the initiation time, as these are the only reasonable time references available.
How are deadlines for periodic processes measured?
Deadlines will generally occur at some time before the period ends.
Some scheduling policies simplify that the deadline occurs at the end of the period
What are rate requirements?
How quickly must processes be initialised
What is a period?
The time between successive executions in a process.
Specification of the expected behaviour of a task
What is the process’s rate?
Inverse of its period.
In multirate systems, each process executes at their own rate
What is a common requirement for periodic processes?
Initiation interval to be equal to the period
What is response time?
The time at which the process finishes.
If the schedule meets the requirements, the response time will be before the period end.
Computation time is a part of response time, but response time also includes time the process is de-scheduled by other tasks.
What is computation time?
How long it takes to execute.
What is the jitter of a task?
The allowable variation in its completion.
What can happen if a deadlines is missed?
In safety-critical systems it can be catastrophic if deadlines are missed, and they might want to take measures to i.e. approximating data or switching into a safety modes.
For systems where safety is not that important, simpler measures can be taken, or the failure can be ignored all together.
What is utilization?
Available CPU time, a way to measure the efficiency at which we use the CPU.
U = CPU-time-for-useful-work / total-available-CPU-time
What is scheduling?
The work of choosing the order of running processes
Name the 3 scheduling states
Waiting, ready and executing
Ready: Any process that could be executing are in the ready state, have received all data, has entered a new period
Waiting: A process waiting for data, completed all work for this period
Executing: Process selected by the scheduler to run
What is a scheduling algorithm?
Algorithm that decides how processes are selected for the promotion from the ready to the execute state.