From 419ee2957e35830d4726b329307cfae6de274dde Mon Sep 17 00:00:00 2001
From: Jan Altenberg <jan@linutronix.de>
Date: Tue, 25 Jan 2011 15:37:04 +0100
Subject: linux-processes: Added CPU affinity and resource limits

---
 .../linux-processes/pres_linux-processes_en.tex    | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

(limited to 'linux-basics/linux-processes/pres_linux-processes_en.tex')

diff --git a/linux-basics/linux-processes/pres_linux-processes_en.tex b/linux-basics/linux-processes/pres_linux-processes_en.tex
index 73582d8..142ab50 100644
--- a/linux-basics/linux-processes/pres_linux-processes_en.tex
+++ b/linux-basics/linux-processes/pres_linux-processes_en.tex
@@ -193,6 +193,30 @@ Scheduling policies:
 \end{verbatim}
 \end{frame}
 
+\begin{frame}[fragile]
+\frametitle{Setting scheduling class and priority}
+\begin{lstlisting}
+#include <sched.h>
+
+struct sched_param param;
+int ret;
+
+params.prio = 80;
+ret = sched_setscheduler(0, SCHED_FIFO, &param);
+[...]
+\end{lstlisting}
+\end{frame}
+
+\begin{frame}[fragile]
+\frametitle{Resource limits}
+\begin{lstlisting}
+#include <sys/resource.h>
+
+int setrlimit(int resource,
+           const struct rlimit *rlim);
+\end{lstlisting}
+\end{frame}
+
 \section{Daemons}
 \begin{frame}
 \frametitle{Daemons}
@@ -214,6 +238,38 @@ working directory and so on...)
 \end{itemize}
 \end{frame}
 
+\begin{frame}[fragile]
+\frametitle{Scheduling on Multicore Systems}
+\begin{itemize}
+\item CPU affinity
+\item Kernelparameters:
+\begin{itemize}
+\item num\_cpus=
+\item isolcpus=
+\item cpuset=
+\end{itemize}
+\end{itemize}
+\end{frame}
+
+\section{Multicore specific scheduling}
+\begin{frame}[fragile]
+\frametitle{CPU affinity}
+\begin{lstlisting}
+#define _GNU_SOURCE
+#include <sched.h>
+
+cpu_set_t set;
+
+CPU_ZERO(&set);
+CPU_SET(0, &set);
+CPU_SET(1, &set);
+
+[...]
+
+sched_setaffinity(pid, CPU_SETSIZE, &set);
+\end{lstlisting}
+\end{frame}
+
 \section*{sources}
 \begin{frame}
 \begin{thebibliography}{1}
-- 
cgit v1.2.3


From 3b9f4a0ca8282a8c660c3faf20a6dc0adf8531a3 Mon Sep 17 00:00:00 2001
From: Jan Altenberg <jan@linutronix.de>
Date: Tue, 25 Jan 2011 17:28:52 +0100
Subject: Mention the ELF format Explain the memory layout of a process

---
 .../linux-processes/pres_linux-processes_en.tex         | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

(limited to 'linux-basics/linux-processes/pres_linux-processes_en.tex')

diff --git a/linux-basics/linux-processes/pres_linux-processes_en.tex b/linux-basics/linux-processes/pres_linux-processes_en.tex
index 142ab50..3ac3f8d 100644
--- a/linux-basics/linux-processes/pres_linux-processes_en.tex
+++ b/linux-basics/linux-processes/pres_linux-processes_en.tex
@@ -47,6 +47,23 @@
 \def\lximg{none}
 
 \section{Process Management}
+\begin{frame}
+\frametitle{Binary formats}
+A program file includes meta information which describes the format
+of the executable. Linux uses the ELF format (Executable Linking Format)
+\end{frame}
+
+\begin{frame}
+\frametitle{Process Memory Layout}
+\begin{itemize}
+\item text segment
+\item initialized data segment
+\item uninitialized data segment
+\item stack
+\item heap
+\end{itemize}
+\end{frame}
+
 \begin{frame}
 \frametitle{Process creation}
 From the operatings system's point of view, there are basically two steps,
-- 
cgit v1.2.3


From 5c1118f6f422555b7d16b0336bc0792745ea9e11 Mon Sep 17 00:00:00 2001
From: Jan Altenberg <jan@linutronix.de>
Date: Tue, 25 Jan 2011 17:48:27 +0100
Subject: Bugfix: Kernel parameters for SMP

---
 linux-basics/linux-processes/pres_linux-processes_en.tex | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'linux-basics/linux-processes/pres_linux-processes_en.tex')

diff --git a/linux-basics/linux-processes/pres_linux-processes_en.tex b/linux-basics/linux-processes/pres_linux-processes_en.tex
index 3ac3f8d..6ac373f 100644
--- a/linux-basics/linux-processes/pres_linux-processes_en.tex
+++ b/linux-basics/linux-processes/pres_linux-processes_en.tex
@@ -261,9 +261,8 @@ working directory and so on...)
 \item CPU affinity
 \item Kernelparameters:
 \begin{itemize}
-\item num\_cpus=
+\item max\_cpus=
 \item isolcpus=
-\item cpuset=
 \end{itemize}
 \end{itemize}
 \end{frame}
-- 
cgit v1.2.3


From a0dae75b137a16b70a1ba324cf961178ba748b71 Mon Sep 17 00:00:00 2001
From: Jan Altenberg <jan@linutronix.de>
Date: Thu, 27 Jan 2011 13:02:37 +0100
Subject: Fix typo

---
 linux-basics/linux-processes/pres_linux-processes_en.tex | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'linux-basics/linux-processes/pres_linux-processes_en.tex')

diff --git a/linux-basics/linux-processes/pres_linux-processes_en.tex b/linux-basics/linux-processes/pres_linux-processes_en.tex
index 6ac373f..911cffc 100644
--- a/linux-basics/linux-processes/pres_linux-processes_en.tex
+++ b/linux-basics/linux-processes/pres_linux-processes_en.tex
@@ -36,7 +36,7 @@
 % on the following slides, include icon in the left sidebar
 \def\lximg{/usr/share/lx/icons/fueller.png}
 
-\title{Linux process mangagement / Scheduling / Daemons}
+\title{Linux process management / Scheduling / Daemons}
 \institute{Linutronix GmbH}
 
 \begin{document}
-- 
cgit v1.2.3

