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.

  1. execlp(path,file_name,arguments) //last argument must be NULL
  2. A variant of execlp called execvp is used when the number of arguments is not known in advance
  3. execvp(path,argument_array)  //argument array should be terminated by NULL

Next 5 interview question(s)

What is an advantage of executing a process in background?
How would you kill a process?
What is ps command for?
What is a Daemon?
What happens when you execute a command?