1. Explain a zombie?

A system that has been taken over using Remote Control
Software. Zombies are often used to send spam or to attack
remote servers with an overwhelming amount of traffic (a
Distributed Denial of Service Attack).

2. What is Daemon?

The processes like vhand, bdflush, sched are housed in
kernel file or /unix system which are known as daemons.
These files run in the background without users
request.These are created when the system boots up and
remains active till it shut down or hang. These are not
linked to any user or any terminal .We can't kill a daemon.

3. What Happens when we execute a Unix command?

When command is given then unix os will fork the shell i.e
will creat a new process and will execute the command using
exec command...something like suppose you gave command "ls"
in the shell then...
It will give you the result and after this the child process
will die.

4. What is an advantage of executing a process in background?

There r two main advantage :
1.you can use console to execute your command.
2.More importantly if one is connected through remote
console and as there is no controlling terminal attached to
background process even if your terminal get disconnected
the process continues (with help of nohup in shell script
or by using setsid in C)

5. How do you execute one program from within another?

by calling system call fork() to create child process which
handles the other.

6. What is IPC? What are the various schemes available?

Inter Process Communication. IPC is used to pass information
between two or more processes.

Schemes are pipes, shared memory & semaphore.

Below are the different IPC methods

1. Semaphores
2. FIFO's (Also called Named Pipes)
3. Message Queues
4. Shared Memory

7. Please Describe the initial process sequence while the system boots up?

-Hardware Boot
-Read boot block (block 0) and load to memory
-Transfer control to kernel
-Kernel initialization
-Mount the root file system on / and create
environment for process 0
-Process 0 invokes process 1(init process)
-init process invokes process getty
-gettyinvokes login

8. What are the system calls used for process management:

The system calls for process management are
Fork() > create child process
Vfork() > create child process (copy-on-write only)
exec() > exec to do a different task
wait() > wait for a process to complete execution
kill() > to send a signal to a process
signal() > to handle a signal
sigaction() > handle signal
exit() > exit from a process execution
_exit() > same as exit() but with out clean up

and many more ................

9. How to write the program on full-duplex communication on bidirectional(e.g using two pipes)?

int main()
int p1[2],p2[2],i;
char buf[5];
printf("n this is child(the input text is text)n");
printf("n this is parent(the output text is text)n");
buf[i]=to upper(buf[i]);

10. What is semaphone?

a semaphor is nothing but a term used in unix for a
variable which acts as a counter.for instance there may be
times when two processes try to access the same file
simultaneously.in this event we must control the access of
the when the other process is accessing
this is done by assigning value to a semaphore.
the value of the semaphore is initialized by the 1st
process when the file is in access by it.when the 2nd
process try to access the file it checks the value of the
semaphore and if it finds the value as initialized it does
not access the file.

Download Interview PDF