111
n-process solution: bakery algorithm
nBefore entering their CS, each Pi receives a number. Holder of smallest number enter CS (like in bakeries, ice-cream stores...)
nWhen Pi and Pj receives same number:
uif i<j then Pi is served first, else Pj is served first
nPi resets its number to 0 in the exit section
nNotation:
u(a,b) < (c,d) if a < c or if a = c and b < d
umax(a0,...ak) is a number b such that
Fb >= ai for i=0,..k