<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Chaitanya Rahalkar</title>
    <description>The latest articles on DEV Community by Chaitanya Rahalkar (@chaitanyarahalkar).</description>
    <link>https://dev.to/chaitanyarahalkar</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F181429%2Fec4fe0f8-cd7d-43e0-be22-2123f3072348.jpeg</url>
      <title>DEV Community: Chaitanya Rahalkar</title>
      <link>https://dev.to/chaitanyarahalkar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chaitanyarahalkar"/>
    <language>en</language>
    <item>
      <title>Understanding Virtualization in Operating Systems</title>
      <dc:creator>Chaitanya Rahalkar</dc:creator>
      <pubDate>Sat, 08 Aug 2020 09:19:05 +0000</pubDate>
      <link>https://dev.to/chaitanyarahalkar/understanding-virtualization-in-operating-systems-5e30</link>
      <guid>https://dev.to/chaitanyarahalkar/understanding-virtualization-in-operating-systems-5e30</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hIG4HPd4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0dcc35imouugba5p1t1d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hIG4HPd4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0dcc35imouugba5p1t1d.png" alt="XKCD"&gt;&lt;/a&gt;&lt;br&gt;
Virtualisation is the process of creating a virtual version of a physical object.&lt;/p&gt;

&lt;p&gt;Virtualisation is of three types primarily:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Hardware Virtualisation - Based on simulating real hardware. This can be used to run a complete operating system. This can be further subdivided into full and paravirtualisation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Desktop Virtualisation - It is the concept of separating the logical desktop from the physical machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Operating system level virtualisation (also called as containerisation) - It is the operating system feature in which the kernel allows the existence of multiple isolated user-space instances. Such instances are called containers. Containerisation was introduced as a Linux Kernel feature in 2010. It started gaining momentum with the introduction of Docker.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Hardware Virtualisation
&lt;/h4&gt;

&lt;p&gt;Some terminologies associated with Virtualisation:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Virtual Machine: It is a virtual representation of a physical machine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hypervisor: It is a software that manages and monitors running virtual machines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Host machine: The physical machine that a virtual machine is running on.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Guest machine: The virtual machine running on the host machine.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The following block diagram shows the position of each component mentioned above:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nNGNd2mv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6sl9vl8orsd887e2g0hh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nNGNd2mv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/6sl9vl8orsd887e2g0hh.png" alt="Virtual Machine Diagram"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Hypervisors
&lt;/h4&gt;

&lt;p&gt;There are two main types of hypervisors:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Native: They run directly on the host machine and share out resources between guest machines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hosted: They run as an application inside the operating system and support virtual machines running as individual processes.&lt;br&gt;
Eg. VirutalBox,Parallel Desktop&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--e-z59GQo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z612664k72yl837ucu6g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--e-z59GQo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z612664k72yl837ucu6g.png" alt="Hypervisor Types"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>os</category>
      <category>virtualisation</category>
    </item>
    <item>
      <title>Understanding the Unix/Linux Virtual File System</title>
      <dc:creator>Chaitanya Rahalkar</dc:creator>
      <pubDate>Sat, 08 Aug 2020 09:08:12 +0000</pubDate>
      <link>https://dev.to/chaitanyarahalkar/understanding-the-unix-linux-virtual-file-system-jn1</link>
      <guid>https://dev.to/chaitanyarahalkar/understanding-the-unix-linux-virtual-file-system-jn1</guid>
      <description>&lt;h3&gt;
  
  
  File Systems In Linux
&lt;/h3&gt;

&lt;p&gt;Linux works on the concept of virtual file systems. Everything on a Linux/Unix system is a file.&lt;br&gt;
Here is a brief look at the file system structure -&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vRFdzzBj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n48jiizbjrcv9xaksp48.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vRFdzzBj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/n48jiizbjrcv9xaksp48.png" alt="Linux File System"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This directory structure is followed in all Linux distributions which is similar to a Unix file system. Whenever a Linux system boots,this virtual file system is mounted. Each directory in this tree has its own significance.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;/bin - The bin directory stores all the Linux command binaries. The default commands like ls,cd,mkdir etc have their binaries located in this folder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/boot - This directory stores all the boot related information. The Linux kernel can be found here with usually the name &lt;code&gt;vmlinuz&lt;/code&gt;. A separate subdirectory for GRUB can also be found here if it is installed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/dev - Here all the external devices are mounted. It also contains ttys,null,urandom,random devices which are internal devices used in several situations.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/etc - Here all the configuration files are stored for different programs. A well known file - hosts can be found here. FTP,SSH and several applications store their configuration files here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/home - Here all the documents and personal files of different users on the system are stored. /home may have sub directories for each user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/lib - This directory has all the library files used by the Kernel or the system while booting. It has shared library images (Shared Object files &amp;amp; dependencies)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/media - This directory is now no longer used. It is kept for backward compatibility to older systems having floppy or CD drivers. The CDs and floppies inserted into the drives were mounted here. Instead they can now be mounted in the /mnt directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/mnt - This directory is used to mount external drives or even ISO mounts. Other Linux Virtual File systems can also be mounted here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/opt - Add on software package files are installed in this folder. Some softwares use this folder to place its libraries and dependencies here. It also has /bin, /doc , /include directories reserved for the system administrator.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/root - A separate directory is provied for the root user. All the documents and root files are stored here. Other non-privileged users are not allowed access to this directory as well as all the other directories mentioned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/sbin - This directory contains all the system binaries. Binaries for programs like systemctl,service etc. can be found here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/tmp - This is a directory used to store temporary files. The system creates several temporary files which are deleted once the system is powered off. Ususally incomplete download files can be found here. Sometimes temporary mounts are also created here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/srv - This directory has site-specific data served by the system. Usually files related to services are stored here. Eg. ftp,rsync related files are stored here.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/usr - It is one of the major directories in Linux. It has various sub-directories like bin(User binaries),include(All the C headers are stored here),share(Architecture independent data),local(Local system files) etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;/var - This directory has variable data files. It has several sub directories like cache(Applications' cache data),lib,opt(Variable /opt data),tmp(Temporary system files),log(System logs),lock(Lock files),cron(Crontab configuration file),backups etc.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;File systems are also used on numerous storage devices that use different kinds of media. NTFS,HFS+,APFS,ExFAT etc. are some of the well known file systems designed by proprietary companies. Linux uses Extended File Systems. ext4 is the latest file system used on Linux based distributions. It is backward compatible with its older generations ext3,ext2 &amp;amp; ext. ext4 allows volumes upto size 1EiB (Exbibyte) and files with sizes upto 16 TiB (Tebibytes).&lt;/p&gt;

