Since this is a web site that discusses operating systems, I felt there should be an article explaining how an OS works. I am no expert in the field but only passionate about the subject, so I decided to do some research for the necessary information and present it in a general, easily comprehensible manner. As a result, I came up with an analogy. I hope it is an easily understandable one.
In my analogy, the computer is a factory. The computer consists of the hardware (CPU, RAM, storage and all other devices) and the OS (processes and data). What do these correspond to in the factory? The CPU is a control booth with a phone and the RAM is a special waiting place for the workers. The storage device is a dormitory and the other devices are the rest of the machinery used in the factory.
The dormitory is occupied by the men and the women. Seeing as men like to be active they are the processes, the ones doing different tasks, while the women hold the instructions. They are the data stored in files. So, the women give instructions and the men do what they are told.
Besides these we have two more components.
The user (the person operating the computer) is the factory manager. Software applications (programs such as web browser, media players and others) are the external consultants.
Since the factory has several types of devices, the men also have different tasks to fulfil. There are separate groups that deal with the machinery, the control booth, the waiting place, the dormitory, the factory manager and the external consultants.
Now let's take a look at a day's work.
We start with the factory not working. The power is off and everything is silent. The moment the manager gives the wake up call, the power comes on, the men leave the dormitory and head for the waiting place after being instructed by the women. The groups that manage the dormitory, the waiting place, the access to the phone booth and the one dealing with the machinery are first to take their place. Here, each of the men occupies a space clearly separated from the space of the other. They cannot interact in any way when they are in the waiting place. The waiting place managers take care of that.
In order for any of the men to do something they have to go into the control booth. Because the booth can take only one man at a time, a queue is formed which is handled by the control booth managers. The funny thing is that they need to go into the booth themselves to direct the others. One manager goes into the booth and calls the anotherone to come in next. That one goes in and does his job. This means either pushing some buttons to control the devices assigned to him, or calling another process and giving him some information; or even both.
This procedure applies to every task executed by the factory. If the factory manager wants something, he talks to the managers in charge of him. They, in their turn, talk to the booth managers and ask for some booth time to accomplish their task.
Where are the women in all this? Since they don't leave the dormitory, they interact only with the dormitory managers. These take from and give information to women. Furthermore, they can even create new women to store information received from other managers. And when the working program is over, all the information is stored by the women and the men get back to the dormitory.
The end.