P3L3 Inter Process Communication - SysV Flashcards

1
Q

The operating system treats shared memory as a ______ _______ using ______ wide policies.

That means that there is a limit on the total ________ of ________ and the total _____ of the shared memory.

Currently in Linux the limit is ______ segments, although in the past it was as few as __.

A

The operating system treats shared memory as a shared resource using system wide policies.

That means that there is a limit on the total number of segments and the total size of the shared memory.

Currently in Linux the limit is 4000 segments, although in the past it was as few as 6.

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

True or False?

Re SysV: The operating systems supports segments of shared memory, which correspond to contiguous physical pages.

A

False

The operating systems supports segments of shared memory, 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
3
Q

True or False?

A segment is a persistent entity

A

True

Once a segment is created, it’s essentially a persistent entity until there is an explicit request for it to be destroyed.

Note that this is very different from memory that is local to a process, which is reclaimed when the process exits.

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

When a process requests that a shared memory segment is created, the operating system allocates ___________________________ and then it assigns to it a unique ______.

Using the _____, the shared memory segment can be ________ by a process.

Multiple _________ can attach to the same shared memory segment. Reads and writes to these segments will be _______ across all attached _________.

A

When a process requests that a shared memory segment is created, the operating system allocates the required amount of physical memory and then it assigns to it a unique key.

Using the key, the shared memory segment can be attached by a process.

Multiple processes can attach to the same shared memory segment. Reads and writes to these segments will be visible across all attached processes.

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

What are the 4 actions on a shared memory segment?

A
  1. Create - allocate physical memory, key
  2. Attach - mapping between the virtual addresses of that process and the physical addresses that back the segment
  3. Detach - invalidating the virtual address mappings for the virtual address region that corresponded to that segment within that process.
  4. Delete - explicit request to delete
How well did you know this?
1
Not at all
2
3
4
5
Perfectly