Wrote functionality to copy process tables into the struct pi