Inter-Process Communication Flashcards

1
Q
  • Is multithreading the only option to work concurrently?

- What about shared data? Is it as easy as with multithreading?

A
  • No, there is also multiprogramming. (Multiple processes)

- Every process has its own address space. Therefore we need a method to share data. (IPC) (e.g. shared memory)

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

What is the main idea behind event-based concurrency?

A

Have a (indefinite) loop that is waiting for an event (e.g. an user interaction).

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

How get the events receivied in event-based concurrency?

A

I/O Multiplexing:

  1. The process tells the OS on which file descriptors hes interested
  2. The process can query the OS on which file descriptors have changed
  3. The OS returns the changed fds
  4. The I/O work can be done
How well did you know this?
1
Not at all
2
3
4
5
Perfectly