</description>
      <category>linux</category>
      <category>unix</category>
      <category>filesystem</category>
    </item>
    <item>
      <title>How Your Computer Starts Up</title>
      <dc:creator>Chaitanya Rahalkar</dc:creator>
      <pubDate>Fri, 07 Aug 2020 17:23:17 +0000</pubDate>
      <link>https://dev.to/chaitanyarahalkar/how-your-computer-starts-up-nj9</link>
      <guid>https://dev.to/chaitanyarahalkar/how-your-computer-starts-up-nj9</guid>
      <description>&lt;p&gt;Every computer follows a standard boot sequence when it starts up.&lt;/p&gt;

&lt;h4&gt;
  
  
  BIOS (Basic Input Output System)
&lt;/h4&gt;

&lt;p&gt;The CPU runs an instruction in memory for the BIOS. This is a Jump instruction that transfers the Instruction Pointer to the code of the BIOS start-up program.  &lt;/p&gt;

&lt;p&gt;The BIOS runs the Power On Self Test. It is a process performed by firmware or software routines immediately after a computer or any digital device is powered on.&lt;br&gt;
The POST performs the following checks &amp;amp; tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;verify CPU registers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;verify the integrity of the BIOS code itself&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;verify some basic components like DMA, timer, interrupt controller&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;find, size, and verify system main memory&lt;br&gt;
initialize BIOS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;pass control to other specialized extension BIOSes (if installed)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;identify, organize, and select which devices are available for booting&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;discover, initialize, and catalog all system buses and devices&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;provide a user interface for system's configuration&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;construct whatever system environment is required by the target operating system&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every hardware manufacturer has its own BIOS code hardcoded on the ROM.&lt;br&gt;
The BIOS has a boot sequence configured which searches for the boot devices sequentially.&lt;br&gt;
Booting devices can be of several types:&lt;/p&gt;

&lt;p&gt;1.CD Drives&lt;/p&gt;

&lt;p&gt;2.Hard Disk Drives&lt;/p&gt;

&lt;p&gt;3.USB Drives&lt;/p&gt;

&lt;p&gt;4.Network&lt;/p&gt;

&lt;p&gt;As soon as it finds the boot device, it looks for the Master Boot Record. The MBR has number of partitions in it. If any active partition is found it is loaded into memory.&lt;/p&gt;
&lt;h4&gt;
  
  
  Master Boot Record
&lt;/h4&gt;

&lt;p&gt;It is a special type of boot sector at the beginning of data drives. It holds information about the logical partitions,organisation of the file systems and also a boot loader. The boot loader is responsible to load the kernel(A subset of the entire OS) into memory.&lt;br&gt;
It may happen that the selected memory drive has multiple operating systems. The bootloader allows selection of the OS(Along with different kernels)to be loaded. GRUB is an open source bootloader by GNU prominently seen on most Linux Distributions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--g5N3-Cr1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tp3zoo9hbiv5my1oyoj9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--g5N3-Cr1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tp3zoo9hbiv5my1oyoj9.png" alt="Master Boot Record"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Kernel
&lt;/h4&gt;

&lt;p&gt;As soon as the kernel is loaded into memory by the boot loader, the Kernel mounts Linux/Unix Virtual file system.&lt;br&gt;
The Linux Virtual File System is of the format shown below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f3i6Ejv8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5cx7wvyqzvai28z7la34.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f3i6Ejv8--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5cx7wvyqzvai28z7la34.png" alt="Linux Virtual File System"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Init (Now Systemd For Linux)
&lt;/h4&gt;

&lt;p&gt;The Kernel executes the /sbin/init binary. Init is the first program executed by the Kernel in Kernel Space. It is given the process Id (PID) of 1.&lt;br&gt;
However in the recent versions init is replaced by a System Management Daemon called systemd. Systemd was designed to overcome the shortcomings of Initd. It is the parent process of all the processes.&lt;/p&gt;

&lt;p&gt;You can find the source code of Systemd &lt;a href="https://github.com/systemd/systemd"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are six different run levels in Linux. (Used with Initd)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;0 – halt&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;1 – Single user mode&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;2 – Multiuser, without NFS&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;3 – Full multiuser mode&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;4 – unused&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;5 – X11 (X Window System)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;6 – reboot&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each runlevel has its own set of programs which can be seen in -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;
    Run level 0 – /etc/rc.d/rc0.d/
    Run level 1 – /etc/rc.d/rc1.d/
    Run level 2 – /etc/rc.d/rc2.d/
    Run level 3 – /etc/rc.d/rc3.d/
    Run level 4 – /etc/rc.d/rc4.d/
    Run level 5 – /etc/rc.d/rc5.d/
    Run level 6 – /etc/rc.d/rc6.d/

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each of these directories have programs starting with S (Used during startup) and K(Used during shutdown)&lt;/p&gt;

</description>
      <category>computer</category>
      <category>linux</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
