Understanding The Operating System (Part-2)

Cyberic Technology
CodeX
Published in
5 min readNov 8, 2022

Welcome back to our “Understanding The Operating System” articles, in the last article we explained about basic overview and functions of the Operating System. Today we will dive a bit further into Operating Systems and a brief introduction to Computer Systems.

image by pixabay.com

Linux System

Linux is one of the most famous Unix-like Operating Systems on planet earth because it is extremely lightweight, free, and open-source. Linux was invented by Linus Torvalds on September 17, 1991, as an open-source operating system’s kernel. Linux was typically packaged as a Linux Distribution(Distro), Linux Distro basically has a kernel and software, utilities, and libraries provided by the GNU project. Here’s how a Linux System is structured:

image by author

In actuality, there is no exact layering like the above illustration but for the sake of bringing our readers an easy explanation, we put layers on the right side.

Layer-5

The lowest layer of a computer system consists of computer hardware like motherboard, CPU, ram, GPU, and Storage. Layer-5 is the only physical layer in a computer system but in this case Linux system.

Layer-4

It is the most crucial layer in a Linux System as it is where the Operating System interacts with the Hardware. Layer-4 also has basic fundamental tools and protocols like memory management, SCI, Drivers & Modules …etc. Linux Kernel is also responsible for doing I/O tasks(Input/Output) to storage.

Layer-3

This layer consists of the GNU C Library of other necessary libraries to keep your operating system functioning.

Layer-2

Layer-2 is the first layer you can interact with easily, it has GCC(GNU Compiler Collections). GNU coreutiles, and Bash. GCC is the compiler for the C programming language and other languages of its family. GNU coreutiles are a collection of important packages for your Operating System, this includes terminal commands like cat, man, ls, cd…..etc. Bash is the Shell and scripting language for every Unix system. Bash enables you to use the Terminal and make automation by scripting Bash.

Layer-1

This layer sits on top of the Linux System but it is not necessarily needed to have in a Linux operating system since layer-1 has mostly consisted of add-on software. There are three main categories to make up layer-1: GUI, LAMP, and NET, GUI(graphical user interface) is where you can use your computer visually by clicking icons and using a mouse. GUI is enabled in a Linux system by GUI softwares like Gnome, KDE, and XFCE. GUI softwares usually come up with their own applications like Calculator, Photo-viewer, and Calendar.

LAMP stands for Linux, Apache, MySQL, and PHP. LAMP is used to host web servers and is currently one of the most famous systems for web servers. NET is the category for a collection of net-softwares this includes sshd and inetd. Sshd helps users access services like ssh and Inetd enabling users to access Pop3, FTP, and Telnet services across the network.

image by Wikipedia under common creative license

Lastly, an Operating System has a Package Manager to allow users to manage, install, remove and upgrade softwares. Major differences among Linux-distros being different are Name and Package Manager. Package Managers are different from distro to distro. RPM(RPM Package Manager) package manager is used by RHEL, Fedora, and OpenSuse. APT(Advanced Package Tool) is used by Debian-based distros like Debian, Ubuntu, and Kali. Other binary formats include TGZ, PACMAN for Arch Linux and Source formats like ebuilds, LFS(Linux From Scratch)…etc. Modern Windows systems use winget Package Manager for operating packages.

Filesystems

Filesystems(FS) are layouts of data on a storage device and ensure that the data can be retrieved reliably and efficiently. Filesystems help user easily explore, build, remove or upgrade files and directories(Folders). Filesystem also has Abstraction and Arbitration functions.

Abstraction of disk space

Abstraction of disk space is responsible for querying the files, and opening and closing files. Not only Abstraction gives files Human-readable names instead of random numbers and letters that the computer understands but also organizes the files into directories(folders).

Arbitrator of disk space

Arbitration of disk space provides File-Permissions and protects privacy from other users accessing your files. Arbitration also ensures that a single user does not take up all the disk space in a computer with multiple users (eg. a family computer with 1+ users)

Metadata

Filesystem maintains various pieces of information about files stored in storage drives in the order of:

Metadata also records internal information. It helps Pointers to get through the Actual Data on the storage and creates Reference-count for the number of Hardlinks to the file.

Formatting

Placing a filesystem structure onto a disk partition is known as formatting the partition.

Formatting typically destroys the structure of any filesystems previously installed on the partition. If a disk or partition is formatted it is difficult to recover the contents(files) using standard tools but unless the partition is securely erased, contents can be still recover using forensics tools.

This is the end of Understanding the Operating System (Part-2). Thanks for paying your attention and reading until the end! Stay tuned for Part-3!

Read the Part-1 here: https://medium.com/codex/understanding-operating-systems-part-1-d1f8d5c7dce8

References

ebuild — Gentoo Wiki. (n.d.). Retrieved November 7, 2022, from https://wiki.gentoo.org/wiki/Ebuild

Prakash, A. (2020, October 4). Linux Jargon Buster: What is a Package Manager in Linux? How Does it Work? It’s FOSS. https://itsfoss.com/package-manager/

Wikipedia contributors. (2001, November 20). Linux. Wikipedia. https://en.wikipedia.org/wiki/Linux

Wikipedia contributors. (2021, December 28). Inetd. https://en.wikipedia.org/wiki/Inetd

Wikipedia contributors. (2022, November 4). LAMP (software bundle). Wikipedia. https://en.wikipedia.org/wiki/LAMP_(software_bundle)

Windows Package Manager. (2022, February 22). Microsoft Learn. https://learn.microsoft.com/en-us/windows/package-manager/

--

--