Process Model and IPC interview questions


Total available count: 17
Subject - Operating System
Subsubject - Process Model and IPC

How do you execute one program from within another?

The system calls used for low-level process creation are execlp() and execvp(). The execlp call overlays the existing program with the new one, runs that and exits. The original program gets back control only when an error occurs.

execlp(path,file_name,arguments) //last argument must be NULL.

A variant of execlp called execvp is used when the number of arguments is not known in advance.

execvp(path,argument_array)  //argument array should be terminated by NULL.




Next 5 interview question(s)

1
How would you kill a process?
2
List the system calls used for process management?
3
Predict the output of the following program code?
4
What are the process states in Unix?
5
What are various IDs associated with a process?


Comments