Linux Cha-1
Linux Cha-1
As the name suggests, an operating system is a type of software without which you cannot operate or
run a computer. It acts as an intermediary or translation system between computer hardware and
application programs installed on the computer. In other words, you cannot directly use computer
programs with computer hardware without having a medium to establish a connection between them.
Besides this, it is also an intermediary between the computer user and the computer hardware as it
provides a standard user interface that you see on your computer screen after you switch on your
computer. For example, the Windows and the Mac OS are also operating systems that provide a
graphical interface with icons and pictures to enable users to access multiple files and applications
simultaneously.
So, although the operating system is itself a program or software, it allows users to run other programs
or applications on the system. We can say that is works behind the scenes to run your computer
Major Functions of Operating System:
Memory management:
It manages both the primary and secondary memory such as RAM, ROM, hard disk, pen drive, etc. It
checks and decides the allocations and deallocation of memory space to different processes. When a
user interacts with a system, the CPU is supposed to read or write operations, in this case, OS decides
the amount of memory to be allocated for loading the program instructions and data into RAM. After
this program is terminated, the memory area is again free and is ready to be allocated to other
programs by the OS.
Processor Management:
It facilitates processor management, where it decides the order for the processes to access the
processor as well as decides the processing time to be allocated for each process. Besides this, it
monitors the status of processes, frees the processor when a process is executed then allocates it to a
new process.
I/O management: It manages the input output devices and makes the I/O process smooth and effective. For example, it receives the
input provided by the user through an input device and stores it in the main memory. Then it directs the CPU to process this input and
accordingly provides the output through an output device such as a monitor.
Security: It has a security module to protect the data or information stored in the memories of the computer against malware and
unauthorized access. Thus, it not only manages your data but also helps to protect it.
Time Management: It helps CPU in time management. The Kernel OS keeps checking the frequency of processes that requests CPU
time. When two or more processes that are equally important compete for the CPU time, then the CPU time is sliced into segments
and allocated to these processes in a round-robin fashion to prevent a single process from monopolizing the CPU.
Deadlock Prevention: Sometimes a resource that is supposed to be shared by two or more processes is held by one process due to
which the resource cannot continue. This situation is known as deadlock. The OS does not let this situation arise by carefully
distributing the resources among the different processes.
Interrupt Handling: OS also responds to interrupts, which are signals generated by a program or a device to seek the attention of
the CPU. The OS checks the priority of the interrupt, and if it is more important than the currently running process, it stops the
execution of the current process and preserves this state of CPU then executes the requested process. Thereafter the CPU returns to
the same state where it was stopped.
Operating System Definition and Function
In the Computer System (comprises of Hardware and software), Hardware can only understand machine
code (in the form of 0 and 1) which doesn't make any sense to a naive user.
We need a system which can act as an intermediary and manage all the processes and resources
present in the system.
History of Linux
Evolution of Linux OS
The Linux OS was developed by Linus Torvalds in 1991, which sprouted as an idea to improve the
UNIX OS. He suggested improvements but was rejected by UNIX designers. Therefore, he thought of
launching an OS, designed in a way that could be modified by its users.
Nowadays, Linux is the fastest-growing OS. It is used from phones to supercomputers by almost all
major hardware devices.
Evolution of Computer
In earlier days, computers were as big as houses or parks. So you can imagine how difficult it was to
operate them. Moreover, every computer has a different operating system which made it completely
worse to operate on them. Every software was designed for a specific purpose and was unable to
operate on other computer. It was extremely costly and normal people neither can afford it nor can
understand it.
Evolution of Unix
In 1969, a team of developers of Bell Labs started a project to make a common software for all the
computers and named it as 'Unix'. It was simple and elegant, used 'C' language instead of assembly
language and its code was recyclable. As it was recyclable, a part of its code now commonly called
'kernel' was used to develop the operating system and other functions and could be used on different
systems. Also its source code was open source.
Initially, Unix was only found in large organizations like government, university, or larger financial
corporations with mainframes and minicomputers (PC is a microcomputer).
Unix Expansion
In eighties, many organizations like IBM, HP and dozen other companies started creating their own Unix.
It result in a mess of Unix dialects. Then in 1983, Richard Stallman developed GNU project with the goal
to make it freely available Unix like operating system and to be used by everyone. But his project failed
in gaining popularity. Many other Unix like operating system came into existence but none of them was
able to gain popularity
Evolution of Linux
In 1991, Linus Torvalds a student at the university of Helsinki, Finland, thought to have a freely available
academic version of Unix started writing its own code. Later this project became the Linux kernel. He
wrote this program specially for his own PC as he wanted to use Unix 386 Intel computer but couldn't
afford it. He did it on MINIX using GNU C compiler. GNU C compiler is still the main choice to compile
Linux code but other compilers are also used like Intel C compiler.
He started it just for fun but ended up with such a large project. Firstly he wanted to name it as 'Freax'
but later it became 'Linux'.
Basic feature of Linux OS Linux Features
Multiuser capability: Multiple users can access the same system resources like memory, hard disk,
etc. But they have to use different terminals to operate.
Multitasking: More than one function can be performed simultaneously by dividing the CPU time
intelligently.
Portability: Portability doesn't mean it is smaller in file size or can be carried in pen drives or
memory cards. It means that it support different types of hardware.
Security: It provides security in three ways namely authenticating (by assigning password and login
ID), authorization (by assigning permission to read, write and execute) and encryption (converts file
into an unreadable format).
Live CD/USB: Almost all Linux distros provide live CD/USB so that users can run/try it without
installing it.
Graphical User Interface (X Window system): Linux is command line based OS but it can be
converted to GUI based by installing packages.
Application support: It has its own software repository from where users can download and install
Components of Linux System
Linux Operating System has primarily three components
Kernel − Kernel is the core part of Linux. It is responsible for all major activities of this operating
system. It consists of various modules and it interacts directly with the underlying hardware. Kernel
provides the required abstraction to hide low level hardware details to system or application programs.
System Library − System libraries are special functions or programs using which application
programs or system utilities accesses Kernel's features. These libraries implement most of the
functionalities of the operating system and do not requires kernel module's code access rights.
System Utility − System Utility programs are responsible to do specialized, individual level tasks.
Kernel Mode vs User Mode
Kernel component code executes in a special privileged mode called kernel mode with full access to
all resources of the computer. This code represents a single process, executes in single address space
and do not require any context switch and hence is very efficient and fast. Kernel runs each processes
and provides system services to processes, provides protected access to hardware to processes.
Support code which is not required to run in kernel mode is in System Library. User programs and
other system programs works in User Mode which has no access to system hardware and kernel
code. User programs/ utilities use System libraries to access Kernel functions to get system's low
level tasks.
Architecture
The following illustration shows the architecture of a Linux system −
The architecture of a Linux System consists of the following layers −
•Hardware layer − Hardware consists of all peripheral devices (RAM/ HDD/ CPU etc).
•Kernel − It is the core component of Operating System, interacts directly with hardware,
provides low level services to upper layer components.
•Utilities − Utility programs that provide the user most of the functionalities of an operating systems.
Advantage of linux
1. Open Source
As it is open-source, its source code is easily available. Anyone having programming knowledge can
customize the operating system. One can contribute, modify, distribute, and enhance the code for any
purpose.
2. Security
The Linux security feature is the main reason that it is the most favorable option for developers. It is
not completely safe, but it is less vulnerable than others. Each application needs to authorize by the
admin user. The virus is not executed until the administrator provides the access password. Linux
systems do not require any antivirus program.
3. Free
Certainly, the biggest advantage of the Linux system is that it is free to use. We can easily download
it, and there is no need to buy the license for it. It is distributed under GNU GPL (General Public
License). Comparatively, we have to pay a huge amount for the license of the other operating
systems.
4. Lightweight
Linux is lightweight. The requirements for running Linux are much less than other operating systems.
In Linux, the memory footprint and disk space are also lower. Generally, most of the Linux
distributions required as little as 128MB of RAM around the same amount for disk space.
6. Performance
Linux system provides high performance over different networks. It is capable of handling a large
number of users simultaneously.
7. Flexibility
Linux operating system is very flexible. It can be used for desktop applications, embedded systems,
and server applications too. It also provides various restriction options for specific computers. We can
install only necessary components for a system.
8. Software Updates
In Linux, the software updates are in user control. We can select the required updates. There a large
number of system updates are available. These updates are much faster than other operating
systems. So, the system updates can be installed easily without facing any issue.
9. Distributions/ Distros
There are many Linux distributions available in the market. It provides various options and flavors of
Linux to the users. We can choose any distros according to our needs. Some popular distros
are Ubuntu, Fedora, Debian, Linux Mint, Arch Linux, and many more.
For the beginners, Ubuntu and Linux Mint would be useful and, Debian and Fedora would be good
choices for proficient programmers.
14. Privacy
Linux always takes care of user privacy as it never takes much private data from the user.
Comparatively, other operating systems ask for the user's private data.
15. Networking
Linux facilitates with powerful support for networking. The client-server systems can be easily set to
a Linux system. It provides various command-line tools such as ssh, ip, mail, telnet, and more for
connectivity with the other systems and servers. Tasks such as network backup are much faster than
16. Compatibility
Linux is compatible with a large number of file formats as it supports almost all file formats.
17. Installation
Linux installation process takes less time than other operating systems such as Windows. Further, its
installation process is much easy as it requires less user input. It does not require much more system
configuration even it can be easily installed on old machines having less configuration.
19. Multitasking
It is a multitasking operating system as it can run multiple tasks simultaneously without affecting the
system speed.
2) Linux Mint
Mint is based on Ubuntu and uses its repository software so some packages are common in both.
Earlier it was an alternative of Ubuntu because media codecs and proprietary software are included in
mint but was absent in Ubuntu. But now it has its own popularity and it uses cinnamon and mate
desktop instead of Ubuntu's unity desktop environment.
3) Debian
Debian has its existence since 1993 and releases its versions much slowly then Ubuntu and mint.
This makes it one of the most stable Linux distributor.
Ubuntu is based on Debian and was founded to improve the core bits of Debian more quickly and make
it more user friendly. Every release name of Debian is based on the name of the movie Toy Story.
4) Red Hat Enterprise / CentOS
Red hat is a commercial Linux distributor. There products are red hat enterprise Linux (RHEL) and
Fedora which are freely available. RHEL is well tested before release and supported till seven years
after the release, whereas, fedora provides faster update and without any support.
Red hat uses trademark law to prevent their software from being redistributed. CentOS is a
community project that uses red hat enterprise Linux code but removes all its trademark and make it
freely available. In other words, it is a free version of RHEL and provide a stable platform for a long
time.
5) Fedora
It is a project that mainly focuses on free software and provides latest version of software. It doesn't
make its own desktop environment but used 'upstream' software. By default it has GNOME3 desktop
environment. It Distribution
is less stable but providesWhy To Usestuff.
the latest
UBuntu It works like Mac OS and easy to use.
Linux mint It works like windows and should be use
by new comers.
Debian It provides stability but not
recommended to a new user.
Fedora If you want to use red hat and latest
software.
Red hat enterprise To be used commercially.