Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified 06-process_rel/06-process_rel.pdf
Binary file not shown.
53 changes: 40 additions & 13 deletions 06-process_rel/06-process_rel.tex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
% Hanyang University, Seoul, Korea
% esos.hanyang.ac.kr
% 2016-09-20
% Update: Muhammad Faris Fathoni
% Gyeongsang National University
% 2018-10-11
% note: some slides are adopted from \url{www.cs.stevens.edu/~jschauma/631A/}
% https://github.com/resourceful/lecture_sysprog/

Expand All @@ -24,7 +27,7 @@

\title{System Programming}
\subtitle{Topic 6: Process Relationships}
\author[SJL]{Seongjin Lee}
\author[SJL]{Seongjin Lee\\Updated by: Muhammad Faris Fathoni}
\institute{\href{mailto:[email protected]}{[email protected]}\\\url{http://open.gnu.ac.kr}\\Systems Research Lab.\\Gyeongsang National University}
\date{\today}

Expand All @@ -43,7 +46,7 @@

\begin{frame}[t]
\frametitle{introduction}
This chapter covers following items
Overview
\begin{itemize}
\item Terminal Logins
\item Sessions
Expand All @@ -58,11 +61,10 @@
\section{Terminal Logins}

\begin{frame}[t]
\frametitle{Terminal}
\frametitle{BSD Terminal}
\begin{figure}[h]
\centering
\includegraphics[width=0.8\linewidth]{figure/quote-a-computer-terminal-is-not-some-clunky-old-television-with-a-typewriter-in-front-of-it-it-is-an-douglas-adams-296711.jpg}
\caption{Douglas Noel Adams was an English author, scriptwriter, essayist, humorist, satirist and dramatist, best known as the author of The Hitchhiker's Guide to the Galaxy'' 1978}
\includegraphics[width=0.8\linewidth]{figure/FreeBSDPict.png}
\end{figure}
\end{frame}

Expand All @@ -82,6 +84,10 @@ \section{Terminal Logins}
James ttys000 Oct 13 22:02
James ttys001 Oct 13 22:08
\end{verbatim}
\begin{figure}[h]
\centering
\includegraphics[width=0.8\linewidth]{figure/GambarWho.png}
\end{figure}
\end{itemize}
\end{frame}

Expand Down Expand Up @@ -192,6 +198,21 @@ \section{Terminal Logins}
\end{table}
\end{frame}

\begin{frame}[t]
\frametitle{BSD Terminal Login Process}
\begin{figure}[h]
\centering
\includegraphics[width=0.5\linewidth]{figure/[5]LoginProc.png}
\end{figure}
\end{frame}

\begin{frame}[t]
\frametitle{BSD Terminal}
\begin{figure}[h]
\centering
\includegraphics[width=0.8\linewidth]{figure/[4]BSD.png}
\end{figure}
\end{frame}



Expand All @@ -211,6 +232,7 @@ \section{Process Groups and Sessions}
\begin{codedef}
#include <unistd.h>
pid_t getpgrp(void);
pid_t getpgid(pid_t pid);
// Returns: process group ID of calling process
\end{codedef}

Expand All @@ -225,9 +247,10 @@ \section{Process Groups and Sessions}
// Returns: 0 if OK, −1 on error
\end{codedef}

Each process group can have a process group leader
\begin{itemize}
\item sets the process group ID to \textit{pgid} in the process whose process ID equals to pid
\item if \texttt{pgid} == \texttt{pid}, then \texttt{pid} == process group leader
\item Process group leader identified by its \texttt{pgid} (if \texttt {pgid} == \texttt{pid})
\item Leader can create a new process group, create processes in the group
\item if \texttt{pid} == 0, caller process ID is used
\item if \texttt{pgid} == 0, group ID == \texttt{pid}
\item A porcess can set the process group ID of itself or its children
Expand Down Expand Up @@ -351,11 +374,12 @@ \section{Controlling Terminal and Job Controls}
\begin{frame}[fragile]
\frametitle{Job Control}

We can start a job in either the forground or the background
We can start a job in either the foreground or the background

Examples:
\begin{description}
\item[foreground] \texttt{vi main.c} starts a job in the foreground
\item[background] \texttt{make all \&} start a job in the background
\item[foreground] \texttt{vi main.c} --> starts a job in the foreground
\item[background] \texttt{make all} --> start a job in the background
\end{description}

\begin{verbatim}
Expand All @@ -374,13 +398,16 @@ \section{Controlling Terminal and Job Controls}
\frametitle{Job Control cont'd}
The foreground jobs are affected by some special characters, which generate signals
\begin{itemize}
\item Interrupt character (typically DELETE or Control-C) generates SIGINT
\item Quit character (typically Control-bashslash) generates SIGQUIT
\item Suspend character (typically Control-Z) generatea SIGTSTP
\item Interrupt character (typically Ctrl + C) generates SIGINT
\item Quit character (typically Ctrl + backslash) generates SIGQUIT
\item Suspend character (typically Ctrl + Z) generates SIGTSTP
\item Pause character (typically Ctrl + S) generates SIGSTOP
\item Resume character (typically Ctrl + Q) generates SIGCONT
\end{itemize}
\end{frame}



\begin{frame}[fragile,t]
\frametitle{Job Control cont'd}

Expand Down
Binary file added 06-process_rel/figure/FreeBSDPict.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 06-process_rel/figure/GambarWho.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 06-process_rel/figure/[4]BSD.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 06-process_rel/figure/[5]LoginProc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.