finished the LaTeX script

This commit is contained in:
2022-12-16 00:40:30 +09:00
parent 4c4a0b1c61
commit a128c8ae63
6 changed files with 158 additions and 2 deletions

View File

@@ -0,0 +1,90 @@
\documentclass[a4paper, 12pt, english]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{setspace}
\usepackage{graphicx}
\title{Advanced Operating Systems\\Assignment Week 10}
\author{Paul Lödige \\ Student ID: 37-229753}
\makeatletter
\newcommand*{\toccontents}{\@starttoc{toc}}
\makeatother
\begin{document}
\maketitle
\toccontents
\section{Assignment}%
\label{sec:Assignment}
Create a user-space program (any language is acceptable)
that differentiates the performance of the Linux Kernel with the PREEMPT\_ RT patches from that without the PREEMPT\_ RT patches.
Compile and run the program.
Submit the source code and the screen shots of the standard output and the kernel log message, respectively, when the program is being executed.
\clearpage
\section{Code}%
\label{sec:Code}
\definecolor{mGreen}{rgb}{0,0.6,0}
\definecolor{mGray}{rgb}{0.5,0.5,0.5}
\definecolor{mPurple}{rgb}{0.58,0,0.82}
\definecolor{backgroundColour}{rgb}{0.95,0.95,0.92}
\lstset{
language=bash,
backgroundcolor=\color{backgroundColour},
commentstyle=\color{mGreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{mGray},
stringstyle=\color{mPurple},
basicstyle=\ttfamily\scriptsize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
firstnumber=0,
stepnumber=1,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
literate={~}{{$\mathtt{\sim}$}}1
}
\lstset{literate=%
{Ö}{{\"O}}1
{Ä}{{\"A}}1
{Ü}{{\"U}}1
{ß}{{\ss}}2
{ü}{{\"u}}1
{ä}{{\"a}}1
{ö}{{\"o}}1
}
The following code is just a shell script that makes use of two programs provided by the \texttt{rt-tests} package (Arch Linux).
It uses the \texttt{hackbench} program to put stress on the system and then evaluates the maximum latency with the \texttt{cyclictest} program.
This provides a much more reliable method of testing the real-time capabilites of the system than any self-developed code I was able to come up with.
\lstinputlisting{../test.sh}
The code is based on the following two sources:\\
\url{https://wiki.archlinux.org/title/Realtime_kernel_patchset}\\
\url{https://shuhaowu.com/blog/2022/02-linux-rt-appdev-part2.html}
\section{Output}%
\label{sec:Output}
\subsection{with PREEMPT\_RT}%
\label{sub:with PREEMPT RT}
\includegraphics[width = \textwidth]{with_rt.png}
\subsection{without PREEMPT\_RT}%
\label{sub:without PREEMPT RT}
\includegraphics[width = \textwidth]{without_rt.png}
\end{document}

BIN
LaTeX/with_rt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
LaTeX/without_rt.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB