All Categories

Introduction to Linux System and Subsystems

Before we move on to learn about various DevOps tools, we should understand and master the Linux system. Linux is the base OS for almost all the DevOps tools.

Why Linux?

Well, as Linux is open source OS, it suggests that it is designed by the community and, hence, is written in a way that almost anything can be run on the command-line. Almost all the aspects of the system can be configured from the command-line. Also, as there are very less proprietary tools and architecture are involved, all the new tools are written (and eventually evolve) on the Linux platforms.
Now, let’s explore some advantages and disadvantages (although, I don’t agree with all of the disadvantages listed here).

Advantages of Linux

  • Linux is Free: Linux can be downloaded in its entirety from the Internet completely for free. No registration fees, no costs per user, free updates, and freely available source code in case you want to change the behavior of your system.
  • Linux is Portable: Linux can Run on x86, x64, Intel, AMD, nVidia, RaspberryPi, Cheetah, or any kind of computer in the world.
  • Almost Non-Existent Crashes: Linux system expects to run without rebooting all the time. This property also allows for Linux to be applicable in environments where people don’t have the time or the possibility to control their systems day and night.
  • Linux is Secure and Versatile: The security model used in Linux is based on the UNIX idea of security, which is known to be robust and of proven quality.
  • Linux is Scalable: Linux can work on a small device (with 2 MB memory) to a storage cluster with hundreds of nodes with Hexabytes of storage.
  • Easy to Debug: Because Linux has been developed and tested by thousands of people, both errors and people to fix them are usually found rather quickly. It sometimes happens that there are only a couple of hours between discovery and fixing of a bug.

Linux Disadvantages

  • Too Many Distros: There are far too many different distributions: However, the differences are likely to be very superficial. The best strategy is to test a couple of distributions; unfortunately, not everybody has the time for this. Luckily, there is plenty of advice over the web on the subject of choosing your Linux.
  • Linux Has a Learning Curve: It is a common notion that Linux is not very user-friendly and can be confusing for beginners. This used to be true in the older times, but considerable efforts have been made to make Linux even easier to use, especially for new users. More information is being released daily to help fill the gap for documentation available to users at all levels.
  • Linux Trustworthiness: Is an Open Source product trustworthy? After long periods of testing, most Linux users come to the conclusion that Linux is not only as good but in many cases better and faster than the traditional solutions. If Linux were not trustworthy, it would have been long gone, never knowing the popularity it has now, with millions of users.

Linux Architecture

A Linux Operating System has primarily three components

  • Kernel: At the core is the Linux kernel, which mediates access to the underlying hardware resources such as memory, the CPU via the scheduler, and peripherals.
  • Shell: The shell (of which there are many different types, like Bash, cShell, etc.) provides user access to the kernel. The shell provides command interpretation and the means to load user applications and execute them.
  • Applications: These make up the bulk of the GNU/Linux operating system. These applications provide the useful functions for the operating system, such as windowing systems, web browsers, e-mail programs, language interpreters, and, of course, programming and development tools.

Kernel Components

The kernel mediates access to the system resources (such as interfaces, the CPU, and so on). It also enforces the security of the system and protects users from one another. The kernel is made up of a number of below major components:

  • init

The init component is performed upon booting of the Linux kernel. It provides the primary entry point for the kernel. init is very architecture dependent because different processor architectures have different init requirements. The init also parses and acts upon any options that are passed to the kernel. Here is the sequence of events that init performs:

  • Hardware and kernel initialization
  • Opens the initial console (/dev/console) and starts up the init process
  • This process is the parent of all processes within GNU/Linux

Process Scheduler

The Linux kernel provides a scheduler to manage the processes running in a system. Almost always, the schedule is a pre-emptive one; which means that the scheduler permits a process to execute for some duration, and if the process has not finished, then the scheduler will temporarily halt the process and start executing another one. The scheduler can be controlled by the scheduling policy (such as FIFO or Round-Robin scheduling).

 Memory Manager

The memory manager is one of the most important core parts of the kernel. It provides physical to virtual memory mapping functions (and vice-versa) as well as paging and swapping to a physical disk. The memory manager works with architecture-dependent code to access the machine’s physical memory. While the kernel maintains its own virtual address space, each process in user space has its own virtual address space that is individual and unique.

 Virtual File System

The Virtual File System (VFS) is an abstract layer within the Linux kernel that presents a common view of differing filesystems to upper-layer software. The VFS interfaces to the device drivers to mediate how the data is written to the media.
Linux supports a large number of filesystems (e.g. ext2, Minix, NFS). Rather than presenting each of these as a unique filesystem, Linux provides a layer into which filesystems can plug their common functions (such as open, close, read, write, select, and so on). Therefore, if we needed to open a file on an ext2 journaling filesystem, we could use the same common function openly, as we would on any other filesystem.
Network Interface: The Linux network interface offers a very similar architecture to what we saw with the VFS. The network interface component is made up of three layers that work to abstract the details of networking to higher layers while presenting a common interface regardless of the underlying protocol or physical medium.
Loadable Modules: Loadable kernel modules are an important element of GNU/Linux as they provide the means to change the kernel dynamically. The footprint for the kernel can be very small, with requires modules dynamically loaded as needed. Outside of new drivers, the kernel module component can also be used to extend the Linux kernel with new functionality.
Device Drivers The device driver component provides a plethora of device drivers that are available. Almost half of Linux kernel source files are devoted to device drivers. This isn’t surprising, given a large number of hardware devices out there, but it does give you a good indication of how much Linux supports.
 In our further discussions on DevOps Training Certification, we will observe and understand how we use this information in automating our systems, debugging problems, and for fine-tuning our systems to get the most efficient performance from them.
Hope this helped you in understanding the basics. Keep visiting acadgild.com for more updates.

Hadoop

Tags

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Related Articles

Close
Close