An operating system (often shortened to OS) is a collection of software responsible for managing hardware resources and booting the system. It provides resources for common services like computation and storage. It acts as an interface between the software and the hardware of the computer. It is so important that, without an operating system, a computer is useless. It is responsible for the following tasks:
Resource Management (allocates CPU, memory, GPU and more to services)
Memory Management (manages memory and optimizes memory usage)
Device Management (manages hardware devices like keyboard and mouse and computer parts like mounting hard drives)