Commit c9590ef3 authored by Jonas Künzli's avatar Jonas Künzli Committed by overleaf
Browse files

Update on Overleaf.

parent faf1bd5d
......@@ -10,8 +10,11 @@ fertig\\
\item Add Polling and Interrupt (Slide 3-55)
\end{enumerate}
\ownsubsection{Kapitel 4: Programming Paradigms}
fertig!!:D
fertig!!:D \\
\ownsubsection{Kapitel 5: OS}
fertig!!:D \\
\ownsubsection{Kapitel 6: aperiodic, periodic scheduling}
fertig!!:D \\
\ownsubsection{Kapitel 9: Power and Energy}
\begin{enumerate}
\item Add Application control (Slide 9-53)
......
......@@ -21,7 +21,7 @@ Advantages and properties of embedded OS
\item Protection mechanisms not always necessary (Processes tested and considered reliable). $\implies$ Tasks can do their own I/O, including interrupts
\end{compactitem}
\ownsection{Real-Time OS (5-6)}
\ownsubsection{Real-Time OS (5-6)}
\begin{compactitem}
\item The timing behaviour of the OS must be predictable
\subitem For all services upper bound on execution time
......@@ -48,31 +48,13 @@ Advantages and properties of embedded OS
\begin{compactitem}
\item \textbf{Run:} A task enters this state when it starts executing on the processor
\item \textbf{Ready:} State of tasks that are ready to execute but cannot be executed because processor is assigned to another task
\item \textbf{Wait:} A task enters this state when it executes a synchronization primitive to wait for an event, e.g. a wait primite or a semaphore.
\item \textbf{Idle:} A periodic job enters this state when it completes its execution and has to wait for the beginning of the next period.
\textbf{Blocked}: A task enters this state when it executes a synchronization primitive to wait for an event, e.g. a wait primite or a semaphore.
\end{compactitem}
~
\ownsubsection{Threads (5-16)}
A thread is the smallest sequence of programmed instructions that can be managed independently by a scheduler. Multiple threads can exist within the same process and share resources such as memory, while different processes do not share these resource
s. The \textcolor{red}{Thread Control Block (TCB)} stores information needed to manage and schedule a thread.
\ownsubsection{Communication Mechanisms}
\textbf{Problem:} The use of shared resources for implementing message passing schemes may cause priority inversion and blocking.
\newline
\textbf{Synchronous communication:}
\begin{compactitem}
\item Synchronization for a message transfer (\textcolor{red}{rendez-vous}) $\implies$ They have to wait for each other
\item When off-line scheduling: Transformation into precedence constraints.
\end{compactitem}
\textbf{Asynchronous communication:}
\begin{compactitem}
\item Usage of \textbf{Mailbox} (shared memory buffer, FIFO-queue with fixed cap.) $\implies$ Tasks do not have to wait for each other
\item Better suited for real-time systems than synchronous communication
\item Problem: Blocking behaviour if channel is full or empty
\end{compactitem}
\ownsubsection{Classes of embedded OS (5-18)}
\textbf{Class 1: Fast Proprietary Kernels}: For hard real-time systems, these kernels are questionable, because they are designed to be fast, rather than to be predictable in every respect. ~\newline
......@@ -94,5 +76,15 @@ Typical Research questions:
\item formally verified kernel properties
\end{compactitem}
%\ownsubsection{FreeRTOS (5-25)}
\ownsubsection{FreeRTOS (5-25)}
\begin{tabularx}{\columnwidth}{|p{1.7cm} | X|}
\hline
5-28 & Task Management \\
\hline
5-32 & Timers \\
\hline
5-35 & Task States \\
\hline
5-39 & Interrupts \\
\hline
\end{tabularx}
% !TeX root = ../main.tex
\ownsection{Aperiodic and Periodic Scheduling (6)}
\ownsubsection{Real-Time Systems (6-3)}
\begin{compactitem}
\item A real-time task is said to be \textcolor{red}{hard}, if missing its deadline may cause catastrophic consequences on the environment under control.
......@@ -194,7 +193,7 @@ This condition is both necessary and sufficient.
}
\end{python}
\ownsubsection{EDF Scheduling (4-42)}
\ownsubsection{EDF Scheduling (6-56)}
Dynamic priority assignment, intrinsically preemptive, deadlines can be smaller than periods: $D_i \leq T_i$
\textbf{Algorithm:} The currently executing task is preempted whenever another periodic instance with earlier deadline becomes active
......@@ -207,3 +206,49 @@ EDF is optimal w.r.t. schedulability (no set of periodic tasks can be scheduled
\item if $T_i\neq D_i$:
$$U=\sum_{i=1}^{n}\frac{C_i}{D_i}\leq1$$ is only sufficient.
\end{itemize}
\ownsection{Real‐Time Scheduling of Mixed Task Sets (6-63)}
For applications with both aperiodic and periodic tasks.
\begin{compactitem}
\item \textcolor{red}{Periodic Tasks:} time-driven, hard timing constraints
\item \textcolor{red}{Aperiodic Tasks:} event-driven, may have hard, soft or no real-time requirements
\item \textcolor{red}{Sporadic Tasks:} Aperiodic task with a maximum arrival rate (or minimum time between two arrivals) assumed.
\end{compactitem}
\ownsubsection{Background Scheduling (6-65)}
Schedule periodic tasks with RM or EDF. Process aperiodic task in the background, that is, when there is no periodic task request.
\begin{compactitem}
\item Good: Periodic tasks not affected
\item Bad: Aperiodic task may have huge response times and cannot be prioritized.
\end{compactitem}
\begin{center}
\includegraphics[width=0.8\columnwidth]{sched2}
\end{center}
\ownsubsection{RM Polling Server (6-67)}
Introduce an artificial periodic task (\textcolor{red}{server}) to service aperiodic requests. The server is characterized by a period $T_s$ and a computation time $C_s$ and scheduled with the same algorithm used for periodic tasks. \\
Schedulability condition is the same as for normal RM. \\
Disadvantage: If an aperiodic requests arrives just after the server has suspended, it must wait until the beginning of the next polling period. \\
\textbf{Schedulability analysis - sufficient but not necessary}
$$\frac{C_s}{T_s}+\sum_{i=1}^n\frac{C_i}{T_i}\leq \left(n+1\right)\left(2^{1/(n+1)}-1\right)$$
\textbf{Aperiodic Guarantee: }
Assumption: An aperiodic task is finished before a new one arrives. Computation time $C_a$, deadline $D_a$:
$$(1+\Big\lceil\frac{C_a}{C_s}\Big\rceil)T_s\leq D_a$$
\ownsubsection{EDF Total Bandwidth Server (6-71)}
\textbf{Schedulability test}: Given a set of $n$ periodic tasks with processor utilization $U_p$ and a total bandwidth server with utilization $U_s$, the whole set is schedulable by EDF if and only if
$$U_p+U_s\leq 1$$
\begin{align}
\shortintertext{Utilization of periodic tasks:}
U_p &= \sum_i \frac{C_i}{T_i}\\
\shortintertext{Utilization of aperiodic tasks:}
U_s &= \frac{C_s}{T_s}
\end{align}
When the $k$-th aperiodic request arrives at time $t=r_k$, it receives a
deadline $$d_k=\max\{r_k,d_{k-1}\}+\frac{C_k}{U_s}$$ where $C_k$ is the
execution time of the request and $U_s $ the server utilization factor
(=bandwidth). $U_S$ can be chosen such that $U_s\leq 1-U_p$ (necessary and
sufficient).
......@@ -28,6 +28,10 @@ Optimize latency, hardware cost, power and energy
\begin{definition}{Pareto-Dominance}
A solution $a \in X$ weakly Pareto-dominates a solution $b \in X$ ($a \preceq b$) if it is as least as good in all objectives. Solution is $a$ is better than $b$ ($a \prec b$) iff $(a \preceq b) \land (b \cancel{\preceq} a)$
\end{definition}~
\begin{definition}{Pareto point}
is a point on a graph (eg. cost vs. latency). For a given architecture if following points are possible (5,11),(5,10),(3,7) and (3,4) then only the points (5,10) and (3,4) are pareto points.
\end{definition}
~
\begin{definition}{Pareto-optimal}
A solution is \textcolor{red}{Pareto-optimal}, if it is not Pareto-dominated by any other solution. \newline
The set of all Pareto-optimal solutions is the \textcolor{red}{Pareto-optimal front}.
......
......@@ -4,8 +4,8 @@
\pagestyle{fancy}
\lhead{Embedded Systems}
\chead{FS17 }
\rhead{Gian Marti}
\chead{FS19}
\rhead{Very Cool Kids}
\begin{document}
\begin{multicols*}{3}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment