public void deposit(byte item, int ProducerID, int step){

    empty.P( );
    mutex.P( );
    
    //add an item to the buffer
    ++count;
    buffer[rear] = item;
    rcopy = rear;
    rear = (rear+1)%buffer_size;
    
    if(count == buffer_size)
      System.out.println("Producer entered " + (char)item + " Buffer full");
    else
      System.out.println("Producer "+ProducerID+" deposits message  " + (char)item +"  as step " +step+" into slot " + rcopy);   
     
    
    mutex.V( );
    full.V( );
         
  }