Markov chain models for all-optical shared memory packet switches