An operating system is software that manages computer hardware resources and provides common services for computer programs. It acts as an intermediary between users and the computer hardware. The main goals of an operating system are to control allocation of system resources including memory, CPU time, and disk space, provide a platform for execution of programs, make the computer system convenient to use, and use computer hardware efficiently. An operating system separates applications from the hardware they access and manages both software and hardware resources to produce desired results. It primarily functions as a resource manager.