Professional Documents
Culture Documents
3. The following program fragments prints the string “Hello” number of times equal to
if ( fork() == 0)
fork();
printf(“Hello\n);
a. 1
b. 2
c. 3
d. 4
Ans: (c) 3
4. The following program fragment prints the string “Hello” number of times equal to
fork();
fork();
printf(“Hello\n);
a. 1
b. 2
c. 4
d. 8
Ans: (c) 4
Ans: (d) Compared to a process, switching between threads of same process takes less time as
next-to-run thread shares same address space
7. Pipe provides a way of communication among processes. Which one of the following
statements does not hold true for pipe?
a. In named pipes, communication can be bidirectional
b. No parent-child relationships are required in ordinary pipes
c. Ordinary pipes provide a simple communication mechanism between a pair of
processes. Once a named pipe is established, several processes can use it for
communication.
d. None of the above
Named pipes may have a bidirectional communication mechanism. Ordinary pipes involves a
relatively simpler method of communication between pair of processes. But, parent child
relationship might be required in ordinary pipes.
Ans: (C) Concurrent system can allow more than one task to run whereas parallel system can perform
more than one task simultaneously
Ans: (b) Only one process can use the named pipe for communication
Multiple processes can use the named pipe for communication. Named pipes can be used for
bidirectional processes and it exists for both windows and UNIX. Parent child communication is not
necessary between the communication processes. Hence, only option b is incorrect.
Ans: (c) Above the kernel and are managed without kernel support
Two processes residing on two different systems can communicate among themselves by means of
remote procedure calls.