In the previous article, we discussed various Raspberry Pi models. We also discussed situations in which particular models deem suitable. Most of the time, you will be using RPi as a Linux computer. Raspbian, the official operating system for Raspberry Pi itself is a variant of Debian OS (a Linux Distribution). There are other operating systems too that can be run on it; Linux is the most preferred one.
From an electronics perspective, any computing device (any computer) is essentially a digital electronic circuit that can process a digital instruction set, and by executing some (of all) of these instructions in a programmed order, specific tasks are accomplished. The programmed order of these instructions is called an application. When an operating system runs on the computing device, these Screenshot of Raspbian OS on Raspberry Piapplications, along with all hardware resources, are then managed by it. The operating system itself is a unique program designed and developed to manage hardware resources, data, memory, and applications.
Any application allows hardware to manipulate data. For example, a word processing application allows a computer to read data input from a keyboard, display typed data or data files through a graphic user interface on display screen, save data files to a secondary memory device, and allow data files to be printed by a printer or plotter. The data can be runtime data or in the form of files stored on the secondary memory device. The data files that themselves store the application on a secondary memory device are called programs. These programs at runtime are called processes. The processes cannot directly access the hardware resources. They need to interact with the operating system to access hardware resources, primary memory, other data files on secondary memory, and data transfer from one device to another.
It is the operating system that is responsible for managing and allocating hardware resources, allocating primary and virtual memory resources, manage processes, maintain file system, and protect files and data on secondary storage. The person using the computer is called the user. The user interacts with applications through input/output peripherals. For managing transfer of data from input/output peripherals, device drivers for those devices must be installed on the operating system. The device drivers are programs that dictate data communication with a hardware component. Each hardware device connected in the computer system has its own device driver that must be explicitly installed on the operating system to let it interact with the specific hardware device.
The operating system is also responsible for providing a user interface (command-line or graphical) to let user access files stored on secondary storage or removable storage devices and interact with the application programs. It also provides system services or utility services like scheduling of processes, file handling, manipulation of text, printing, networking, etc. These services run as separate processes and are initiated as the operating system is booted. The application programs may need to access or interact with one or many of these services for specific tasks.
Linux Operating System
Linux is an open-source operating system that was first developed by Linus Benedict Torvalds. As it is open-source software, it is available as a Linux kernel for free without any license fee. Anybody can download and modify the source code of Linux to have her own Linux distribution. The Linux kernel itself is written in C programming language.
The Linux kernel combined with system utilities (GNU utilities), Shell (special utility for a user to manage files and programs), desktop environment (which adds a graphic user interface to the Linux Kernel) and default application software (written for the Linux Kernel) forms a complete operating system. The Linux Kernel, GNU utilities, Shell, desktop environment, and some default application programs packed together to become a ready-to-use Linux distribution. There are hundreds of Linux distributions there. Interestingly, Linux is not limited to any platform; its different distributions are available as an operating system for desktops, servers, mobile devices, mainframe computers, supercomputers, and embedded devices. The current Linux desktop share is 1.74 to 2.18 percent. Around 85 percent of mobile devices are running on Android, which is a Linux derivative. Approximately 66 percent of servers use Linux, and almost all supercomputers run on custom Linux variants.
The Linux Kernel is periodically updated and made available for download. A version number identifies each release of Linux Kernel. The version number is made up of three components – Major number, Minor number, and Revision number. The major number indicates a significant revision to the Linux Kernel. The minor number indicates minor changes and stability of the version. If the minor number is odd, it means that it is a development kernel, and if it is even, it indicates that it is a production kernel. Development kernels are not fully tested and can be unstable. A production kernel is a fully tested and stable release of Linux Kernel. The revision number indicates minute changes to the kernel. For example, the latest stable Linux Kernel version is 5.4.1 (November 2019), in which 5 is the major number, 4 is the minor number, and 1 is revision number. This is a production kernel.
Linux is available under GNU Public License, which was developed by Free Software Foundation (FSF). Under GPL, any software and its source code must be freely available. If someone modifies the source code, it should also be redistributed without any license fee. So Linux is an Open Source Software (OSS). Under Open Source license, the software and source code must be available free of any charge. The software itself is freely developed and improved under the collaboration.
The software companies and developers cannot generate revenue on open source software (OSS) as the software, as well as its source code, must be distributed free of cost under open source licenses. So, OSS developers (and so Linux developers) generate revenue by selling hardware that runs OSS, selling closed source software that runs on OSS like applications for Linux and by providing customer support related to an OSS.
As an operating system, Linux is feature-rish. It provides multi-threading, multi-tasking, multi-user capability, stable, secure and monolithic kernel; versatility of hardware platform, multiple options of file systems, open-source code, and ease of customization; and last but not least low operational cost.
Popular Linux distributions include Red Hat, Fedora, Slackware, Arch Linux, OpenSUSE, Mandriva Linux, Gentoo, Debian, Ubuntu, CentOS, PCLinuxOS, Puppy Linux, Solus, Elementary OS, etc. Raspbian itself is a Linux distribution based on Debian.
Any Linux system has the following building blocks:
- Linux Kernel
- GNU Utilities
- Desktop Environment
- Add-on Application Software
To learn more about these building blocks of a Linux distribution (or Linux operating system) check out the following article, “Any Linux System at a Glance”.
Go through the above article without fail. It is important to understand different software components that make up a Linux operating system and to understand their role in the functioning of a Linux system. In this series, we need to quickly move on to practical projects and python applications on Raspberry Pi. So, in the next article, we will discuss setting up a Raspberry Pi computer. Be ready to get your hands dirty from the following tutorial, onwards.