Advertisement
para_bellum

fdqsdqfs

Oct 28th, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. \documentclass[a4paper,11pt]{article}
  2.  
  3. \usepackage[english]{babel}
  4. \usepackage[utf8x]{inputenc}
  5. \usepackage{graphicx}
  6. \usepackage{geometry}
  7. \geometry{
  8. body={170mm,230mm},
  9. left=25mm,top=25mm,
  10. headheight=25mm,headsep=7mm,
  11. marginparsep=4mm,
  12. marginparwidth=20mm,
  13. footnotesep=50mm
  14. }
  15. \usepackage{enumitem}
  16. \setlist{noitemsep}
  17. \usepackage{amsmath}
  18.  
  19. \title{INFO-F-404: Real-Time Operating Systems\\2013 -- 2014 Project 1: Least Laxity First}
  20. \author{\textsc{Delhaye} Quentin}
  21.  
  22. \begin{document}
  23. \maketitle
  24. \section{Implementation}
  25. \subsection{Task Generator}
  26. The \texttt{main} function of \texttt{taskGenerator} does the following:
  27. \begin{itemize}
  28. \item parsing the program arguments;
  29. \item creating an \texttt{Generator} object with those arguments;
  30. \item asking the object to generate the tasks and saving them to a file.
  31. \end{itemize}
  32.  
  33. The \texttt{WCET} of each task is randomly chosen in the interval $[1;30]$. Similarly, the deadline randomly chosen between the end of the \texttt{WCET} and the end of the period.
  34.  
  35. Saving the tasks into a file is optional, since the analyzer will just require a table with the parameters.
  36.  
  37. \subsection{LLF Scheduler}
  38. The \texttt{main} function of \texttt{simLLF} does the following:
  39. \begin{itemize}
  40. \item parsing the program arguments;
  41. \item extract the information concerning the tasks from the file given in argument;
  42. \item create a new object \texttt{Simulator} that will handle the rest of the job.
  43. \end{itemize}
  44.  
  45. The simulator begins by creating an array of \texttt{Task} objects with the required parameters. The simulation can then begin, for more information about this part, please refer to the appendix~\ref{an:stateDiag}.
  46.  
  47. The computation of the study interval is based on the well-known Euclidean algorithm that give the \textit{gcd} of two numbers. Knowing that $\mbox{gcd(a,b,c)} = \mbox{gcd(gcd(a,b),c)}$, the \textit{lcm} of the set is immediate.
  48.  
  49. Since the system has to be scheduled following the LLF, the \texttt{setPriorities} method will ask to each to compute its own laxity, and then will sort the array containing all the tasks and their corresponding laxity.
  50.  
  51. When the simulation is successful, that is if no task has ever missed its deadline, the \texttt{Simulator} class creates then a new \texttt{GraphCreator} object that will create a \texttt{png} image representing the scheduling of the system.
  52. This image is created using the \texttt{pngwriter} library (which should then be installed on the system).
  53. The points used by this object to generate the image are the begining and ending time of each job, the begining and ending type (preemption, recovery, or normal) as well as the task number (an idle time having an id = $-1$).
  54.  
  55. \begin{figure}
  56. \centering
  57. \includegraphics{tasksEDFvsLLF}
  58. \caption{LLF Scheduling of two tasks}
  59. \label{fig:tasksEDFvsLLF}
  60. \end{figure}
  61.  
  62. As an example, the figure~\ref{fig:tasksEDFvsLLF} represents the scheduling of the system proposed in the first chapter of the course,
  63. slides 83 and 84, with a re-computation of the priorities each unit of time (delta $= 0$).
  64.  
  65. The red triangles reprensent a preemption, the white arrows the arriving of a new job, the white diamonds the deadline, and the green area the idle time of the CPU.
  66.  
  67. \subsection{LLF Analyzer}
  68. The analyser \texttt{LLF\_study} implements all the previous classes. It will begin by generating a set of tasks, and then will simulate them.
  69.  
  70. For further details, please refer to the section~\ref{sec:anal}.
  71.  
  72.  
  73.  
  74.  
  75. \section{Difficulties}
  76. \paragraph{Split the utilization between the tasks} During the generation of the tasks based on the arguments given to \texttt{taskGenerator}, one of the difficulties was to determine what should the utilization of each task be
  77. in order to have the expected system utilization at the end.
  78. The solution chosen is the simplest: assigning the same utilization to each task.
  79.  
  80. It is to be noted that due to this method and because of the use of natural numbers, the actual utilization is a bit off.
  81.  
  82. \section{Results of the simulations}\label{sec:anal}
  83. There are three free parameters in our system: the utilization, the number of tasks in the system, and the \textit{delta}\footnote{The \textit{delta} is the period at which the priorities are computed.}.
  84.  
  85. They will be all compared to the other two, each time one parameter being fixed.
  86.  
  87. \textit{Notes:} some cells will be filled with "N/A" in the case the system was not schedulable. Otherwise, each cell will contain a triplet of intergers: \{study interval, preemptions, idle time\}
  88.  
  89. \paragraph{First round: fixed number of tasks (3), various
  90. \textit{delta} and utilization}
  91. \begin{table}[!h]
  92. \centering
  93. \begin{tabular}{|c|c|c|c|c|c|} \hline
  94. & 50 & 60 & 70 & 80 & 90 \\ \hline
  95. & 100878519 & 25501201172 & 67220234 & caca & caca \hline
  96. \end{tabular}
  97. \caption{Horizontally: \textit{delta}, vertically: utilization}
  98. \end{table}
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105. \clearpage
  106. \appendix
  107. \section{State Diagram of the simulation method}\label{an:stateDiag}
  108. \includegraphics[height=22cm]{StateDiagram}
  109.  
  110.  
  111. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement