Skip to content

Commit 8af07d6

Browse files
author
Vladimir Kotal
committed
finish spellchecking of the synchro file
1 parent 78da2da commit 8af07d6

File tree

2 files changed

+33
-13
lines changed

2 files changed

+33
-13
lines changed

synchro.tex

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
\begin{slide}
1616
\sltitle{Problem: conflict while sharing data}
1717
\begin{itemize}
18+
ifdef([[[NOSPELLCHECK]]], [[[
1819
\item \texttt{struct \{ int a, b; \} \emph{shared};}
20+
]]])
1921
\item
2022
\begin{alltt}
2123
for( ; ; ) \{
@@ -59,7 +61,9 @@
5961

6062
\begin{slide}
6163
\sltitle{Conflict scenario}
64+
ifdef([[[NOSPELLCHECK]]], [[[
6265
\begin{tabular}{rl@{\hspace{2cm}}|c|c|}
66+
]]])
6367
\multicolumn{2}{l}{Processes \emsl{A}\texttt{(val==1)} and
6468
\emsl{B}\texttt{(val==2)}} & \multicolumn{1}{c}{\texttt{a}} &
6569
\multicolumn{1}{c}{\texttt{b}}\\
@@ -102,7 +106,9 @@
102106
\item it is necessary to ensure atomic operation on the structure, i.e.
103107
while one processes modifies the structure, the other cannot manipulate it.
104108
\end{itemize}
109+
ifdef([[[NOSPELLCHECK]]], [[[
105110
\begin{tabular}{rl@{\hspace{2cm}}|c|c|}
111+
]]])
106112
\multicolumn{2}{l}{Processes \emsl{A}\texttt{(val==1)} and
107113
\emsl{B}\texttt{(val==2)}} & \multicolumn{1}{c}{\texttt{a}} &
108114
\multicolumn{1}{c}{\texttt{b}}\\
@@ -280,8 +286,8 @@
280286
that created the lock to the lock file. The process that is waiting for unlock
281287
can verify that the process with given PID number exists. If not, it can remove
282288
the lock file and retry. User level command that can do this is e.g.
283-
\emsl{shlock}(1) (on FreeBSD in \texttt{/usr/ports/sysutils/shlock}), however
284-
could cause situation in the following paragraph:
289+
\emsl{\texttt{shlock}}(1) (on FreeBSD in \texttt{/usr/ports/sysutils/shlock}),
290+
however could cause situation in the following paragraph:
285291
\item \emsl{watch out:} if multiple processes find out simultaneously that
286292
the process does not exist, it can lead to error. First process deletes the
287293
lock file and creates new one with its PID. Next process does the same,
@@ -337,7 +343,7 @@
337343
(e.g. \texttt{lockd} implements just advisory locking)
338344
\item for given file they are enabled by setting the SGID bit and
339345
removing right to execute for the group
340-
(tj. setting that otherwise does not make sense).
346+
(i.e. setting that otherwise does not make sense).
341347
One process sets the lock (e.g. using \texttt{fcntl}). Other processes
342348
then do not have to check the lock explicitly because each
343349
\texttt{open/read/write} operation is checked by the kernel against
@@ -515,13 +521,15 @@
515521
\end{slide}
516522

517523
\begin{itemize}
518-
\item \emsl{P} is from dutch \uv{proberen te verlagen} -- try to
519-
decrement, \emsl{V} from \uv{verhogen} -- increment.
524+
\item \emsl{P} is from dutch ifdef([[[NOSPELLCHECK]]],
525+
[[[\uv{proberen te verlagen}]]]) -- try to
526+
decrement, \emsl{V} from ifdef([[[NOSPELLCHECK]]], [[[\uv{verhogen}]]])
527+
-- increment.
520528
\item The \texttt{P(s)} and \texttt{V(s)} operations can be made generic:
521529
the semaphore value is possible to change with any integer
522530
\texttt{n} \dots{} \texttt{P(s,~n)}, \texttt{V(s,~n)}.
523531
\item Allen B. Downey: \emph{The Little Book of Semaphores}, Second Edition,
524-
on-line na \url{http://greenteapress.com/semaphores/}
532+
on \url{http://greenteapress.com/semaphores/}
525533
\item \emph{binary semaphore} has only values 0 or 1
526534
\end{itemize}
527535

@@ -559,38 +567,49 @@
559567

560568
%%%%%
561569

570+
ifdef([[[NOSPELLCHECK]]], [[[
562571
\pdfbookmark[1]{sem\_open, sem\_wait, sam\_post, sem\_close}{posix-semaphores}
572+
]]])
563573

564574
\label{NAMED_SEMAPHORES}
565575
\begin{slide}
566576
\sltitle{POSIX API for semaphores}
567577

568578
\begin{minipage}{\slidewidth}\vspace{-1\baselineskip}\texttt{\begin{tabbing}
579+
ifdef([[[NOSPELLCHECK]]], [[[
569580
sem\_t \funnm{sem\_open}(\=const *char \emph{name}, int \emph{oflag},
570581
\\\>mode\_t \emph{mode}, unsigned int \emph{value});
582+
]]])
571583
\end{tabbing}}
572584
\end{minipage}
573585
\begin{itemize}
574586
\item creates or opens a new POSIX semaphore. \emph{mode} is same as for
575587
\funnm{open}(). Use ``\texttt{/somename}'' for the \emph{name}.
576588
\end{itemize}
589+
ifdef([[[NOSPELLCHECK]]], [[[
577590
\texttt{int \funnm{sem\_wait}(sem\_t *\emph{sem});}
591+
]]])
578592
\begin{itemize}
579-
\item decrement \emph{sem}, if currently 0, the call will block
593+
\item decrement \emph{\texttt{sem}}, if currently 0, the call will block
580594
\end{itemize}
595+
ifdef([[[NOSPELLCHECK]]], [[[
581596
\texttt{int \funnm{sem\_post}(sem\_t *\emph{sem});}
597+
]]])
582598
\begin{itemize}
583-
\item increment \emph{sem}. If \emph{sem} consequently becomes greater than
584-
0, another thread blocked in \funnm{sem\_wait}() will be woken up.
599+
\item increment \emph{\texttt{sem}}. If \emph{\texttt{sem}} consequently becomes
600+
greater than 0, another thread blocked in \funnm{sem\_wait}() will be woken up.
585601
\end{itemize}
602+
ifdef([[[NOSPELLCHECK]]], [[[
586603
\texttt{int \funnm{sem\_close}(sem\_t *\emph{sem});}
604+
]]])
587605
\begin{itemize}
588-
\item close \emph{sem}, free its resources allocated to \emsl{this} process.
606+
\item close \emph{\texttt{sem}}, free its resources allocated to \emsl{this}
607+
process.
589608
\end{itemize}
590609
\end{slide}
591610

592611
\begin{itemize}
593-
\item \emph{oflag} can be a combination of only \texttt{O\_CREAT} and
612+
\item \emph{\texttt{oflag}} can be a combination of only \texttt{O\_CREAT} and
594613
\texttt{O\_EXCL}. If the semaphore already exists, an invocation with only
595614
\texttt{O\_CREAT} silently succeeds, \texttt{O\_EXCL} will cause an error.
596615
\item As soon as the semaphore is created, other processes can use it as
@@ -607,7 +626,9 @@
607626

608627
%%%%%
609628

629+
ifdef([[[NOSPELLCHECK]]], [[[
610630
\pdfbookmark[1]{shm\_open, sem\_open, mq\_open}{posixipc}
631+
]]])
611632

612633
\begin{slide}
613634
\sltitle{Other IPC facilities}

unix_dict.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
personal_ws-1.1 en 338
1+
personal_ws-1.1 en 337
22
Illumos
33
Prog
44
Ctrl
@@ -51,7 +51,6 @@ proberen
5151
PDPs
5252
Libes
5353
SunOS
54-
Gdb
5554
gdb
5655
FFS
5756
interruptible

0 commit comments

Comments
 (0)