\input{configpres}

\section{Inter-Process Communication (IPC)}

\title{Inter-Process Communication (IPC)}
\maketitle

\begin{frame}
\frametitle{half-duplex unix pipes}
\begin{itemize}
\item file descriptor based
\item read()/write()
\item byte stream
\item private
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{named pipes}
\begin{itemize}
\item file descriptor based
\item read()/write()
\item byte stream
\item named in filesystem
\item protected by filesystem permissions
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{unix domain sockets}
\begin{itemize}
\item file descriptor based
\item read()/write() or recvmsg()/sendmsg()
\item byte stream or packets
\item named in filesystem
\item protected by filesystem permissions
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{netlink}
\begin{itemize}
\item file descriptor based
\item recvmsg()/sendmsg()
\item packets
\item protected by CAP\_NET\_ADMIN capability
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{message queues}
\begin{itemize}
\item uses special message queue descriptors
\item mq\_receive()/mq\_send() or msgrcv()/msgsnd()
\item packets
\item named in filesystem
\item protected by user/group/other permissions
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{shared memory}
\begin{itemize}
\item mmap()
\item shared raw data (no copies)
\item named in filesystem
\item protected by filesystem permissions
\item requires "manual" queue implementation (if queues needed)
\item efficient notification/synchronization with condvar/mutex
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{d-bus}
\begin{itemize}
\item uses special handles (object/bus model)
\item remote procedure calls (rpc)
\begin{itemize}
\item request/response (calls)
\item publish/subscribe (events)
\end{itemize}
\item rpc-function data parameters
\item protected by interface configurations
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{semaphores}
\begin{itemize}
\item uses special semaphore identifiers
\item semop()
\item no data
\item named in filesystem
\item protected by filesystem permissions
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{signals}
\begin{itemize}
\item no data
\item protected by user permissions
\item runs in userspace interrupt context
\item complicated to implement correctly
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{inotify}
\begin{itemize}
\item file descriptor based
\item no data
\item named in filesystem
\item protected by filesystem permissions
\item like signals but no interrupt context
\item events missed if not listening
\end{itemize}
\end{frame}

\input{tailpres}
