VIVA Questions in OS LAB Internal

1) Return Values of fork()2) What is OS ? Define.3) What is the function call to create a pipe. ANS: read fn.call and write fn.call4) function call to change environmental variables.5) Why do we use execvp();6) Why we use fork()7) How to check status of file8) How many copies of a process are present in address space when fork is executed.9) How to get the id of parent and current process. ANS: getppid() for parent, getpid() for current process.10) How to get the id of child process of current process. ANS: fork() returns it.11) What is a Semaphore?12) What is a system call ?13) Difference between pipe and message queue14) What is pipe? What is message queue15) Difference between system call, Procedure call,Function call.16) What is environment variable?17) In pipe what is the argument of pipe()function.18) 0666--> What does this mean. Why do we only use 6 here. ANS: 666 are the access rights i.e read and write permissions are given to the User ,Group and Owner . 19) How do we create a message queue?20) what is mtype in msgrcv sys.call?21) What are arguements of stat()22) How does processes interact in message queue and pipes.23) What are disadvantages of pipe. Mention atleast 3.24) Difference b/w fork() and exec? why do we go for exec?25) what is execvp()26) How to create message queue?27) What does 0 mean in 066628) 0666 - Why do we use 3 6's in this.?29) What is difference b/w write and read sys call in pipe.30) Difference between fork() & execvp()31) How many process can we use in pipe()