implement process_wait, process_exit, sys_exit. modify thread.c to use filesys_lock