Process Model and IPC Interview questions


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

Predict the output of the following program code?

main()
{
    fork( fork( fork( printf("Slightbook World!"))));
}

Answer:-

"Slightbook World" will be printed 8 times.

Explanation:-

2^n times where n is the number of calls to fork().




Next 5 interview question(s)

1
List the system calls used for process management?
2
How can you get/set an environment variable from a program?
3
How can a parent and child process communicate?
4
What is a zombie?
5
What are the process states in Unix?

Comments