UNIT I LF
UNIT I LF
Definition:
An operating system (OS) is system software that manages computer hardware and software
resources, and provides common services for computer programs. It is responsible for the execution of
all the processes, Resource Allocation, CPU management, File Management and many other tasks.
Operating System is a type of software that works as an interface between the system program
and the hardware.The purpose of an operating system is to provide an environment in which a user can
execute programs in convenient and efficient manner.
This type of operating system does not interact with the computer directly. There is an operator which
takes similar jobs having the same requirement and groups them into batches. It is the responsibility of
the operator to sort jobs with similar needs.
Advantages of Batch Operating System
1) It is very difficult to guess or know the time required for any job to complete. Processors of the
batch systems know how long the job would be when it is in the queue.
2) Multiple users can share the batch systems.
3) The idle time for the batch system is very less.
4) It is easy to manage large work repeatedly in batch systems.
Disadvantages of Batch Operating System
1) The computer operators should be well known with batch systems.
2) Batch systems are hard to debug.
3) It is sometimes costly.
4) The other jobs will have to wait for an unknown time if any job fails.
Examples of Batch Operating Systems: Payroll Systems, Bank Statements, etc.
Multiprogramming Operating Systems can be simply illustrated as more than one program is present in
the main memory and any one of them can be kept in execution. This is basically used for better
execution of resources.
Multitasking Operating System is simply a multiprogramming Operating System with having facility of
a Round-Robin Scheduling Algorithm. It can run multiple programs simultaneously.
Each task is given some time to execute so that all the tasks work smoothly. Each user gets the time of
the CPU as they use a single system. These systems are also known as Multitasking Systems. The task
can be from a single user or different users also. The time that each task gets to execute is called
quantum. After this time interval is over OS switches over to the next task.
Advantages of Time-Sharing OS
1)Each task gets an equal opportunity.
2)Fewer chances of duplication of software.
3)CPU idle time can be reduced.
4)Resource Sharing: Time-sharing systems allow multiple users to share hardware resources such as the
CPU, memory, and peripherals, reducing the cost of hardware and increasing efficiency.
5)Improved Productivity: Time-sharing allows users to work concurrently, thereby reducing the waiting
time for their turn to use the computer. This increased productivity translates to more work getting done
in less time.
6)Improved User Experience: Time-sharing provides an interactive environment that allows users to
communicate with the computer in real time, providing a better user experience than batch processing.
Disadvantages of Time-Sharing OS
1)Reliability problem.
2)One must have to take care of the security and integrity of user programs and data.
3)Data communication problem.
4)High Overhead: Time-sharing systems have a higher overhead than other operating systems due to the
need for scheduling, context switching, and other overheads that come with supporting multiple users.
5)Complexity: Time-sharing systems are complex and require advanced software to manage multiple
users simultaneously. This complexity increases the chance of bugs and errors.
6)Security Risks: With multiple users sharing resources, the risk of security breaches increases. Time-
sharing systems require careful management of user access, authentication, and authorization to ensure
the security of data and software.
The Distributed Operating system is not installed on a single machine, it is divided into parts, and these
parts are loaded on different machines. A part of the distributed Operating system is installed on each
machine to make their communication possible. Distributed Operating systems are much more complex,
large, and sophisticated than Network operating systems because they also have to take care of varying
networking protocols.
These systems run on a server and provide the capability to manage data, users, groups, security,
applications, and other networking functions. These types of operating systems allow shared access to
files, printers, security, applications, and other networking functions over a small private network. One
more important aspect of Network Operating Systems is that all the users are well aware of the
underlying configuration, of all other users within the network, their individual connections, etc. and
that’s why these computers are popularly known as tightly coupled systems.
Advantages of Network Operating System
1)Highly stable centralized servers.
2)Security concerns are handled through servers.
3)New technologies and hardware up-gradation are easily integrated into the system.
4)Server access is possible remotely from different locations and types of systems.
These types of OSs serve real-time systems. The time interval required to process and respond to inputs
is very small. This time interval is called response time.
Real-time systems are used when there are time requirements that are very strict like missile systems, air
traffic control systems, robots, etc.
Types of Real-Time Operating Systems
a)Hard Real-Time Systems:
Hard Real-Time OSs are meant for applications where time constraints are very strict and even the
shortest possible delay is not acceptable. These systems are built for saving life like automatic parachutes
or airbags which are required to be readily available in case of an accident. Virtual memory is rarely
found in these systems.
b)Soft Real-Time Systems:
These OSs are for applications where time-constraint is less strict.
Advantages of Real-time operating system:
1) Easy to layout, develop and execute real-time applications under the real-time operating system.
2) In a Real-time operating system, the maximum utilization of devices and systems.
DOS: DOS stands for Disk Operating System, which is an operating system that was popular till 1995
in IBM PCs. It is a single-tasking OS i.e., it can perform one task at a time. It is based on a command-
line interface where one has to provide instructions to the computer in the command form. It runs from
hard disks, floppy disks, or any other storage devices and thus provides an environment for the execution
of programs. It occupies less memory. To use more than 64kb of memory, memory extenders were used,
which older Windows used to use more memory. It was originally released only to OEMs(Original
Equipment Manufacturers) who added support for their hardware. It was eventually released to the
public.
Windows: Windows is a product of Microsoft. It is an operating system with various versions. It is
a Graphics-Based user interface. Users give commands through clicking or choosing icons and images
with the help of a mouse, keyboard, or touchscreen to the computer. Windows was originally a DOS
extender running on top of DOS. The Windows 9x family consisting of Windows 95, Windows 98,
Windows 98SE, and Windows ME ran on top of MS-DOS and is capable of running DOS programs
directly. Windows NT was released separately and is portable, and initially, it was written
in C and C++ languages where processor reliability code is separated into DAL and HLL and was
designed to be more secure than DOS and the Windows 9x family. The Windows NT family includes
Windows NT 3.x,4.x, Windows 2000, Windows XP, Windows Vista, Windows 7, and so on. Windows is
more reliable than DOS and handles errors with ease due to various tools available for debugging and
error handling.
Linux: Linux is a freely distributed multitasking and multi-user operating system that behaves like
UNIX. It was originally developed by a Finnish student, LINUS TORVALDS in 1991. It is the best
known and most commonly used open-source operating system. It is a cross-platform operating system
based on UNIX that can be installed on PCs and laptops.
MAC OS:macOS originally Mac OS X, previously shortened as OS X, is an operating system
developed and marketed by Apple Inc. since 2001.It is Apple's proprietary, Unix-based operating
system.It provides a sleek and intuitive user interface, seamless integration with other Apple
devices,and a robust ecosystem of software applications.
Android:Android is a mobile operating system based on a modified version of the Linux kernel and other
open-source software, designed primarily for touchscreen mobile devices such as smartphones and tablets.
Android is developed by a partnership of developers known as the Open Handset Alliance and
commercially sponsored by Google. It was disclosed in November 2007, with the first commercial Android
device, the HTC Dream, launched in September 2008. It is free and open-source software.
Reliability DOS is not very Windows is not even Linux is very reliable and is
reliable because it reliable, with it known for being run for months
crashes easily if a crashing/needing to be or even years without needing to
Feature DOS WINDOWS LINUX
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'.
He published the Linux kernel under his own license and was restricted to use as commercially. Linux uses
most of its tools from GNU software and are under GNU copyright. In 1992, he released the kernel under
GNU General Public License.
Linux Today
Today, supercomputers, smart phones, desktop, web servers, tablet, laptops and home appliances like
washing machines, DVD players, routers, modems, cars, refrigerators, etc use Linux OS.
o Multiuser capability: Multiple users can access the same system resources like memory, hard disk,
etc. But they have to use different terminals to operate.
o Multitasking: More than one function can be performed simultaneously by dividing the CPU time
intelligently.
o 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.
o 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).
o Live CD/USB: Almost all Linux distros provide live CD/USB so that users can run/try it without
installing it.
o Graphical User Interface (X Window system): Linux is command line based OS but it can be
converted to GUI based by installing packages.
o Support's customized keyboard: As it is used worldwide, hence supports different languages
keyboards.
o Application support: It has its own software repository from where users can download and install
many applications.
o File System: Provides hierarchical file system in which files and directories are arranged.
o Open Source: Linux code is freely available to all and is a community based development project.
Advantages:
1)Open source software: The Linux kernel is released under the GNU GPL open source
software license. Most distros include hundreds of applications, with many options in almost
every category. Many distributions also include proprietary software, such as device drivers
provided by manufacturers, to support theirhardware.
2)Licensing costs: Unlike Microsoft Windows or Apple macOS, Linux has noexplicit licensing
fees. While system support is available for a fee from many Linuxvendors, the OS itself is free to
copy and use. Some IT organizations have increased their savings by switching their server
software from a commercial OS to Linux.
3)Reliability: Linux is considered a reliable OS and is well-supported with security patches.
Linux is also considered to be stable, meaning it can run in most circumstances. Linux also copes
with errors when running software and unexpectedinput.
4)Backward compatibility: Linux and other open source software tend to be updated frequently
for security and functional patches, while retaining core functionality. Configurations and shell
scripts are likely to work unchanged even when softwareupdates are applied. Unlike commercial
software vendors that roll out new versionsof their OSes along with new ways to work, Linux and
open source applications generally don't change their modes of operation with new releases.
5)Many choices: Between the hundreds of available distributions, thousands ofapplications and
almost infinite options for configuring, compiling and running Linux on almost any hardware
platform, it is possible to optimize Linux for almostany application.
Disadvantages:
1)Lack of established standard:No standard version is available for Linux, which may be nice to
optimize Linux for specific applications, but less so to deploy desktop images and standardized servers.
The huge variety of options can convolute support as an outcome.
2)Support costs: While an organization can acquire Linux freely without licensing fees, support
is not free. Most enterprise Linux distributors like SUSE and Red Hat offer support contracts.
Depending on the circumstances, these license fees can reduce savings significantly.
3)Proprietary software: Desktop productivity software like Microsoft Office cannot be used on
Linux desktops, and other proprietary software may be unavailable for Linux platforms.
4)Unsupported hardware: While many hardware manufacturers make Linux device drivers
available for their products, many do not.
5)Steep learning curve: Many users struggle to learn to use the Linux desktop or Linux-based
applications.
In some cases, the same Linux attribute can be either an advantage or disadvantage. For example,
having many options for customizing the Linux OS is advantageous for manufacturers looking
for an embedded OS, but it is a disadvantage for enterprises that want a desktop OS that can be
used by a wide range of end users.
Q.7. Explain architecture of Linux OS / Explain Linux kernal. Illustrate it in Linux architecture.
The main components of Linux operating system are: Application, Shell, Kernel, Hardware, Utilities
The Linux operating system's architecture mainly contains some of the components: the Kernel, System
Library, Hardware layer, System, and Shell utility.
1. Kernel:- The kernel is one of the core section of an operating system. It is responsible for each of the
major actions of the Linux OS. This operating system contains distinct types of modules and cooperates
with underlying hardware directly. The kernel facilitates required abstraction for hiding details of low-level
hardware or application programs to the system. There are some of the important kernel types which are
mentioned below:
a) Monolithic Kernel:
Monolithic kernel is a type of operating system kernel, where all the concurrent processes are executed
simultaneously in the kernel itself. All the processes share same memory recourses.
b) Micro kernel:
In micro kernel ,user services and kernel services are executed in separate address spaces. User services are kept in
user address space and kernel services are kept in kernel address space.
c) Exokernel:
Exo-kernel is designed to manage hardware resources at application level. High level abstraction is used in this
operating system to offer hardware resources access to kernel.
d) Hybrid kernel:
It is the combination of both monolithic kernel and microkernel. It has speed and design of monolithic kernel and
modularity and stability of microkernel.
a) Process scheduler: Responsible for fairly distributing the processing time among all the
concurrently running process.
b) Memory management unit: This kernel sub unit is responsible for proper distribution of
memory resources among the concurrently running process.
c) Virtual file system: This subsystem provides interface to access stored dataacross different
file system and different physical media.
Kernel subsystems
2. System Library:
System libraries are some predefined functions by using which any application programs or system utilities can
access kernel’s features. These libraries are the foundation upon which any software can be built. Some of the most
common system libraries are:
a) GNU C library: This is the C library that provides the most fundamental system for the interface and execution
of C programs. This provides may in-built functions for the execution.
b) libpthread (POSIX Threads): This library plays important role for multithreading in Linux, it allows users for
creating and managing multiple threads.
c) libdl (Dynamic Linker): This library is responsible for the loading and linking file at the runtime.
d) libm (Math Library): This library provides user with all kind of mathematical function and their execution.
Some other system libraries are: librt (Realtime Library), libcrypt (Cryptographic Library), libnss (Name Service
Switch Library), libstdc++ (C++ Standard Library)
3. Shell:
Shell can be determined as the interface to the kernel, which hides the internal execution of functions of kernel from
the user. Users can just enter the commend and using the kernel’s function that specific task is performed
accordingly.
4. Hardware Layer:
Hardware layer of Linux is the lowest level of operating system track. It plays a vital role in managing all the
hardware components. It includes device drivers, kernel functions, memory management, CPU control, and I/O
operations. This layer generalizes hard complexity, by providing an interface for software by assuring proper
functionality of all the components.
5. System utility:
System utilities are the command line tools that preforms various tasks provided by user to make system
management and administration better. These utilities enable user to perform different tasks, such as file
management, system monitoring, network configuration, user management etc.
A Linux distribution is an OS made through a software collection that contains the Linux kernel and a
package management system often.There are around 600 distributions available.
Some Linux distributions are: MX Linux, Manjaro, Linux Mint, elementary, Ubuntu, Debian, Solus,
Fedora, openSUSE, Deepin
1 ) Ubuntu
It came into existence in 2004 by Canonical and quickly became popular. Canonical wants Ubuntu to be
used as easy graphical Linux desktop without the use of command line. It is the most well known Linux
distribution. Ubuntu is a next version of Debian and easy to use for newbies. It comes with a lots of pre-
installed apps and easy to use repositories libraries.
Earlier, Ubuntu uses GNOME2 desktop environment but now it has developed its own unity desktop
environment. It releases every six months and currently working to expand to run on tablets and
smartphones.
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.
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.
Red hat is a commercial Linux distributor. The open-source alternative to Microsoft’s systems, Red Hat
Enterprise Linux is one of the biggest open-source alternatives. It’s used by large corporations as a Linux
distribution. The stability and security patches that accompany Red Hat Enterprise Linux make it a popular
choice in server environments.
5) CentOS
The purpose of the CentOS Project is to create an open source operating environment that is sturdy and
reliable. Based on RHEL, it is an excellent alternative to Red Hat Enterprise Linux since it is free to
download and install. With the stability and reliability of RHEL, users can enjoy free security and feature
upgrades without experiencing any downtime. Linux enthusiasts who desire to enjoy the advantages of
RHEL’s RHEL are keen on CentOS 8.
Centos 8.2, the third revision of CentOS, is based on App stream and BaseOS repositories and includes the
most recent software packages such as Python 3.8, GCC 9.1, Maven 3.6, and others.
6) 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 is less stable but provides the latest stuff.
7) Gentoo
Gentoo is a Linux distribution specifically built for experts. It includes developers, network administrators,
and other experts. Users who are just beginning to learn Linux would not enjoy using it. One of the reasons
Gentoo is recommended is that it offers more information about Linux than other Linux distributions.
Portage, which is present on every Gentoo distribution, is likewise a native element of other similar
organizations such as Sabayon and Calculate Linux, as well as of Gentoo itself. The port collections
concept, which is based on the ports’ collections, is Python-based and draws inspiration from Portage.
BSD-based distros such as OpenBSD and NetBSD provide Port collections.
8) Kali Linux
Kali Linux is a Debian-based Linux distribution designed for digital forensics and penetration testing.
Nmap, Metasploit Framework, Maltego, and Aircrack-ng, among other tools, are included by default. It is
developed and maintained by offensive security.
Penetration testers who wish to advance their skills in Kali Linux can take advantage of this Linux
distribution. Kali Linux Certified Professional and Penetration Testing with Kali are industry-standard
certifications that are provided by Kali Linux.
9) Arch Linux
Arch Linux is a versatile and powerful Linux distribution for advanced users and Linux experts. It offers
freedom to choose, providing an ideal environment for customization or configuration. In all, Arch is
geared towards individuals who are well-versed in Linux’s intricacies and capabilities.
Arch is a constant update that constantly receives the most recent version of software and is managed using
Pacman. The AUR (Arch User Repository) is used to obtain the latest version of software. There are two
methods to install software packages and 2020.09.01 is the current version.
10) OpenSUSE
The OpenSUSE project aims to be a modern and complete community project. Because it is intended for
desktop users as well as enterprise development and testing, it is a perfect choice for open source
developers and System administrators.
SUSE Tumbleweed, on the other hand, is a rolling-release distribution that includes the latest software
stacks and IDEs and is closest to a bleeding-edge distribution. The Nest Intelligence Suite is a power user’s
or software developer’s dream thanks to the availability of up-to-date packages such as office applications,
GCC compiler, and the kernel.
Ubuntu is a popular, Linux-based, open-source operating system. In this Ubuntu installation guide, we will
explore how to install Ubuntu Desktop from scratch, either to replace or alongside your current operating
system.
Millions of laptops and PCs use the Ubuntu Desktop operating system, which comes pre-installed with an
office suite, browser, media, and email apps, among others. Ubuntu Desktop is feature-rich, free, easy to
install, customizable, and user friendly.
You can install Ubuntu on a computer running Windows, macOS, or FreeDOS. The process is pretty
similar across operating systems. In this guide, we’ll demonstrate how to install Ubuntu Desktop on a
Windows device.
Ubuntu works on almost all desktops and laptops, but works best on Ubuntu certified hardware which
meets or exceeds these minimum system requirements.
While the Ubuntu ISO image is still downloading, go to the UNetbootin page and download and install the
appropriate tool for your operating system. Skip this step if you prefer to install Ubuntu via a DVD instead
of a USB flash drive.
If you’re using a DVD, you can burn the Ubuntu ISO image onto it using the built-in burner in your
Windows 7, 8, 10, or 11 computer. Alternatively, you can download a third-party CD/DVD burner, like
BurnAware or DeepBurner Free.
The process will start immediately and will take a few minutes to go through the four stages of flashing.
Once completed, click Exit. Whichever USB flashing tool you use, ensure that you format the USB flash
drive for FAT-32 (Windows.)
If you encounter a “write protected flash drive” error, use the SD Formatter tool to reformat the USB drive.
Then try again to create the live, bootable USB drive, but this time, with a different flashing tool.
If using a DVD, insert the blank DVD into your computer’s DVD drive, right-click the Ubuntu ISO file,
click Burn disc image, select the appropriate drive from the Disc burner drop-down, and click Burn.