Linux Programming Mid - II, November - 2014
1.Which are used by shell commands to pass data from one shell pipe to another without Temporary files.
-
Pipe
-
FIFO
-
message Queue
-
shared memory
-
Answer: B
2.__ allow processes to exchange formatted data on the same machine.
-
Pipe
-
FIFO
-
message Queue
-
shared memory
-
Answer: C
3.This provides a method to synchronize the execution of multiple processes.
-
Semaphore
-
FIFO C) message Queue D) shared memory
-
-
-
Answer: A
4.Which API is used to change or query semaphore.
-
Semop
-
Semget
-
Semctl
-
None
-
Answer: A
5.Named pipes are known as __.
-
pipe
-
shared memory
-
FIFO
-
Unknown
-
Answer: C
6.Shared memory is stored in ___ address space.
-
User
-
Kernel
-
Virtual
-
All
-
Answer: B
7.Most UNIX applications are __ threaded programs.
-
Multiple
-
Single
-
Two
-
none
-
Answer: B
8.A process may create one or more threadsthat are permanently bound to LWP are ___.
-
Real threads
-
POSIX threads
-
Bound Threads
-
Unbounded threads
-
Answer: C
9.Processes that are running on different machine can communicate using _______.
-
Socket
-
Shared memory
-
Message Queue
-
FIFO
-
Answer: A
10.A ___ defines the socket address format and the underlying protocol to use.
-
Port no
-
Network
-
Socket
-
Domain
-
Answer: D
11._____________ header file defines structure ipc data that store.
Answer: # include<sys/ipc.h>
12.________________ API is used to manipulate the control data of a message queue.
Answer: Msgctrl()
13.There can be _____________ shared memory regions existing in a given system at any time.
Answer: Multiple
14.Prototype of shmdt API is _________________________.
Answer: Intshmdt( void * addr)
15.Locking files can be done using _____________________.
Answer: Semaphores
16.______________ Variables are used to block the threads.
Answer: Conditional
17.To exit a thread in POSIX _______________ API is used.
Answer: Pthread_exit
18.________________ sockets communicate in p eer to peer manner.
Answer: Connection less
19._____________ specifies the number of pending clients messages that can be queued for a server.
Answer: Listen
20.Larger the priority number the ____________ frequently a thread is schedule to run.
Answer: More