IPC clearification

Thread Starter

King2

Joined Jul 17, 2022
163
I've come across the term 'interprocess communication,' which is said to be the way two processes can communicate with each other in context of an operating system. However, I'm struggling to grasp what this means and how it works within an OS. As I understand, more than two tasks can share the same resource, allowing them to communicate. For example, one task can write a variable, and another task can read the same variable.

In this context, both are communicating with each other, so I don't understand how interprocess communication is different from task communication. How tow process communicate with each other?
 

ApacheKid

Joined Jan 12, 2015
1,762
Basically a "process" is an abstraction as is "task" or "thread" and so on. These abstractions do not have a universal definition either, different operating systems and runtimes use them in slightly different ways.

The basic concept of a process though is pretty uniform, it refers to an abstraction where code has access to an address space (often a virtual address space) and only code within the process can access/update the memory within the address space.

With that model, code in one process cannot access memory within some other process (not ordinarily anyway) and so the term IPC is used to refer to mechanisms (exposed by the operating system) that enable this to be done. There are various ways to do this:

1. Files
2. Shared Memory
3. Events/Sempahores/Mutexes
4. Network IO

That's it really, that's my short answer.
 
Top