OKG Interview Question

Reader writer problem for parallel programming.