\documentclass[]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
  \usepackage[T1]{fontenc}
  \usepackage[utf8]{inputenc}
\else % if luatex or xelatex
  \ifxetex
    \usepackage{mathspec}
  \else
    \usepackage{fontspec}
  \fi
  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\fi
% use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
% use microtype if available
\IfFileExists{microtype.sty}{%
\usepackage{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}
\usepackage[unicode=true]{hyperref}
\hypersetup{
            pdftitle={Engr 664-01: Theory of Concurrent Programming Assignment \#3, Fall 2016},
            pdfauthor={H. Conrad Cunningham},
            pdfborder={0 0 0},
            breaklinks=true}
\urlstyle{same}  % don't use monospace font for urls
\IfFileExists{parskip.sty}{%
\usepackage{parskip}
}{% else
\setlength{\parindent}{0pt}
\setlength{\parskip}{6pt plus 2pt minus 1pt}
}
\setlength{\emergencystretch}{3em}  % prevent overfull lines
\providecommand{\tightlist}{%
  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
\setcounter{secnumdepth}{0}
% Redefines (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\usepackage{caption}
\DeclareCaptionLabelFormat{nolabel}{}
\captionsetup{labelformat=nolabel}

\title{Engr 664-01: Theory of Concurrent Programming\\
Assignment \#3, Fall 2016}
\author{H. Conrad Cunningham}
\date{21 September 2016}

\begin{document}
\maketitle

\section{\texorpdfstring{Assignment \#3\\
Due Monday, 3 October, 11:59
p.m.}{Assignment \#3 Due Monday, 3 October, 11:59 p.m.}}\label{assignment-3-due-monday-3-october-1159-p.m.}

\subsection{Instructions}\label{instructions}

Do \textbf{one} of the following:

\begin{itemize}
\item
  Do exercises 4.3 and 4.4 on page 78 of the textbook. This calls for
  you to develop an FSP model for a seat reservation system and
  implement it with a Java program using threads.
\item
  Do the Late Evening Study Session problem below. (This is essentially
  the same problem as exercise 5.4 on page 105 of the textbook.) This
  program calls for you to develop an FSP model and implement it as a
  Java program using threads and a monitor.
\item
  Submit your source code and documentation using BlackBoard.
\end{itemize}

\subsection{Problem: Late Evening Study
Session}\label{problem-late-evening-study-session}

A group of computer science graduate students is studying late one
evening at a professor's house. The students are drinking iced tea from
a large pitcher that holds several glasses of tea. The professor, who
had stayed up late the night before preparing another one of his
brilliant lectures, is napping in a chair.

When a student wants to drink, he or she fills a glass from the pitcher,
unless it is empty. If the pitcher is empty, the student waits until the
professor wakes up and refills the pitcher. The behaviors of the
students and the professor are specified by the following FSP processes:

\begin{verbatim}
    STUDENT   = (fillglass -> study -> STUDENT).
    PROFESSOR = (fillpitcher -> nap -> PROFESSOR).
    
    
\end{verbatim}

Model the behavior of the \texttt{PITCHER} as an FSP process and then
implement it as a Java monitor.

\end{document}
