\section{Process States}

\begin{frame}
   {Process States}


   \begin{itemize}
      \item Processes are in one of several possible states
      \begin{itemize}
         \item \textbf{Running}: Executing on a CPU,
         or ready to execute when O/S permits
         \item \textbf{Waiting}: Waiting for
         information from disk or some external
         source; also called \textbf{Sleeping}
         \item \textbf{Stopped}: May be stopped by
         debugger or Ctrl-Z
         \item \textbf{Zombie}: Gone, but not
         properly removed by parent process
      \end{itemize}
   \end{itemize}

\end{frame}

\cprotect\note{

   A process in the \textbf{Running} state is either currently
   receiving attention from the CPU (in other words, executing)
   or waiting in a queue ready to run.  A queued process will
   be selected to run when its priority has elevated it to
   first in the queue and the operating system has an idle CPU.

   A process in the \textbf{Waiting} (or
   \textbf{Sleeping}) state is waiting on a request that
   it has made (usually I/O) and cannot proceed further
   until the request is completed.  When the request is
   completed, an event interrupts the O/S to allow a CPU
   to be reassigned to the waiting process and it will
   continue processing.

   A process may be \textbf{Stopped}, meaning execution of
   instructions has been suspended.  This state is commonly
   experienced when a programmer wants to examine the executing
   programs memory, CPU registers, flags or other attributes.
   Once this is done the process may be resumed.

   A \textbf{Zombie} state is entered when a process
   terminates.  Zombie processes are important, because each
   Zombie continues to take up space in the O/S's process
   table.  The process table has an entry for each active
   process in the system.  A Zombie process has all of its
   resources released except its process table entry.

   The scheduler manages all of the processes. Process state is
   reported by process listings.  }



