Formal definition of an OS : a set of software that controls the computer’s hardware resources and provides services for computer programs.
The informal definition is that there is a higher power managing many things in your computer. The chef in your kitchen isn’t just working on one program at a time, it’s working on many. The patrons are asking for recipes to be made at a really fast pace and someone needs to manage what the chef can make at any given time. There are other things the Operating System does as well:
Your computer needs to be able to talk to the keyboard, external monitor, mouse, bluetooth devices, printers, web cameras, etc. This communication is managed by the Operating System. We can think about it as a Restaurant Manager that relays information between the services providers and the restaurant staff. Perhaps there is a system for vegetable delivery from the farm, the Manager will make sure that the lines of communication between the farm and the staff are open. The Operating System doesn’t do the actual moving of data though, there are buses that do that.
You definitely have multiple programs open in your computer right now. Those programs are being managed by your CPU. If the CPU can only work on one program at a time, how come they all work at the same time without problems. This is mainly do to multitasking, which we will talk about next. Another important component is that memory is being managed efficiently and effectively. All programs work because the OS is managing the available space in the RAM well. Those programs that have priority will have better access to faster memory all the way through the cache system.
As each application or dish, is being created/handled by the chef we notice that some programs are more resource-intensive than others. How does the chef know when to prepare what? How can he work on two dishes at the same time? The Operating System manages this. Resources are moved around to where they are most needed and the chef’s attention is directed to certain programs at certain times. Some applications might need more of the CPU’s time and others might need lots of RAM. The OS takes care of all of this.
The chef doesn’t actually work on two dishes at the same time. He switches his attention quickly between the active programs. Going back and forth so fast that it looks like he’s making the dishes at the same time.
Currently, the world is a series of interconnected restaurants. Tons of restaurants talking to each other, send bits of ingredients and cookbooks to one another to make delicious dishes. The OS manages these connections and makes sure that the networks can read and write the correct data to other devices.
The OS also provides a way to store data efficiently. This means that it will store data in a way in which it will be retrieved as fast as possible. This might mean putting all of the tomatoes next to each other so that it’s easy to find one when we need it. It might also mean that sometimes we’ll have all the ingredients to a recipe close to each other, instead of dispersed all over.
The OS also keeps track of where everything is so that we don’t overwrite data accidentally.
The main form of protection that the OS provides is user authentication. This is usually done with a password that allows a user to get access to their files in a computer. New forms of authentication like fingerprints and facial scanners have started to appear in computing systems as well.