FAQ Linux OS

Important features / advantages of Linux OS.
Features of Linux OS:
  • Portable – The Linux kernel and application programs supports installation on any kind of hardware platform.
  • Open Source − Linux source code is freely available and it is community based development project.
  • Multi-User − multiple users can access system resources at same time
  • Multiprogramming − multiple applications can run at same time
  • Hierarchical File System − Linux provides a standard file structure in which system files / user files are arranged.
  • Shell − Linux provides a special interpreter program which can be used to execute commands of the operating system.
  • Security − Linux provides user security using authentication features like password protection / controlled access to specific files / encryption of data.

Responsibility of kernel in Linux Operating System
A kernel is the core part of the operating system that provides all basic services for all other parts of the system. It is mainly responsible for interfacing the applications and the physical hardware.
Types of kernel:
  • Microkernel
  • Monolithic Kernel
  • Hybrid Kernel

Linux Architecture

The architecture of a Linux System consists of the following layers −
  • Hardware layer − Hardware comprises of all internal components and peripheral devices
  • Kernel− core part of Linux OS which is responsible for all major activities of the system. It consists of various modules and is mainly responsible for interfacing the applications and the physical hardware.
  • Shell− An interface to kernel. It hides the complexity of kernel’s functions from users. The shell takes commands from the user and executes kernel’s functions.
  • System Library − System libraries are special functions or programs using which application programs or system utilities accesses the Kernel’s features.
  • Utilities− Utility programs provide most of the functionalities of an operating systems to the users. They are responsible for all specialized, individual level tasks.

Features of Linux file systems.
  • In Linux, all files and directories are located in a hierarchical tree-like structure.
  • Linux has a root directory (/) at the base of the file system that contains other files and directories.
  • Each file or directory is uniquely identified by its name, the directory in which it resides, and a unique identifier, typically called an inode.
  • Everything in Linux is considered to be a file, including physical devices such as DVD-ROMs, USB devices, floppy drives, etc.

Types of files in Linux
Types of files:
  • Regular files: files containing normal data.
  • Directories: special files that contain lists of other files.
  • Special files:
    • Device files: file representing physical devices. Two types
      • Block devices – hardware devices like secondary memory that read data a block at a time
      • Character devices – devices which use streaming input/output
    • Links: a system to make a file or directory visible in multiple parts of the system’s file tree.
    • Named pipes: for Inter Process Communication (IPC) between process in same machine.
    • (Domain) sockets: special file type, for IPC between processes in different systems that are networked together.

passwd and shadow files
passwd files and shadow files are found in the /etc directory.
The /etc/passwd file holds information about each user account on the system, including Username, Hashed version of the login password, user ID, group ID, personal information and path to home directory and default shell of user.
A shadow file or shadow password file is a system file in which encrypted user password are stored so that they aren’t available to people who try to break into the system. It also holds the authentication mechanism.

inode
Every file has a unique identity called its inode (information node). The inode is a data structure in Linux file system that describes a file or a directory. Each inode stores the location(s) of the file / directory in the disk and its attributes including type, size, owner, access rights, last access time, modification time, file permissions, etc.

Scheduling algorithm is used in Linux OS
Completely Fair Scheduler (CFS) is a process scheduler which was merged into the 2.6.23 release of the Linux kernel in October 2007 and is the default scheduler. It handles CPU resource allocation for executing processes and aims to maximize overall CPU utilization while also maximizing interactive performance.

FAT file system is advantageous. Why?
Compare NTFS and FAT File systems.
FAT and NTFS are file systems i.e., a set of logical constructs that an operating system can use to track and manage files on a disk volume.
NTFS
FAT File Systems
Acronym
New Technology File System
File allocation Table File System
File Size
Between 4GB to 64 GB
Max 4GB
File Compression
Supports flexible per file compression
No such compression is supported
Activity Log
In case of any failure, the files and folders can be easily restored
In case of any failure, the files and folders are not recovered or restored
Data sharing – Cross compatability
It does not allow sharing data between different operating systems.
It allows sharing data between different operating systems.
Security
Provides complete security to files and folders in the system.
No security of files and folders in the system.
Supports file encryption (DESX, Triple DES and AES)
File encryption not supported
File access permissions – uses Access Control List (ACL)
Not implemented.
Overall Performance
Recoverability, encryption and compression are designed into NTFS in a way that’s transparent to the user
Both built-in security and recoverability are absent. File compression is not possible

Advantages of using kernel modules in Linux.
Kernel modules are used for implementing file-systems, device drivers and for adding new features into kernel. The new features can be dynamically linked either at boot time or run time. When new features are directly added to the kernel, it requires the kernel to be rebooted. Linking the services dynamically to the kernel is easier, since it does not require a reboot.
Advantages of kernel modules
  • Avoids rebuilding the full kernel when new modules are added.
  • Avoids rebooting the device for loading new modules
  • Saves RAM space by loading the modules at runtime when required.
  • Easier to identify and debug the errors in modules
  • Error in modules does not crash the entire system.

Caching-only servers and its functions
In Domain Name Servers, Caching-only servers are used by Administrators to reduce the load on authoritative servers. A caching server has no authority; it simply makes DNS work faster by storing the domain names it gets from authoritative servers and offering them to its clients.

Virtualization
Virtualization refers to one piece of hardware running multiple kernels on top of a lower layer of software that manages their access to the hardware. Each kernel, called a guest, acts as if it has the whole processor to itself. The different guests are isolated from each other. This isolation provides security and robustness, because a failure or compromise in one guest doesn’t affect the others.

Why virtualization is required?
Purpose of using virtualization.
Virtualization has the following benefits:
  • It replaces wasteful arrays of systems with fewer, better utilized systems.
  • It simplifies administration, because separate kernels with one application running on each are more secure and manageable than one kernel running many applications.
  • It also maintains the environment in which documents were created, to meet regulatory requirements.
  • Reduced hardware and complexity allows reduced staff
  • Virtualization may help reverse the trend of server sprawl.