Most of the marks are wrong ! Test and set which is hardware solution guarantess mutual exclusion say for instance this is a code in C :
int lock = 0;
void Critical() {
while (TestAndSet(&lock) == 1);
critical section // only one process can be in this section at a time
lock = 0 // release lock when finished with the critical section
}