Linux Interview Questions and Answers – IPC – 2 - Linux Questions & Answers

DigitalOcean Referral Badge DigitalOcean Referral Badge

1.

Command used to check shared memory is

   A.) ipcs
   B.) ipcs -s
   C.) ipcs -m
   D.) ipcs -q

Answer: Option 'C'

ipcs -m

DigitalOcean Referral Badge

2.

What is the persistancy level of Shared memory segments?

   A.) signal
   B.) process
   C.) file system
   D.) kernel

Answer: Option 'D'

kernel

DigitalOcean Referral Badge

3.

Which is Fastest IPC?

   A.) Message Queue
   B.) shared memory
   C.) Socket
   D.) All of these

Answer: Option 'B'

shared memory

DigitalOcean Referral Badge

4.

The structure which keeps the information about shared memory in the kernel is

   A.) struct ipc_perm
   B.) struct semid_ds
   C.) struct shmid_ds
   D.) struct msgid_ds

Answer: Option 'C'

struct shmid_ds

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

5.

Semaphore P( ) operation usually does the following:

   A.) descrements the semaphore count and the process sleeps if needed
   B.) increments the semaphore count
   C.) wakes up a sleeping process
   D.) none of these

Answer: Option 'A'

descrements the semaphore count and the process sleeps if needed

DigitalOcean Referral Badge

6.

One process requires M resource to complete a job. What should be the minimum number of resources available for N processes so that at least one process can continue to execute without blocking/waiting?

   A.) M * N
   B.) M * N – 1
   C.) M * N + 1
   D.) M

Answer: Option 'D'

M

DigitalOcean Referral Badge

7.

Which call to use to set the resource count of semaphore?

   A.) semget( )
   B.) semctl( )
   C.) sem_setcount( )
   D.) sem_set_count( )

Answer: Option 'D'

sem_set_count( )

DigitalOcean Referral Badge

8.

Race condition can be avoided by using

   A.) semaphore
   B.) mutex
   C.) socket
   D.) both semaphore & mutex

Answer: Option 'D'

both semaphore & mutex

DigitalOcean Referral Badge

9.

A server which is handling many clients at a time is called as

   A.) single server
   B.) multiserver
   C.) concurrent server
   D.) iterative server

Answer: Option 'C'

concurrent server

DigitalOcean Referral Badge
    DigitalOcean Referral Badge DigitalOcean Referral Badge

10.

A server which is handling one client at a time is called as

   A.) single server
   B.) multiserver
   C.) concurrent server
   D.) iterative server

Answer: Option 'D'

iterative server

DigitalOcean Referral Badge

Linux Interview Questions and Answers – IPC – 2 Download Pdf

Recent Posts