DEV Community

Cover image for Operating systems: Which one to use as a developer and why?
Samira Awad
Samira Awad

Posted on

Operating systems: Which one to use as a developer and why?

First, we must clearly understand the concept of an operating system:

What is an Operating System?

It is a set of programs that allows a device to function. Among them are Windows, Linux, and macOS for computers, and Android and iOS for mobile devices. Other devices like smart TVs or robots also have their own operating systems.

A device with just the operating system cannot do much. To make it useful, we use software applications installed on top of it. The operating system serves to provide services to these applications. Tasks such as manipulating file information, displaying images on the screen, configuring and using the network, switching between different running applications (which allows us to listen to music while writing a document), among others.

Kernel

An operating system is composed of different parts. The core of the operating system is the Kernel. It manages low-level operations (small tasks) such as:

  • Access to the processor at any given moment
  • The memory assigned to an app in execution
  • And controlling peripherals (screen, keyboard, etc.)

In other words, it allows interaction between software and hardware in an orderly and secure way (it is the part of our software that runs in privileged mode), by controlling the network card, sending, receiving, and updating each packet of data, without caring about the information inside them. In the same way, it manipulates the pixels displayed on the screen without considering what they represent.

The processor can execute millions of operations per second. It does this through an algorithm that decides how processor time is allocated. The kernel divides processing time among many apps to maintain the illusion of simultaneity.

Then, the higher-level libraries and apps of the operating system gather, decode, and convert this into a sequence of information, providing services to the end applications.

Types of Kernel

1. Microkernel:
It is very small, and its code is limited to doing the minimum necessary for the device to function. Other tasks are provided by external services that communicate via the kernel.

Benefit: If a specific service fails, the failure is isolated to that service. In other words, it isolates failures.

Example: The driver of the network card that handles sending and receiving data packets would not be part of the kernel, but a service that communicates with the kernel.

2. Monolithic Kernel:
Many operations are carried out in the same kernel.

Benefit: Time is better utilized since it doesn’t have to pass messages between different services.

Example: Linux Kernel.

3. Hybrid Kernel:
The most important tasks are performed in the kernel, and less important tasks are done outside of it.

Benefit: It shares the benefits of both types of kernels, improving performance on critical tasks while isolating failures in less important ones.

Example: Windows and macOS Kernel. Drivers for the network card or the file system are part of the kernel, while less important ones, such as a webcam, are external.

Image description

Differences between Windows, Linux, and macOS

Now that we know exactly what an operating system is and what it does, let's look at their differences.


1. Linux:
Mainly managed through command lines. Almost the entire web is based on Linux because almost all supercomputers and high-capacity servers use it. Moreover, the most widely used mobile operating system is Android, which is based on the Linux kernel.

Being open-source, it is developed by many people around the world. As a result, different Linux distributions have emerged in response to the need for changes.

Distributions

Software projects with specific goals (e.g., being beginner-friendly, secure, minimal installation, etc.) that group applications and prepare them for use.

With this, users can obtain a more or less customized operating system for what they want to do. However, this can increase the learning curve since there are quite a few distributions.

Example: Ubuntu, which facilitates usage and reduces the learning curve, aiming to expand its use on desktop computers.

History of Linux
UNIX
It was an operating system created in the 1970s. Initially developed for a game, it expanded into a more complex operating system.

It operated entirely through text, even input devices (like the keyboard) and output devices. This is where the name of the print() function comes from, as these old computers had printers instead of screens.

It was written in machine language, but they decided to rewrite it to be compatible with other computers, creating the C programming language for it. The focus of this system was simplicity, aiming to perform small tasks but do them well, which was key to its success.

Initially, it was distributed openly, but due to a change in law in the 1980s, the code became closed, losing the possibility for collaboration and/or study. As a result, companies like IBM or HP started commercializing it in different versions.

In response, the GNU project was born, aiming to create a similar and open system, creating different kernels, the most important of which was Linux, created by Linus Torvalds. This kernel, along with the tools developed by GNU, created the operating system that aims to be maintainable and upgradable over time.

For the different versions of UNIX, the POSIX standard was created, which all had to comply with, including Linux.

Linux Growth
Due to its large community, bugs have been quickly fixed, and it has gained a reputation for being more stable and secure. With the rise of the cloud, Linux grew enormously, as most servers use it.

Today, Linux has taken most of the market in servers and is gaining more of the market in personal computers, which has incentivized computer manufacturers to include the necessary code to make their devices work directly in the Linux kernel, without waiting for the community to include them.

Pipes
They created this concept, which allows connecting the output of one command with the input of another, enabling more complex operations, automating processes, and generating great flexibility—a key advantage in managing large-scale systems. For this reason, the cloud has boosted its use, due to its ability to create and destroy virtual servers with ease.

