code example for dining philosopher