Unit6 - Subjective Questions

CSE325 • Practice Questions with Detailed Answers

1

Define Inter-Process Communication (IPC) and explain why it is essential in an Operating System.

2

Explain the working of the pipe() system call with its syntax and parameters.

3

Differentiate between Unnamed Pipes and Named FIFOs.

4

Write a C program snippet that demonstrates how a parent process sends a string message to a child process using a pipe.

5

Explain the concept of Shared Memory as an IPC mechanism. Why is it considered the fastest IPC method?

6

Describe the shmget() system call with its arguments and usage.

7

What is the purpose of shmat()? Explain how it maps shared memory into a process's address space.

8

Explain the significance of closing the unused ends of a pipe in a parent-child process communication scenario.

9

How are Named FIFOs created programmatically and via the command line?

10

Discuss the potential synchronization issues in Shared Memory and how they can be resolved.

11

Explain the role of shmdt() and shmctl() in shared memory management.

12

What is the specific behavior of opening a FIFO (Named Pipe) with O_RDONLY or O_WRONLY flags regarding blocking?

13

Write a C program that implements a writer process for Shared Memory. It should write "Operating Systems" into a shared segment.

14

What happens if a process attempts to write to a pipe that is full, or read from a pipe that is empty?

15

Derive the necessity of the ftok() function in System V IPC (Shared Memory, Message Queues).

16

Compare the performance overhead of Pipes versus Shared Memory.

17

How can full-duplex communication be achieved using standard unnamed pipes?

18

Define the term 'Atomic Operation' in the context of writing to a Pipe/FIFO.

19

Explain the significance of the IPC_PRIVATE key in shmget().

20

Describe the file permissions required for a process to perform IPC using Named Pipes.