Does the programmer require to include code in his/her program to ensure solution to Critical Section Problem or is it taken care by the Operating system itself??
Moreover, if the programmer is the person who is writing code to solve critical section problem, then as per peterson's solution the entry section of this code uses shared variables themselves. These shared variables should then also be critical sections and we would need to restrict access to them as well. So how is this enforced?