How to use Parallel Semaphores for Dining Philosophers Problem
Assume we have 4 processes p[0], p[1],...,p[3] and 4 mutexes m[0],m[1],...m[3]. Now in order to solve the dining philosophers problem, we only need to make one of the philosopher (one of the processes) to take the folk (one of the mutexes) in reverse direction than the other philosophers. Note that by doing this, we are trying to avoid deadlock.

So in practice, we need to make all processes to follow certain implementation, except one.
All processes (philosophers) should follow this implementation:
while(1)
{
   down(m[(i+1) % 4]);
   down(m[i]);

   'critical section' 

   up(m[i]);
   up(m[(i+1)%4]);
}

except one process should follow this:
while(1)
{
   down(m[i]);
   down(m[(i+1) % 4]);

   'critical section' 

   up(m[i]);
   up(m[(i+1)%4]);
}


Note by down we mean taking the folks and by up we mean releasing the folks, and note how both implementations differ. For example, we made one of the philosopher to take the fort (down) in reverse order than the others.
I hope this could help.