# COMP1521 18s1 Exam Q8 A. The main difference is that system calls perform a context switch from user to privileged mode whereas regular function calls do not. B. i) malloc() is used to create dynamic data objects, while free() is used to destroy dynamic data objects. ii) The lifetime of a dynamic data object starts when it is malloc()'ed and persists until the object is free()'ed. C. "Hello" will be printed 4 times. D. i) fork() returns the process id of the child to the parent process on success and 0 to the child process on success. If fork() fails, it returns -1. ii) If execve() fails, -1 is returned. If execve() succeeds, it does not return because the process has been replaced by different code.