Lecture 8 Flashcards

1
Q

Reasons for Process Cooperation

A

1)Information Sharing
2) Computation Speedup(Processes are broken down and assigned to different cores resulting in computation speedup)
3)Modularity

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

What are the two models of interprocess communication?

A

1) Message Passing
2)Shared Memory

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

When is message passing useful?

A
  1. Message passing is helpful in exchanging smaller amounts of data.
  2. It’s easier to implement in a distributed system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which method of communication is faster and why?

A

Shared memory is faster because once established all accesses are treated as routine memory accesses and no assistance from the kernel is required. On the other hand, message passing is implemented using system calls which involve kernel intervention.

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

What is shared-memory in IPC?

A

A mechanism that allows processes to communicate and synchronize their actions by sharing the same address space.
A shared-memory region resides in the address space of the process creating the shared-memory segment.

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

What are two types of messages?

A
  1. Variable-sized messages
  2. Fixed-sized messages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define variable-sized messages.

A

The size of the messages can be varied. They require a more complex system-level implementation, but the programming task becomes simpler.

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

Define fixed-sized messages.

A

The size of the messages is fixed. The system-level implementation is straightforward but the programming task becomes more difficult.

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

How a communication link is established in message-passing systems?

A
  1. Direct or indirect communication
  2. Synchronous or asynchronous communication
  3. Automatic or explicit buffering
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is direct communication?

A

Each process that wants to communicate must explicitly name the recipient or sender of the communication in this way:
1) an automatic link is established
2) Link is only between two processes.
3) There is only one link between the two processes

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

What is indirect communication?

A

The processes that want to communicate send messages to and receive from mailboxes.
1) A link is established between a pair of processes only if both members of the pair have a shared mailbox.
2) A link may be associated with more than two processes.
3)A number of different links may exist between a pair of processes, with each link corresponding to one mailbox.

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