[bootlin/training-materials updates] master: kernel-driver-development-processes: Add slide about mode, context and address space (ef5bcb5e)

Gregory CLEMENT gregory.clement at bootlin.com
Wed Jan 20 14:24:24 CET 2021


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/ef5bcb5e337d2a037c5230ffb7bde4c6967d0014

>---------------------------------------------------------------

commit ef5bcb5e337d2a037c5230ffb7bde4c6967d0014
Author: Gregory CLEMENT <gregory.clement at bootlin.com>
Date:   Wed Jan 20 14:19:39 2021 +0100

    kernel-driver-development-processes: Add slide about mode, context and address space
    
    We didn't really explained what the kernel mode was and the relation
    between the mode, the address space and the context.
    
    This new slide add information about it.
    
    Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>


>---------------------------------------------------------------

ef5bcb5e337d2a037c5230ffb7bde4c6967d0014
 .../kernel-driver-development-processes.tex        | 36 ++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/slides/kernel-driver-development-processes/kernel-driver-development-processes.tex b/slides/kernel-driver-development-processes/kernel-driver-development-processes.tex
index 44379f08..8796649a 100644
--- a/slides/kernel-driver-development-processes/kernel-driver-development-processes.tex
+++ b/slides/kernel-driver-development-processes/kernel-driver-development-processes.tex
@@ -40,6 +40,42 @@
   \end{center}
 \end{frame}
 
+\begin{frame}
+  \frametitle{Relation between execution mode, address space and context}
+  \begin{itemize}
+  \item When speaking about \emph{process} and \emph{thread}, these
+    concepts need to be clarified:
+    \begin{itemize}
+    \item \emph{Mode} is the level of privilege allowing to perform
+      some operations:
+      \begin{itemize}
+      \item \emph{Kernel Mode}: in this level CPU can perform any
+        operation allowed by its architecture; any instruction, any
+        I/O operation, any area of memory accessed.
+      \item \emph{User Mode}: in this level, certain instructions are
+        not permitted (especially those that could alter the global
+        state of the machine), some memory areas cannot be accessed.
+      \end{itemize}
+    \item Linux splits its \emph{address space} in \emph{kernel space}
+      and \emph{use space}
+      \begin{itemize}
+      \item \emph{Kernel space} is reserved for code running in
+        \emph{Kernel Mode}.
+      \item \emph{User space} is the place were applications execute
+        (accessible from \emph{Kernel Mode}).
+      \end{itemize}
+    \item \emph{Context} represents the current state of an execution flow.
+      \begin{itemize}
+      \item The \emph{process context} can be seen as the content of
+        the registers associated to this process: execution register,
+        stack register...
+      \item The \emph{interrupt context} replaces the \emph{process
+          context} when the interrupt handler is executed.
+      \end{itemize}
+    \end{itemize}
+  \end{itemize}
+\end{frame}
+
 \begin{frame}
   \frametitle{A thread life}
   \begin{center}




More information about the training-materials-updates mailing list