P3L3 - Interprocess Communication Flashcards

1
Q

What is IPC?

A

Set of mechanisms that the operating system must support in order to permit multiple processes to interact amongst each other

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

What are the two categories of IPC mechanisms?

A

Message-Based and Memory-Based

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

What is included under message-based IPC?

A

Sockets, pipes, message queues

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

What is included under memory-based IPC

A

Shared memory

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

Who is responsible for creating and maintaining the channel that is used to send messages between processes?

A

The OS!

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

T/F: Since the OS is required to establish the communication and perform each IPC operation, every send and receive call requires a system call and data copy?

A

True!

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

How many user/kernel crossings occur in a request-response interaction between two processes?

A

4!

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

Define Pipes

A

Pipes are characterized by two endpoints. There is no notion of messages, just a stream of bytes pushed into the pipe from one process and read from the pipe by the other

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

What are the two common APIs for message queues?

A

SysV and POSIX API

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

Define sockets?

A

With sockets, processes send and receive messages through the socket interface

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

T/F: The OS is involved in more than just creating a shared memory channel when memory based IPC takes place

A

False! it is merely involved in establishing the shared memory channel between the processes

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

What is the big benefit of the OS’s involvement with shared memory IPC

A

Once the physical memory is mapped into both address spaces, the OS is out of the way. System calls are used only in the SETUP phase

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

What are the two most popular shared memory API’s?

A

SysV and POSIX

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

What is the goal of message-based and memory-based IPC

A

Transfer data from the address space of one process to the address space of another process

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

What is the base unit for the SysV Shared Memory IPC

A

Segments which don’t need to correspond to contiguous physical pages

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

T/F: There is a limit on the total number of segments and the total size of the shared memory/

A

True! In linux currently the limit is 4000 segments

17
Q

What is the base unit for the POSIX Shared Memory API?

A

Instead of segments, it uses files (these are not real files, they just live in the tmpfs filesystem)

18
Q

____ is the attribute set to allow mutexes/condition variables to work across processes in the PThreads library

A

PTHREAD_PROCESS_SHARED