The atomic fetch-and-set x, y instruction unconditionally sets the memory lcoation x to 1 and fetches the old value of x in y without allowing any intervening access to the memory location and x. Consider the follwoing implementation of P and V functions on a binary semaphore S.
void P(binary_semaphore *S) {
unsigned y;
unsinged *x=&(S→ value);
do {
fetch-and-set x,y;
} while (y);
}
void V (binary_semphore *){
S→ value =0;
}
Which one of the following is true?