Question: This is coded on a linux operating system, use system calls whenever possible. I know there is a limit to the questions you can do


This is coded on a linux operating system, use system calls whenever possible. I know there is a limit to the questions you can do so only do question 2
More on Linux Process Management ective To change the executable image of a process and get it to do a totally different job using exec () To investigate what parts of the parent process scope gets inherited and stays with a child process after fork) and/or exec ) system calls Introduce pipes as a communication tool between related processes Description A process is a program in execution. It is the basic unit for running application and performing work in a computer system. An OS creates the data structures it needs to track and manage a process throughout its life cycle (from inception all the way through its termination). To do so, the OS should provide system calls to create a process, change its context so it does something different than its parent, convey status information to its parent and more Linux allows a process to create a new process that is a replica of itself suing the fork() system call The parent process, using the wait )system call, can wait for the newly created child until it finishes its work. The child process can perform a new task by changing its context to a new executable image using a version of exec () A pipe is a Linux kernel object that has a limited buffer and can be used to establish unidirectional communication between processes. It blocks a writer process if the buffer is full and blocks a reader process if the buffer is empty -int pipe(int pipefdI2]) http://man7.org/linux/man-pages/man2/pipe. 2.html -int execl (const char *path, const char *ar -int execlp (const char *file, const char *arg, ..); -int execle (const char *path, const char *arg, .., char const envp] -int execv (const char *path, char const argv[]) -int execvp (const char *file, char const argv[) - int execvpe (const char *file, char *const argv[), char *const envp[) fork(void); pid-t - pid t vfork(void); http://man7.org/linux/man-pages/man2/vfork.2.html - pid t getpid (void) http://man7.ora/linux/man-pages/man2/getpid.2.html - pidt getppid (void) - pid t wait (int *wstatus) http://man7.org/linux/man-pages/man2/waitpid.2.html - pid t waitpid (pid_t pid, int *wstatus, int options); http:/a n 7.org/linux/man-pages/ma n 2 / fork.2.html Submission Submit the answers to the questions below in pdf format One compressed file that contains all C and pdf files To get used to system calls please pay attention to the following o o o Check the success of every system call you use Make sure a parent process waits for all its children When using pipes, make sure to close the side the process will not use
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
