The operating system controls the overall resources and operation of a computer, by controlling access to the central processing unit (CPU), computer memory files, storage devices, and input and output devices. It also manages tasks such as scheduling resource usage to prevent conflicts and interfering between processes, managing the structure and content of files on non-primary storage media, and determining which programs get to use hardware components such as disc drives or WiFi adapters. It also offers a method for users who are interactive to connect to the system via either a Graphical User Interface (GUI) or a Command-Line Interface (CLI).

Process Management

Operating systems handle the starting, stopping, and re-starting of programs. It decides which application is to execute first, how long it can use the CPU, and when it needs to stop. It can also split up the program into multiple threads, allowing it to run on a variety of processors simultaneously. Each of these actions are controlled by a program in the operating system called the process block.

File management

Operating systems maintain structure and contents of files in non-primary data storage. They can transfer data between storage and memory as needed. They can also convert virtual memory pages onto physical memory pages for faster access. This is referred to as demand paging.

It also interacts with the hardware of the computer through drivers and other interfacing software. For example when an application needs to utilize a particular piece of hardware such as an adapter for Wi-Fi the operating system will provide the driver, and allow the process to access it. This is done without the developer having to write a new piece of code for each Wi-Fi adaptor, disk drive, or another kind of hardware.