How do the different kinds of computer software interact with each other?


Is there a system hierarchy? How does everything work together?

In: Technology

There is something in your operation system called “scheduler”. Thats a part of software that coordinates wich software is executed when.

So it’s a hierarchy but a rather flat one. The scheduler is in charge of all the other processes.

Then those can have different priority, like, your PC should first react to user inputs and not wait for some slow calculation to finish before the mouse moves. The scheduler organizes that, and programs also tell the scheduler they are currently waiting for something else to happen first (wich means you have to consider stuff like a high priority process lending it’s priority to the process it’s waiting for)

I will do my best to simplify this, but keep in mind that it’s a very in depth topic. I will assume we are talking about all software on a desktop, and not talking about servers or anything.

Computers are managed by their OS, and all the software runs on top of this. Imagine that the OS is a hotel, and each computer has memory, or a room they stay in. When they need something from another room, they can call a bellhop to retrieve it. The bellhop (OS/system calls/APIs, sockets, messages, etc) can get the necessary information from one room, and deliver it to another.

The actual way this works revolves around things like piping information, local sockets, messages between processes, shared files, so on. I hope this helps, even just a little bit. If you want me to try again, I can. If you have an example you want explained, I can do that too.

As u/Luckbot pointed, your computer decide who gets to work when for most things.

So I’ll expand more on how they talk together when they need to. The most basic solution is usually to send a call to the other. Program A will reach a point where it need an information from program B, so it’ll send a message to program B. Program B will receive the message and send and answer to program A.

Now, while it sound simple, there are a few hurdles to go through. Programs rarely multitask and they certainly don’t do it by themselves. So for a program to listen for call, you need to code an ear. That ear need to be able to wait for hearing something, capture the words, translate them into something usable then know what to do with that information. Which can be hours of frustration for coder. Any software that does not have an ear, or isn’t using it cannot interact with others.

the basic hierarchy is: kernel space and user space

kernel takes care of distributing all resources – memory, cpu, devices (drives, gpu etc). if you need anything that is shared, you ask kernel via well documented API. that ensures isolation of competing processes.

the rest of programs live in user space where they do not have sufficient privileges to harm other processes. processes in user space can also communicate with each other via sockets, files, shared memory etc