Showing posts with label Linux Questions Answers. Show all posts
Showing posts with label Linux Questions Answers. Show all posts

Wednesday, November 7, 2018

LP Fill in the Blank QA

QUESTIONS:-
1. In a two state process model, a process is either ____________or___________
2. For a new process in a two state process model _____________ creates a new process control block and brings that process into memory in a not running state.
3. ____________ and _____________ are the other states completes the five state model.
4. The two modes protect the OS data structures from interference by ____________
5. _____________ mode provides full control of the system that may not be needed for user program.
6. ___________ used for interrupt handling, process synchronization and timing.
7. ____________ connects two commands together so that the output from one program becomes the input of the next program.
8. To make a pipe, put a ____________ on the command line between two commands.
9. ____________ is referred, when a program takes its input from another program, it performs some operation on that input and writes the result to the standard output.
10. The ___________ command searches a file of files for lines that have a certain pattern.
11. The ___________ command arranges lines of text alphabetically or numerically.
12. The ____________ pipes can be created used and destroyed within the life a set of processes.
13. __________ is an example for named pipes.
14. _________ pipes can be used with unrelated process not just descendants of the pipe creator.
15. __________ command are used to define semaphore object.
16. ____________ command are used to initialize semaphore.
17. ___________ command are used to wait on a semaphore.
18. ___________ command is used to increment the value of semaphore.
19. ___________ command is used to find out the value of semaphore.
20. ___________ command is used  to destroy the semaphore.
21. ____________is a variable or abstract data type used to control access to a common resource by multiple processes in a concurrent system.
22. There are 3 types of semaphores namely ___________, ___________ and __________
23. In IPC the processes communicates by using _______________
24.  __________ file can be opened by multiple processes for reading and writing.
25.  We can create a FIFO from the shell using the ___________ command.
26. We can remove a FIFO just like a file using the ____________ command.
27. Two or more processes can exchange information via access to a common system _________



ANSWERS:-
1. Executing ( running state )or Idle ( nor running state ).
2. OS.
3. NEW and EXIT.
4. User code.
5. Kernel.
6. Wait queues.
7. Pipe.
8. Vertical bar(|).
9. Filter.
10. Grep command.
11. Sort command.
12.  Unnamed.
13. FIFO.
14. Named.
15. Sem_t sem_name;
16. Sem_init
17. Sem_wait
18. Sem_post
19. Sem_getvalue
20. Sem_destroy
21. Semaphore.
22. Binary, counting and mutex.
23. Shared memory.
24. FIFO.
25. Mknod.
26. Rm(remove command).
27. Message queue.

Tuesday, November 6, 2018

LP Objective QA

11. In message queue , the first parameter is key value , the second parameter is ________
a) key value  b) flag value   c) register value

12. Which of the following function is used to retrieve message from message queue
a) msgget()   b) msgsend()  c) msgrcv()

13. Which one of the following is not included in the message queue
a) queues  b) envelopes   c)stack

14 .Memory for a message as well as metadata is holded by
a) stack  b) envelope  c)queue

15. Which of the following supports the receiving with message handlers
a) GNUNET_CLIENT_CONNECTION      b) GNUNET_SERVER_CLIENT     c) GNUNET_MESH_TUNNEL

16. Which of the following supports the receiving with message handlers
a) unary  b) tertiary  c) binary

17. The special key value _________ allows to create the semaphore
a) IPC_PRIVATE   b) IPC_PUBLIC   c) IPC_PROTECTED

18.________bits are the permissions for the semaphore
a) 5   b) 9   c) 1

19. Which is used for initializing a semaphore to a known value
a) SETVAL   b) GETVAL   c)SEMVAL

20. _______deletes the semophore identifier
a) IPC_REMOVE    b) IPC_RMID    c) IPC_DELETE

21. The command which is used to change its ownership or permissions if you are the semaphore creator is
a) semget()   b) semctl()  c) semop()

22. A POSIX Semaphore structure defines ________semaphore
a) single   b) double   c) triple

23. Which of the following command is used to initialize a semaphore structure
a) sem_getvalue()   b) sem_init()   c)sem_open()


24. In the function semaphore_v() , the semop member of the structure sembuf is set to ___
a) 0  b) 1  c)2

25. Which function provides a mean of passing data between two programs
a) sem()  b) pipe()  c) sock()

Monday, November 5, 2018

Linux Programming

1. Inter process communication includes__________ synchronization
a) thread   b) data   c)process

2. Which of the following were included in IPC on single computer system
1. Shared memory
2. Messages
3. Pipes
a) Only 1   b) Only 2   c) All 3 of them

3. Which of the following communication is allowed by pipe
a) unidirectional   b) bidirectional   c)multidirectional

4. How the pipes synchronize the two processes
a) manually   b) automatically    c) systamatically

5. Which command is used to make a pipe to wait for the data to be available from the user terminal
a) od  b)wait  c)id

6. Unnamed pipes were also known as
a) FIFO  b) LIFO  c)anonymous

7. Named pipes is used for communication between _________processes
a) interrealted   b) related  c)unrelated

Wednesday, April 15, 2015

Linux Questions Answers

1. Kernel minimizes the frequency of disk access by keeping a pool of internal data buffer which helps to increase the response time, this is known as ?

  1. Buffer cache
  2. Spooling
  3. Pooling
  4. Virtual Memory

2. How applications communicates with kernel ?

  1. Not disclosed by linux team
  2. SSL
  3. System Calls
  4. Shell

3. Kernel is known as core of operating system.

  1. True
  2. False


4. What is meaning of ILP32 ?

  1. 32 bit Integrated, Long & Pointer
  2. 32 bit Integer, Long & Pointer
  3. 32 bit Integer, Long & Point
  4. 32 bit Integer, Lost & Pointer

5. Solaris is product of ?

  1. IBP
  2. IBM
  3. Microsoft
  4. Sun Microsystems