Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

Introduction To Linux Operating System (Part 1/15)

Written By: 

Ashish Vara

History of Linux

Before understanding the popularity of Linux, we need to go back to the History of computers. In the early developmental stage, due to the large size of computers there wasn’t any fixed operating system.It was difficult to use the same software with each one of them which led to increased cost and complexity.

In 1969, some developers in the Bell Lab laboratories started to work on software solution of compatible OS which could run on any computer.They developed advanced OS with highly efficient features written in C language named UNIX operating system. UNIX was very simple and enabled recycling of  the code. It could run on any computer and needed only small pieces of code called kernel.

It was initially developed for mainframes and minicomputers especially for universities and carried a universal compatibility.when microcomputers were being developed, many UNIX versions supported PC architecture but lacked compatibility and speed. As a result, the users started running MS-DOS or Windows on their home computer.

In 1990, PC were fully powered by UNIX but still free software was unavailable. In 1991, Linus Torvalds began developed an operating system called Linux which is member of large family UNIX-like OS. Linux was developed for IBM- compatible personal computer based on Intel 80386 micro processor. All features of UNIX were added in Linux within few years, which gave rise to a mature operating system called Linux. Today Linux is supported by all kinds of workstations, home user PC and both server and client.

 

What is Linux?

Linux is fully customizable free operating system and is supported by all kinds of hardware components. Due to advent open source feature of Linux, everyone can download the source code of Linux and modify it. On the server side Linux is a renowned OS for its stability and reliability. Day by day Linux is getting more popular and user friendly. Modern Linux is not only supported by high end server, workstations and home PC but can also run on various gadgets.

Fig. 1: Logo of Linux

Linux is totally UNIX kernel but not fully UNIX OS because it does not include applications like file system, Window system, text editor, Compiler and so on.. Whole Linux distribution is a collection of Linux Kernel, GUI, GNU C/C++ compiler, text editors and various applications under GPL. Linux uses only POSIX (Portable Operating System Interface Standards) of UNIX. which  are standards specified by IEEE computer society for maintaining compability between OS.

It needs standard GNU C compiler and GPL (General Purpose License). GNU is collection of computer software that can be used in building an OS like UNIX or Linux.and makes it free to use for everyone. Various GNU components are used to develop Linux like GNU compiler, debugger and hardware. Linux was licensed under the GPL. Without paying any charge, you can download source code of Linux to use, share and modify it. GPL (General Public License) uses free license software which provides freedom to run, share, modify and study it.

Before we discuss Linux in brief, mentioned below are some of its advantages: Open Source

-Run on both low and high end hardware

-Compatible with others OS

-More powerful

-Low failure time 

-Well supported

-Well Secure

-Fully customizable in all its components

 

Features of Linux

Linux is fully featured OSand adopts various features from different UNIX versions.

Multithreading

Linux is supported by multithreading environment. More than one thread can run at the same time in Linux. Thread is a small code within the process. I will briefly explain about thread in another tutorial.

Monolithic kernel

Linux kernel is Monolithic kernel. It is an operating system architecture where entire OS runs in kernel mode instead of user mode. When program or applications want to use hardware, send request to kernel mode by system call. Kernel evaluates request from system call and interacts with proper hardware. All operating services like memory management, file management, process management are working in kernel.

File System

Whole Linux kernel is based on file system architecture. Linux supports many file types such as a directory file, link, pipe, named pipe, special file and block device file. Each file type has its own characteristics and features. File system is not only holding the data of file but also contains the structure and informationof the file.

Multiuser Capability

Linux OS shares the same resources like memory, hard disk etc. for multi users. Multi users can access same resource using individual terminal (i.e. client PC).

Architecture of Linux OS

 

Architecture of Linux OS

Architecture of Linux OS

 Fig. 2: Image showing Architecture of Linux OS

Linux OS architecture consists of following layers:

Hardware Layer - Hardware consists of all peripheral devices like RAM, HDD, CPU etc.  User can not interact directly with hardware from user space (where application or program is run).

Kernel - Kernel is a small special code which is the core component of OS. It directly interacts with hardware and provides low level service to user mode’s components. Besides, it is fully developed in C language and file system architecture.

Shell - Shell is an interface medium between user mode and kernel mode. Any program or application can interface with kernel through shell. Shell is hiding the complexity of kernel’s function from user. It takes the command from user mode (i.e. command terminal) and executes function of kernel. For example if you enter any command from terminal (which is run in user mode), behind the terminal shell takes command from terminal and interacts with kernel thereby executing the corresponding function related with command. 

User or Utilities - This is the upper layer of OS also called user mode where application or program runs. In User layer; various users, applications, software and program can run at a same time.

Difference between User mode and Kernel mode

Kernel Mode

All kernel programs are executed in kernel modethat directly accesses the memory and hardware. It can execute any CPU instruction and access any memory address. It provides the low level service which is fully trusted. If any crash occurs in this mode, the whole PC will halt and the OS will get corrupted. It prevents the user mode application from damaging the system.  This mode is reserved for device driver which operates on low level and runs upon requesting by API.

User mode

All user programs and applications are executed in user mode. User mode cannot directly access the memory and hardware. Program which is running in user mode can access the memory and hardware by calling API. Due to full protection, crashes in user mode are recoverable.

Linux Distributions

Linux Distribution is fully operating system which is collection of Linux kernel and package management system. User can download any distribution and run it on PC or hardware. Various distributions are supported different platform like desktop environment, embedded platform etc. Linux distribution includes Linux, GNU tool, Software and collection of libraries. Some distribution is specially developed for specific hardware.

Some of the popular distributions of Linux are  as follows:

Debian - Debian is Linux operating system composed only of free and open source software. It was introduced in 1993 and till now it is stable and used in system. Debian is much slower than ubuntu and Linux mint. It is also preferred for server due to its user friendly nature.

Ubuntu - Ubuntu is well known Linux distribution for desktop environment. It is based on debian but it has its own repository (central location in which data is stored and manage) and quite user friendly.

Linux Mint - Linux mint is also known as Linux distribution for desktop environment similar to Ubuntu. It is used as ubuntu’s repository. Same packages are available for ubuntu and Linux mint. Linux mint includs media codec which is not included in ubuntu by default.

Some more Linux distributions are mentioned here:

  • Fedora
  • Kali Linux
  • OpenSUSE
  • Arch Linux
  • Slackware Linux
  • Mageia
.

Comments

Very informative..good work Ashish vara

good work.

where is second part of this tutorial?

 

Provide good material ..I really like it