Inter-Process communication Flashcards

1
Q

Shared File Concepts

A

Processes communicate by reading from and writing to a common file on disk.
Acts as a persistent storage mechanism.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the key characteristics of files?

A

Simple to implement.
Slower due to disk I/O overhead.
Synchronization issues may arise if multiple processes access the file simultaneously

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the concepts of shared memory?

A

Processes communicate by sharing a block of memory in RAM.
Allows extremely fast communication as no disk I/O is involved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the shared memory characteristics?

A

Requires explicit synchronization (e.g., semaphores, mutexes) to manage access.
Non-persistent: Data is lost when the system shuts down or the shared memory segment is deallocated.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the concepts of sockets?

A

Processes communicate over a network or within the same machine using socket endpoints.
Suitable for distributed systems or processes on different machines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the socket characteristics?

A

Can be connection-oriented (TCP) or connectionless (UDP).
Works with IP addresses and ports.
Uses system calls like socket(), bind(), listen(), accept(), send(), and recv()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly