The computer is one of the most important inventions of the 20th century. Everything seems to run on computers now. Even lightbulbs are smart. But the hardware we think of as the “computer” is nothing without an interface between computer users and the hardware, which is where the operating system comes in.
Ahead, we’ll explain what operating systems do and why they’re important. We’ll also learn about the different types of operating systems. (There are more than just Windows, Mac OSX, Linux, Android, and iOS.) Let’s get started.
Learn something new for free
Why is an operating system important?
An operating system makes software development much easier. Without one, a Software Developer would have to know a lot of details about the hardware that the software will run on and — and possibly have to create a different version of the software for each device.
Each application would have to include a custom user interface for creating windows and managing data. Instead of interacting with the operating system, the application would speak directly to the hardware with machine code (low-level code that handles disk storage, network calls, and other hardware interactions).
You’d need a different code for each Wi-Fi adaptor or disk drive. And if hardware got replaced on the computer, you’d likely have to update every application to account for the change.
Who wants to do all that? Operating systems make it so we don’t have to.
What does an operating system do?
Most operating systems are quite complex and handle a lot of jobs. Here are the most common things an operating system does:
An operating system decides which processes use the CPU and how long they get to use them. This is called process scheduling. It uses a traffic controller to keep track of processes, allocates CPU cores to processes, and de-allocates the CPU when the processes are finished.
An operating system also manages the memory of a computer or its RAM. It keeps track of the memory to determine how much is being used, allocates memory to a process if there is still RAM available, and frees up the RAM when the process is complete.
When an operating system is installed, it also comes with drivers to interact with the computer’s hardware. The operating system controls access to the hardware using these drivers with an I/O controller. When a process wants to use hardware like a Wi-Fi adaptor, the operating system allows it to access the device if it is available and handles the input and output between the process and the hardware.
An operating system also comes with a file system that handles all the files and directories on the computer’s hard drives. It keeps track of location, information about creation and modification, and any other metadata related to the file. It defines the file directory structure of the operating system and maps this virtual structure to the physical location of the data on the computer. It also handles and controls access to the files.
An operating system handles the accounts of users who access files and applications on the computer. It makes sure that users can only access files they have created or have been allowed access to from another user. Operating systems also handle the encryption of files for an extra layer of security.
Parts of an operating system
There are two key parts of operating systems — the kernel and the shell.
The kernel is the program that is at the core of an operating system. It launches when the computer starts up and is always resident in the memory. The kernel controls all the hardware of the computer and handles interactions between the hardware and any installed software. The kernel handles most of the tasks of the operating system, including:
- Memory management
- Process management
- Device management
- Input-output management
- System calls
The shell is the outer layer of the operating system. It handles the interactions between the user and the kernel.
The shell uses programming languages to control processes, files, and programs in the operating system. A user can interact with the shell using the command line. Applications that run on the computer interact with the operating system through the shell.
Types of operating systems
Although all operating systems have similar functions, quite a few different types are used for various kinds of hardware and use cases.
General-purpose operating systems
General-purpose operating systems are one of the most common types of operating systems. If you have a laptop or desktop computer, you are familiar with this type of system.
These are intended to run a large selection of applications on various hardware configurations and to be installed on all types of laptop and desktop computers. Some common general-purpose operating systems include:
- Windows: Windows was first released in 1985 by Microsoft. It is now one of the most common operating systems for personal or business use and comes installed on many retail computers.
- Mac OSX: Mac OSX is an operating system designed and used for Apple laptops and computers. It can’t be installed on a generic computer without a lot of extra work.
- Unix: Unix was one of the first operating systems created in the 1970s. It is designed to be used by multiple users.
- Linux: Linux is a free and open-source operating system based on Unix. It is efficient and lightweight and is the most common operating system used for web services.
Mobile operating systems
Mobile operating systems are similar to general-purpose operating systems in that they are designed to run on a variety of hardware. Although there have been many mobile operating systems, the two most common are Android, which is designed for phones built by various manufacturers, and iOS, which is specifically for models of the Apple iPhone.
Network operating systems
A network operating system is a special kind of OS created to assist in the communication between devices on a local area network or LAN. It provides the functionality needed to understand network protocols and network packets. This type of operating system is used in routers, switches, firewalls, and other networking devices.
Embedded operating systems
Embedded operating systems are used in specialized computers. Devices like ATMs, retail point-of-sale devices, and internet of things devices only do a limited amount of things but must do them accurately. An OS for a machine like these is stripped down to just the basics but is also designed to be resilient and handle errors gracefully so they can remain running in all conditions.
Real-time operating systems
Real-time operating systems are designed for computing devices that interact with the real world using sensors. A common use for them is in industrial control systems, where they react to signals from sensors in an industrial plant and send signals to valves, actuators, and other devices that control a manufacturing process.
Developers deal with operating systems day in and day out. Learning to code means learning how to work with the operating system instead of fighting it.