NOTE:THIS IS JUST A REFERENCE TO YOUR SOLUTION... I AM NOT GIVING OUT THE EXACT SOLUTION.. SO THIS MIGHT NOT BE HELPFUL IF YOU ARE EXPECTING THE EXACT SOLUTION..
you could find this answer quite simple by searching index of
understanding linux kernel
by marco cesati (3rd edition) ... you would need to understand what processes are according to linux, how they are differentiated, the pid tables and/or pidhashtables ...
in general sense the os has the list of processes in a descriptor table... This is given very very clearly in the chapter 3 of that book...