Benefits:

  • Total hardware control: Allows complete customization for managing and optimizing resources.
  • Simplicity and flexibility: Customizable to multiple scenarios and focused on doing one task well at a time.
  • Free and open-source software: No licensing costs.
  • Efficiency and scalability: Known for efficient performance, ideal for applications requiring high processing capacity and growth.
  • Advanced automation: Facilitates task automation and management through scripts and text-based commands, optimizing daily administration.
  • Linux mastery: Opens up many professional opportunities, as nearly the entire web is based on it.

2. Windows
History
DOS
An operating system created in the 1980s by Bill Gates for IBM's personal computers. These computers were later manufactured by other companies. This system was mainly text-based, but unlike UNIX, it was designed to be used by a single user on personal computers.

Windows was created as the graphical interface for this operating system, and it became the main operating system, while DOS became the command line. As newer versions were released, the command line took on a less important role, as it was designed to be managed, configured, and installed graphically.

Windows Growth

Many companies traditionally adopted it as their base operating system. For this reason, it is one of the most used. Traditionally, it has been more compatible with peripherals and hardware, due to agreements manufacturers had with Microsoft (unlike Linux, which relies on the community to add hardware support to the kernel).

In the development world, it used to have high incompatibility. Web development could only be done with Internet Explorer, and for IDEs, Visual Studio was required. Its environment was very restricted, leading to applications being developed only for Windows. Additionally, a license fee is required to use it.

For these reasons, it is not ideal for developers seeking to automate tasks or interact with virtual servers.

Integration of WSL

Windows has integrated a Linux kernel into its operating system, called WSL (Windows Subsystem for Linux). This allows Linux to run within the Windows system. While it won't have the same performance as a native operating system, it serves as a learning tool, and its version 2 is closer to a virtual machine.

Benefit: It combines the ease of use of Windows with the benefits of using Linux.


3. macOS

History:

It was born in the 2000s, based on UNIX. The part of this operating system that organizes files and commands is open-source and is called Darwin, but the graphical interface it provides is closed-source.

A few years ago, it was known for its incompatibility and restrictions, but today it has software available for most tasks. Apple has developed its own M1 processors, offering great speed.

This operating system is only compatible with Apple hardware. This allows for less flexibility but more control and stability. On the other hand, its hardware is more expensive, and licenses are required to use it.

Image description


The Best Operating System for a Developer

There is no one best operating system, but each has advantages depending on the developer’s profile. All of these systems are compatible with development tools, programming languages, and the cloud.

The choice depends on several factors:

  • The hardware.
  • The compatibility of software with the architecture of the operating system.
  • And most importantly, the developer’s resilience: the ability to adapt to a new environment.

If we want to manage cloud servers, Linux is the predominant option. However, for local or personal development, the ideal operating system depends on the developer. Still, learning Linux is beneficial to increase versatility, even if you're not managing servers.

Servers and Linux Mastery

Managing and configuring servers through the command line is more efficient and allows for better remote administration compared to graphical interfaces. This is why Linux dominates virtual and cloud servers.

In terms of cost, it is a more economical option because it doesn’t require licenses, unlike Windows or Mac, where each server needs one. Additionally, a company providing a service may have many servers. In the 2000s, it became possible to have a server with many virtual machines inside, whether physical or cloud-based.

In terms of security, being open-source allows the community to audit it and detect vulnerabilities faster, something that is not possible with closed systems. In other systems, only people within the company have access to the code, and only those people can find security flaws.


Basic Development Environment for a Developer

Regardless of the operating system, there are essential tools that every developer should have:

1. WSL (Windows Subsystem for Linux): Allows you to work in a Linux environment without having to switch operating systems.

How to install WSL:

  • Go to Control Panel > Programs > Turn Windows features on or off.
  • Check the box for Windows Subsystem for Linux (WSL).
  • Restart your computer to apply the changes.
  • Open the Microsoft Store and search for the Linux distribution you prefer, such as Ubuntu, Kali, and others. Then install it.

To interact with these distributions, you can use Windows Terminal, an application that allows you to open multiple terminals such as Ubuntu, PowerShell, or CMD in tabs. Windows Terminal also offers benefits like better performance, color customization, and more control over terminal windows, enhancing the development experience.

2. Docker Desktop: Simplifies working with containers, both locally and in the cloud.

3. Visual Studio Code (VSC): A versatile editor that supports multiple languages and technologies. It’s the default choice for developers.

With these three tools, we can make the following development decisions for backend, frontend, DevOps, and programming language choices.


--My Own Notes Taken from the Brilliant Content of "Aprendiendo con Marga" <3--
I hope they are of some help.

Top comments (2)

Collapse
 
sreno77 profile image
Scott Reno

I either use Ubuntu or MacOs. They have less problems than Windows and they are more stable. I would only use Windows if I was developing Windows only apps.

Collapse
 
samirabawad profile image
Samira Awad

Thanks for your comment, you're right, they're very stable! :)