\documentclass[a4paper, 12pt, english]{article}

\usepackage[
    headsep = 25pt
]{geometry}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{setspace}
\usepackage{graphicx}
\usepackage[acronym]{glossaries-extra}

\usepackage{enumitem}
\setlist{nosep}


\title{Advanced Operating Systems\\Assignment Week 11}
\author{Paul Lödige \\ Student ID: 37-229753}

\makeatletter
\newcommand*{\toccontents}{\@starttoc{toc}}
\makeatother

% acronyms
\makeglossaries
\newacronym{EDCL}{EDCL}{Earliest Deadline Critical Laxity}
\newacronym{EDF}{EDF}{Earliest Deadline First}
\newacronym{EDFWM}{EDF-WM}{\glsxtrlong{EDF} with Windowconstraint Mitigation}
\newacronym{EDZL}{EDZL}{Earliest Deadline Zero Laxity}

\begin{document}
\maketitle
\toccontents

\printglossaries

\section{Assignment}%
\label{sec:Assignment}
Summarize the \gls{EDCL} algorithm and the \gls{EDFWM} algorithm within 400 words, respectively,
as compared to the traditional \gls{EDF} algorithm.
\clearpage

\section{\texorpdfstring{\glsxtrfull{EDCL}}{EDCL}}
\label{EDCL}
The \gls{EDCL} algorithm is a derivative of the \gls{EDZL} algorithm which in turn is a modified version of the \gls{EDF} algorithm.
Because of Dhall's effect the \gls{EDF} algorithm is non-optimal for scheduling in a multiprocessor environment.
\gls{EDZL} fixes Dhall's effect by promoting any task to the highest priority when its laxity reaches zero.
In order for this to work the scheduler has to use a precise timer in order to detect the moment when any laxity reaches zero.
\gls{EDCL} foregoes the need for this precise timer by only checking the laxity at the release time or the completion time of any task.
At this moment the scheduler calculates whether any unscheduled task has a laxity that is critical.
The \gls{EDCL} algorithm defines a task's laxity as critical 
if the minimal remaining execution time of the tasks with the closest deadline would not allow the unscheduled task to hold its deadline.
In this case,
the task with the critical laxity is promoted to top priority.\\
\textbf{Pros}
\begin{itemize}
    \item Dhall's effect does not apply (better than \gls{EDF})
    \item easier to implement than \gls{EDZL} while being comparable in schedulability
\end{itemize}
\textbf{Cons}
\begin{itemize}
    \item non-optimal scheduling (worst-case processor utilization of 50\%)
\end{itemize}

\section{\texorpdfstring{\glsxtrfull{EDFWM}}{EDF-WM}}
\label{EDFWM}
The \gls{EDFWM} algorithms can be classified as a semi-partitioning scheduling algorithm
because it schedules most tasks with a fixed processor assignment
and only partitions as few tasks as possible.
The algorithm is based on \gls{EDF} scheduling but avoids Dhall's effect.
The algorithm assigns each new task to a specific processor
as long as the deadline can be guaranteed by that processor.
If the runtime of a new task is longer than the available the task is partitioned.
Each partition is then scheduled on a different processor.
The deadline of each partition relates to its position in the order of partitions.
Additionally the \gls{EDFWM} algorithm only allows the scheduler to migrate each task once.
This cuts down on the number of context switches while only slightly affecting its worst-case utilization.\\
\textbf{Pros}%
\begin{itemize}
    \item Dhall's effect does not apply (better than \gls{EDF})
    \item less context switching than other semi-partitioning scheduling algorithms
\end{itemize}
\textbf{Cons}%
\begin{itemize}
    \item non-optimal scheduling
\end{itemize}


\end{document}
