Skip to content

Commit f3cdbba

Browse files
committed
Improved language.
1 parent 97f4e5a commit f3cdbba

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

proc.tex

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@
251251
that switches the context to different process. The downside of cooperative
252252
planning is that one process can block the CPU and other processes forever.
253253
\item Unix uses only preemptive planning for user processes.
254+
\item There is also a \emph{tickless kernel} that uses a variable timer tick.
254255
\item Traditional (historical) UNIX \emsl{kernel} uses cooperative planning,
255256
i.e. process running in kernel mode is not switched until it gives up the CPU
256257
by itself.
@@ -472,7 +473,16 @@
472473
runs in foreground (\emph{foreground process group}) and has access to the
473474
controlling terminal for input and output, the rest is running in the background
474475
(\emph{background process groups}) and have only optional access to the output
475-
or no at all. (disallowed operation with terminal will stop the process).
476+
or no at all.
477+
478+
A disallowed operation with a terminal will stop the process. To verify, start
479+
a process in the background, for example a simple shell script that does
480+
\texttt{read a}. On the next shell prompt, you will be notified by the shell
481+
that the process was stopped (you can set your shell to notify you about such
482+
events asynchronously -- if you know what you are doing). The process was
483+
actually stopped by signal \texttt{SIGTTIN}. How to verify that? Run
484+
\texttt{strace -o output ./the-script \&} and check the output file.
485+
476486
\item[parent process:] Each process (besides \texttt{swapper},
477487
\texttt{pid~==~0})
478488
has a parent, i.e. process that created it with the \texttt{fork} syscall.
@@ -700,6 +710,7 @@
700710
...
701711
\end{verbatim}
702712

713+
Example: \example{exec/execl-buggy.c}
703714
\end{itemize}
704715

705716
%%%%%
@@ -897,8 +908,8 @@
897908
\begin{itemize}
898909
\item creates an unnamed pipe and allocates a pair of file descriptors
899910
\begin{itemize}
900-
\item \texttt{fildes[0]} \dots{} reading from a pipe
901-
\item \texttt{fildes[1]} \dots{} writing to a pipe
911+
\item \texttt{fildes[0]} \dots{} for reading from a pipe
912+
\item \texttt{fildes[1]} \dots{} for writing to a pipe
902913
\end{itemize}
903914
\item the system makes sure that:
904915
\begin{itemize}

0 commit comments

Comments
 (0)