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)
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).
3
Q
How get the events receivied in event-based concurrency?
A
I/O Multiplexing:
- The process tells the OS on which file descriptors hes interested
- The process can query the OS on which file descriptors have changed
- The OS returns the changed fds
- The I/O work can be done