Homework 9 Due Friday 11/30

Add a semaphore to the protocol stack handed out in class and posted here with corrections to the layer names!

Two system calls to be added to the session layer

    boolean wait(var);

            if shared memory variable var > 0 then decrement and return true (atomic read-modify-write)

            if (var <= 0) then block until released from the waiting queue, or until timeout (be careful!)

   void signal(var)

           increment var if signaler is legitimate. If var > 0 release a process form the queue

           don't worry about returning an error otherwise.