ELI5: What is a OS service? How exactly does it work?

Ok, here’s the best analogy I can come up with:

The operating system is like your manager at work. Your manager knows about all the things that need to get done, what is trying to get these things done, where things are, and what resources are at their disposal. You and your colleagues get specific jobs done for clients and your manager helps you get them done.

Example:

Everyone arrives at the office in the morning. You get to work and receive something in the mail from a client that needs to get processed. You go to your manager and ask, “can I temporarily store this mail in cabinet A?” Your manager says, “please wait, cabinet A is full”, so you wait. Some other employee takes a file out of cabinet A freeing up some space and your manager says, “ok, now you can temporarily store that file in cabinet A”, so you do. At some point later you need to get that file, process it, and store the new file in filing cabinet B until tomorrow. You go to your manager and ask, “can I have that file that I stored in cabinet A?” Your manager says sure, and hands you the file. You process it and then ask your manager to store it until tomorrow in cabinet B. You manager says, “sure, I’ll store this file for you in cabinet B. The next time you need it just ask me for it.” Sweet! Your job is done and you go home and the office closes. When it closes filing cabinet A is cleaned out for good, but cabinet B will have your real important stuff in it when you get to work the next day.

  • Arriving at the office is the computer turning on
  • The client is the dude at the keyboard using the computer
  • The mail is input (a file input into the computer by the dude, for example)
  • Filing cabinet A is RAM (short term storage)
  • Filing cabinet B is the hard drive (long term storage)
  • You are a program that uses A to temporarily store things while you process them and B to save work
  • Your fellow employee is another program that does similar things as you
  • Your manager is the operating system that orchestrates this beautiful operation
  • ... until the end of the day when the computer is shit down
/r/explainlikeimfive Thread