I am so sorry friends,
I have been out of station since I had posted this question.
actually, this is related to Operating System and moreover, this is not the homework indeed, the question asked in written test of an IT company-- CSC
actually this company is about to visit at our college and I am gonna appearing for that.