Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
38 views77 pages

Unit 2

Uploaded by

0176rahulsharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views77 pages

Unit 2

Uploaded by

0176rahulsharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 77

www.universitystudy.

in

in
y.
Orientation to Computing-I

ud
st
ty
si
er
iv

L T P :2 0 0
un

www.lpu.in Lovely Professional University


www.universitystudy.in
1
www.universitystudy.in

Unit-2 (Operating System)

in
• Operating System: Operating Systems and its components, Windows

y.
Operating Systems Versions and features, Installation process,

ud
Directory Hierarchy of Windows Operating System (single level and

st
multiple level), Bootloader

ty
• Linux Operating System: Linux OS and its features, Distribution
si
er
versions, installation process, Directory Hierarchy of Linux System
iv
(single level and multiple level). Partitions: Understanding disk
un

partitions and obtaining partition information using system tools,


Comparison of windows and Linux OS, Virtual Machines

www.lpu.in Lovely Professional University


www.universitystudy.in
2
www.universitystudy.in

What is an Operating System?


• What is an Operating system?
– A program that acts as an intermediate/ interface between a user of a
computer and the computer hardware.
– Resource allocator (Managing the resources efficiently)

in
– Control Program

y.
ud
• Operating system goals:

st
– Execute user programs and make problem solving easier.

ty
– Make the computer system convenient to use
si
– Efficiently use available resources
er
iv
un

• An operating system is the one program that is running at all the times on
the computer- usually called the kernel.
• Kernel is a program that (allow) let the hardware to recognize and read the
program/process.

www.lpu.in Lovely Professional University


www.universitystudy.in
Computer System Structure
www.universitystudy.in

• Computer system can be divided into four components:

in
– Hardware – provides basic computing resources

y.
• CPU, memory, I/O devices

ud
– Operating system

st
• Controls and coordinates use of resources among various applications

ty
and users

si
– System/Application programs – define the ways in which the system
er
resources are used to solving user problems
iv
• Word processors, compilers, web browsers, database systems, video
un

games
– Users
• People, machines, other computers

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Four Components of a Computer System

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
Computer System Organization
www.universitystudy.in

• Computer-system operation
– One or more CPUs, device controllers connect through common bus providing

in
access to shared memory

y.
– Concurrent execution of CPUs and devices competing for memory cycles

ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Components of Operating System

1. Process Management

in
2. File Management

y.
ud
3. Network Management

st
4. Main Memory Management

ty
si
5. Secondary Storage Management
er
6. I/O Device Management
iv
un

7. Security Management
8. Command Interpreter System

www.lpu.in Lovely Professional University


www.universitystudy.in
7
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
8
www.universitystudy.in

Process Management

• The process management component is a procedure for managing many processes


running simultaneously on the operating system. Every running software
application program has one or more processes associated with them.

in
y.
• For example, when you use a search engine like Chrome, there is a process running

ud
for that browser program.

st
ty
• Process management keeps processes running efficiently. It also uses memory

si
allocated to them and shutting them down when needed.
er
iv
• The execution of a process must be sequential so, at least one instruction should be
un

executed on behalf of the process.

www.lpu.in Lovely Professional University


www.universitystudy.in
9
www.universitystudy.in

Functions of process management

• Here are the following functions of process management in the operating system,
such as:

in
Process creation and deletion.

y.
ud
• Suspension and resumption.

st
• Synchronization process

ty
si
er
• Communication process
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
10
www.universitystudy.in

Process creation
• This is the initial stage of a process where it is

created and initiated. It may involve setting

in
y.
up the necessary resources, data structures,

ud
and environment for the process to run.

st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
11
www.universitystudy.in

Running
• This is the active execution phase of the

process, where it performs its intended tasks

in
y.
and operations. The process is actively using

ud
system resources and making progress toward

st
its goals during this stage.

ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
12
www.universitystudy.in

Preempted
• In some cases, a running process may be

temporarily paused or preempted by the

in
y.
operating system or another higher-priority

ud
process. This typically occurs in multitasking

st
or multi-process environments, where the

ty
si
CPU is shared among multiple processes.
er
Preemption allows other processes to run for
iv
un

a while before returning to the paused


process.
www.lpu.in Lovely Professional University
www.universitystudy.in
13
www.universitystudy.in

Stopped/Terminated
• Normal Completion: The process completes

its tasks successfully and voluntarily exits.

in
y.
• Error or Exception: The process encounters

ud
an error or exception that causes it to

st
terminate prematurely.

ty
si
• Forced Termination: The process may be
er
iv
forcibly terminated by the operating system
un

or an administrator due to resource


constraints, security issues, or other reasons.
www.lpu.in Lovely Professional University
www.universitystudy.in
14
www.universitystudy.in

Suspended
• Some systems allow processes to be
suspended, which means they are

in
y.
temporarily paused but not terminated. A

ud
suspended process can later be resumed

st
from where it left off.

ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
15
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
16
www.universitystudy.in

• File Management
• A file is a set of related information defined by its creator. It
commonly represents programs (both source and object forms)
and data. Data files can be alphabetic, numeric, or
alphanumeric.

in
y.
• Function of file management

ud
• The operating system has the following important activities in

st
connection with file management:

ty
• File and directory creation and deletion.
si
er
• For manipulating files and directories.
iv

• Mapping files onto secondary storage.


un

• Backup files on stable storage media.

www.lpu.in Lovely Professional University


www.universitystudy.in
17
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
18
www.universitystudy.in

• Network Management
• Network management is the process of administering and managing
computer networks. It includes performance management,
provisioning of networks, fault analysis, and maintaining the quality
of service.

in
• A distributed system is a collection of computers or processors that

y.
never share their memory and clock.

ud
• In this type of system, all the processors have their local memory,

st
and the processors communicate with each other using different

ty
communication cables, such as fibre optics or telephone lines.
si
er
• The computers in the network are connected through a
iv
communication network, which can configure in many different
un

ways.
• The network can fully or partially connect in network management,
which helps users design routing and connection strategies that
overcome connection and security issues.
www.lpu.in Lovely Professional University
www.universitystudy.in
19
www.universitystudy.in

• Functions of Network management

• Distributed systems help you to various computing resources in size


and function. They may involve minicomputers, microprocessors,
and many general-purpose computer systems.

in
y.
• A distributed system also offers the user access to the various

ud
resources the network shares.

st
• It helps to access shared resources that help computation to speed up

ty
or offers data availability and reliability.

si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
20
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
21
www.universitystudy.in

• Main Memory management


• Main memory is a large array of storage or bytes, which has an
address.
• The memory management process is conducted by using a sequence
of reads or writes of specific memory addresses.

in
y.
• It should be mapped to absolute addresses and loaded inside the

ud
memory to execute a program. The selection of a memory
management method depends on several factors

st
ty
• However, it is mainly based on the hardware design of the system.

si
Each algorithm requires corresponding hardware support.
er
• Main memory offers fast storage that can be accessed directly by the
iv
CPU. It is costly and hence has a lower storage capacity. However,
un

for a program to be executed, it must be in the main memory.

www.lpu.in Lovely Professional University


www.universitystudy.in
22
www.universitystudy.in

• Functions of Memory management

• An Operating System performs the following functions for Memory


Management in the operating system:

in
• It helps us to keep track of primary memory.

y.
• Determine what part of it are in use by whom, what part is not in

ud
use.

st
• In a multiprogramming system, the OS decides which process will

ty
get memory and how much.

si
Allocates the memory when a process requests.
er

iv
It also de-allocates the memory when a process no longer requires or
un

has been terminated.

www.lpu.in Lovely Professional University


www.universitystudy.in
23
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
24
www.universitystudy.in

• Secondary-Storage Management
• The most important task of a computer system is to execute programs.
These programs help you to access the data from the main memory during
execution.
• This memory of the computer is very small to store all data and programs

in
permanently. The computer system offers secondary storage to back up the

y.
main memory.

ud
• Today modern computers use hard drives/SSD as the primary storage of

st
both programs and data.
• However, the secondary storage management also works with storage

ty
si
devices, such as USB flash drives and CD/DVD drives.
er
• Programs like assemblers and compilers are stored on the disk until it is
iv
loaded into memory, and then use the disk is used as a source and
un

destination for processing.

www.lpu.in Lovely Professional University


www.universitystudy.in
25
www.universitystudy.in

• Functions of Secondary storage management


Here are some major functions of secondary storage management in the
operating system:

• Storage allocation

in
y.
• Free space management

ud
st
• Disk scheduling

ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
26
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
27
www.universitystudy.in

• I/O Device Management


• One of the important use of an operating system that helps to
hide the variations of specific hardware devices from the user.
• Functions of I/O management

in
• The I/O management system offers the following functions,

y.
ud
such as:

st
• It offers a buffer caching system

ty
• It provides general device driver code
si
• It provides drivers for particular hardware devices.
er
iv
• I/O helps you to know the individualities of a specific device.
un

www.lpu.in Lovely Professional University


www.universitystudy.in
28
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
29
www.universitystudy.in

• Security Management
• The various processes in an operating system need to be secured from other
activities.
• Therefore, various mechanisms can ensure those processes that want to

in
operate files, memory CPU, and other hardware resources should have

y.
proper authorization from the operating system.

ud
• Security refers to a mechanism for controlling the access of programs,
processes, or users to the resources defined by computer controls to be

st
imposed, together with some means of enforcement.

ty
• For example, memory addressing hardware helps to confirm that a process
si
er
can be executed within its own address space.
iv
• The time ensures that no process has control of the CPU without
un

renouncing it.

www.lpu.in Lovely Professional University


www.universitystudy.in
30
www.universitystudy.in

• Security Management
• No process is allowed to do its own I/O, which helps you to keep the
integrity of the various peripheral devices.
• Security can improve reliability by detecting latent errors at the interfaces

in
between component subsystems.

y.
• Early detection of interface errors can prevent the foulness of a healthy

ud
subsystem by a malfunctioning subsystem.
• An unprotected resource can be misused by an unauthorized or

st
ty
incompetent user.

si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
31
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
32
www.universitystudy.in

• Command Interpreter System


• One of the most important components of an operating system is its
command interpreter. The command interpreter is the primary interface
between the user and the rest of the system.
• Many commands are given to the operating system by control statements.

in
A program that reads and interprets control statements is automatically

y.
executed when a new job is started in a batch system or a user logs in to a

ud
time-shared system. This program is variously called:

st
• The control card interpreter,

ty
• The command-line interpreter,

si
• The shell (in UNIX), and so on.
er
• Its function is quite simple, get the next command statement, and execute
iv
it. The command statements deal with process management, I/O handling,
un

secondary storage management, main memory management, file system


access, protection, and networking.

www.lpu.in Lovely Professional University


www.universitystudy.in
33
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
34
www.universitystudy.in

Windows Operating Systems


Versions and features

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
35
www.universitystudy.in

• 1. Windows 1.0
• It was released on November 20, 1985
• Pure Operating Environment
• Used Graphical User Interface

in
• Simple Graphics

y.
• Offered limited multi-tasking was expected to have a better future potential

ud
• 2. Windows 2.0

st
• It was released on December 9, 1987

ty
• 16-bit Graphic User Interface (GUI) based operating environment

si
Introduced Control Panel, and the first version of MS Word and Excel
er
• Unlike Windows 1.0, it had the capacity to allow applications to overlap
iv

each other
un

• It was also the last Windows OS which did not require a hard disk
• Hardware played an important role

www.lpu.in Lovely Professional University


www.universitystudy.in
36
www.universitystudy.in

• 3. Windows 3.0
• It was released in 1990
• It was better at multitasking
• Used 8086 microprocessors

in
• It has both, conventional and extendable memory

y.
• First version of Windows to gather critical appreciation

ud
• Better memory/ storage

st
• Note* – None of the above mentioned Windows was Operating Systems.

ty
They all came under the category of Windows, working based on a
si
graphical operating environment. It was Windows 95, which was the first
er
Operating System released by Microsoft.
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
37
www.universitystudy.in

• 4. Window 95
• It was the first complete Operating System
• It was released on August 15, 1995
• It merged MS-DOS and Windows products

in
• It simplified plug and play features

y.
• Taskbar and Start menu was introduced with this Windows OS

ud
• Advanced from 16 bit GUI to 32 bit GUI

st
• Long file names could be saved

ty

si
Initially, computers with Windows 95 did not have Internet Explorer
er
installed but by the release date of Windows 95, the first version of Internet
Explorer was installed in the software
iv
un

• On December 31, 2001, Windows declared this version of OS outdated and


ended its support for the same

www.lpu.in Lovely Professional University


www.universitystudy.in
38
www.universitystudy.in

• 5. Windows 98
• It was released to manufacturing on May 15, 1998
• It was a 16 bit and 32 bit product based on MS DOS
• It was not an entirely new version but just a tuned-up version to Windows

in
95

y.
• Internet Explorer 4.01 was released along with this Windows version

ud
• It did not support USB printers or mass storage devices

st
• An update to this version “Windows SE” was released in 1999

ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
39
www.universitystudy.in

• 6. Windows 2000
• It was officially released on February 17, 2000. However, its
manufacturing had begun in late 1999
• A core set of features was followed for manufacturing

in
y.
Windows 2000 but 4 different editions, targeting different

ud
sectors of the market were released. These included: Server,

st
Professional, Advanced Server and Datacenter Server

ty
• It was considered as one of the most secure OS ever
si
• A local disk manager was introduced with these Windows
er
iv
• Multilingual User Interface – it supported many different
un

languages

www.lpu.in Lovely Professional University


www.universitystudy.in
40
www.universitystudy.in

• 7. Windows XP
• While the manufacturing started on August 24, 2001, the official product
was released on October 25, 2001
• Advanced portable PC support
• Automatic wireless connection support

in
y.
• Fast start-up

ud
• Better Graphical User Interface (GUI)

st
• Help and support centre

ty
• 8. Windows Vista

si
• It was released on January 30, 2007
er
• It had an upgraded version of Graphical User Interface
iv

• It was the first operating system to use DVD-ROM for installation


un

www.lpu.in Lovely Professional University


www.universitystudy.in
41
www.universitystudy.in

• 9. Windows 7
• It was released on October 22, 2009
• A large number of new features were introduced
• Redesigned Windows shell with an updated taskbar
• Incremental upgrade to the Windows line

in
• Libraries were added in the file management system

y.

ud
A few features from the past Windows were removed
• Extended hardware support

st

ty
10. Windows 8

si
• It was released for retail on October 26, 2012
er
• Optimisations for touch-based. Installed in new devices like Laptops,
iv
Mobile phones, tablets, etc.
un

• Increased integration with cloud services. Windows Store service for


software distribution. Task manager had been redesigned
• New security features were introduced
• Online Applications could be directly downloaded

www.universitystudy.in
www.lpu.in Lovely Professional University
42
www.universitystudy.in

• 11. Windows 10
• It was released on July 29, 2015
• Addresses shortcomings in the user interface first introduced
with Windows 8

in
• A virtual desktop system

y.
ud
• It had the ability to run windows store apps within windows on

st
the desktop rather than in the full-screen mode

ty
• Included new icons
si
• To reduce storage shortcomings, Windows 10 automatically
er
iv
compresses the file size
un

www.lpu.in Lovely Professional University


www.universitystudy.in
43
www.universitystudy.in

Installation process

1. Set up the display environment

in
2. Erase the primary boot disk

y.
3. Set up the BIOS

ud
4. Install the operating system

st
ty
5. Install the operating system, update the drivers, and run

si
operating system updates, as necessary.
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
44
www.universitystudy.in

Directory Structure
• Symbol table of files that stores all related information about a
file it holds with its contents

in
y.
ud
Director
y

st
ty
si
er
F F F
F
iv
1 2 4 F
File 3
un

n
s

Both the directory structure and the files reside on disk


Backups of these two structures are kept on tapes
www.universitystudy.in
www.lpu.in Lovely Professional University
www.universitystudy.in

Operations Performed on Directory


Directory: collection of files or directories
• A Symbol Table that translates file names into their directory

in
entry.

y.
ud
Operations:

st
• Search for a file

ty
• Create a file
si
er
• Delete a file
iv
• List a directory
un

• Rename a file
• Traverse the file system : Search all directories/ sub directories
and files

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Directory Schemes
1. Single Level Directory
One directory many files

in
y.
ud
Single-Level Directory

st
ty
si
er
Easy to support and understand.
iv
Disadvantage:
Limitation:
un

1.When
Difficult to remember
number of filesthe name of or
increases files whenthe
when filessystem
increases
has
2.more
Single directory
than for allthen
one user, usersNaming problem occurs. All files
3.should have created
File names unique bynames.
different users should be different.

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Two Level
• 2. Two level directory, each user has his own user file
directory(UFD).

in
• UFDs have the similar structure, but each lists only the files of a single

y.
user.

ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Tree Structure
• Users can create their sub directories to manage the files.
• Tree has Root directory and files have unique file names

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Acyclic-Graph Directories

• Multiple users can Have shared subdirectories and files


• Users have their own working directory and may have

in
one shared directory

y.
• Shared subdirectory created by one user in one directory is

ud
automatically visible to all users sharing that directory.

st
• Shared directory or file may exist at multiple places

ty
si
simultaneously er
• Because of sharing, a file may have multiple absolute
iv
paths
un

• So different names can refer to same file

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Acyclic-Graph Directories

in
y.
ud
st
ty
si
er
iv
un

Directory Structure

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

General Graph Directories


• In this type of structure, the users are free to create
directories under the root directory along with creating
sub-directories under the same structure which can also

in
hold true if the users want to create multiple sub-

y.
directories that is, the users are free to create different

ud
sub-directories for different file types.

st
• The General Graph directory structure allows the cycle or

ty
creation of a directory within a directory.
si
• This directory structure is known to be a flexible version
er
compared to other directory structures.
iv

• Users have the capability to create a cycle of the directory


un

within a directory where we have the power to derive the


various directories with the help of more than one parent
directory in operating systems.
www.lpu.in Lovely Professional University
www.universitystudy.in
www.universitystudy.in

General Graph Directories


• As this directory structure allows the creation of multiple
sub-directories a lot of garbage collection can be required.
• If compared to the other directory structure in OS the

in
General Graph directory structure is a costly structure to

y.
be chosen.

ud
• The Absolute Path: Here, the path of the desired files

st
can be determined by considering the root directory as the

ty
base directory.
si
• The Relative Path: Here, the path of the desired files can
er
be determined by two choices that are, either the file
iv

which needs to be retrieved from its directory is


un

considered the base directory or the user’s directory is


considered as the base directory.

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

General Graph Directories

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Directory Implementation
• Directories need to be fast to search, insert, and delete, with a minimum of
wasted disk space.
1 Linear List
• A linear list is the simplest and easiest directory structure

in

y.
Finding a file requires a linear search.

ud
• Deletions can be done by moving all or one entry to vacant position and
deleting the pointer.

st
ty
2 Hash Table
si
• A hash table can also be used to speed up searches.
er

iv
Implementation is by using Hash value.
un

• (Division/Variant Method)

www.lpu.in Lovely Professional University


www.universitystudy.in
www.universitystudy.in

Bootloader
• A boot loader, also called a boot manager, is a small program that places
the operating system (OS) of a computer into memory.

• When a computer is powered-up or restarted, the basic input/output system

in
(BIOS) performs some initial tests, and then transfers control to the Master

y.
Boot Record (MBR) where the boot loader resides.

ud
st
• Most new computers are shipped with boot loaders for some version of

ty
Microsoft Windows or the Mac OS.

si
er
• If a computer is to be used with Linux, a special boot loader must be
iv
installed.
un

www.universitystudy.in
www.lpu.in Lovely Professional
56 University
www.universitystudy.in

Bootloader
• The two most common boot loaders are known as:
– LILO (LInux LOader) and
– LOADLIN (LOAD LINux).

in
An alternative boot loader, called GRUB (GRand Unified Bootloader), is used

y.
with Red Hat Linux.

ud
st
LILO is the most popular boot loader among computer users that employ

ty
Linux as the main, or only, operating system.

si
er
iv
un

www.universitystudy.in
www.lpu.in Lovely Professional
57 University
www.universitystudy.in

Bootloader
• LOADLIN is preferred by some users whose computers have multiple
operating systems, and who spend relatively little time in Linux.

in
• LOADLIN is sometimes used as a backup boot loader for Linux in case

y.
LILO fails.

ud
st
• GRUB is preferred by many users of Red Hat Linux, because it is the

ty
default boot loader for that distribution.

si
er
iv
un

www.universitystudy.in
www.lpu.in Lovely Professional
58 University
www.universitystudy.in
Linux OS and its features
• Linux is one of popular version of UNIX operating System.

• It is open source as its source code is freely available.

• It is free to use.

in
y.
• Linux was designed considering UNIX compatibility.

ud
st
• Its functionality list is quite similar to that of UNIX.

ty
si
er
iv
un

www.universitystudy.in
59
www.lpu.in Lovely Professional University
www.universitystudy.in
Linux OS and its features
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

in
interacts directly with the underlying hardware. Kernel provides the

y.
required abstraction to hide low level hardware details to system or

ud
application programs.

st
• System Library − System libraries are special functions or programs using

ty
which application programs or system utilities accesses Kernel's features.

si
These libraries implement most of the functionalities of the operating
er
system and do not requires kernel module's code access rights.
iv
• System Utility − System Utility programs are responsible to do
un

specialized, individual level tasks.

www.universitystudy.in
60
www.lpu.in Lovely Professional University
• Kernel Mode vs User Mode www.universitystudy.in
• 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

in
access to hardware to processes.

y.
• Support code which is not required to run in kernel mode is in System

ud
Library. User programs and other system programs works in User Mode

st
which has no access to system hardware and kernel code. User programs/

ty
utilities use System libraries to access Kernel functions to get system's low
level tasks.
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
61
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
62
• Basic Features www.universitystudy.in

• Portable − Portability means software can work on different types of


hardware in same way. Linux kernel and application programs supports
their installation on any kind of hardware platform.
• Open Source − Linux source code is freely available and it is community
based development project. Multiple teams work in collaboration to

in
enhance the capability of Linux operating system and it is continuously

y.
evolving.

ud
• Multi-User − Linux is a multiuser system means multiple users can access

st
system resources like memory/ ram/ application programs at same time.

ty
• Multiprogramming − Linux is a multiprogramming system means

si
multiple applications can run at same time.
er
• Hierarchical File System − Linux provides a standard file structure in
iv
which system files/ user files are arranged.
un

• Shell − Linux provides a special interpreter program which can be used to


execute commands of the operating system. It can be used to do various
types of operations, call application programs. etc.
• Security − Linux provides user security using authentication features like
password protection/ controlled access to specific files/ encryption of data.
www.universitystudy.in
63
www.lpu.in Lovely Professional University
www.universitystudy.in

Distribution versions

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
64
www.universitystudy.in

Installation

1. Insert a bootable Linux USB drive

in
2. Click the start menu

y.
3. Then hold down the SHIFT key while clicking Restart

ud
4. Then select Use a Device

st
ty
5. Find your device in the list
6.
si
Your computer will now boot Linux
er
7. Select Install Linux
iv
un

8. Go through the installation process

www.lpu.in Lovely Professional University


www.universitystudy.in
65
www.universitystudy.in

Linux Directory Structure and File System


Hierarchy

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
66
www.universitystudy.in

Linux Directory Structure and File System Hierarchy


Dir Description

The directory called "root." It is the


starting point for the file system
/
hierarchy. Note that this is not related

in
to the root, or superuser, account.

y.
ud
Binaries and other executable
/bin
programs.

st
/etc System configuration files.

ty
/home Home directories.

si
/opt
er Optional or third party software.
iv
Temporary space, typically cleared on
/tmp
reboot.
un

/usr User related programs.


/var Variable data, most notably log files.

www.lpu.in Lovely Professional University


www.universitystudy.in
67
How to partition a disk in Linux
www.universitystudy.in

• Creating and deleting partitions in Linux is a regular practice


because storage devices (such as hard drives and USB drives) must
be structured in some way before they can be used.

in
y.
• In most cases, large storage devices are divided into separate

ud
sections called partitions. Partitioning also allows you to divide your

st
hard drive into isolated sections, where each section behaves as its

ty
own hard drive.

si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
68
How to partition a disk in Linux
www.universitystudy.in

The following explains the process of partitioning a storage device


with the parted command.

in
• List the partitions: Use parted -l to identify the storage device you

y.
want to partition.

ud
st
• Typically, the first hard disk (/dev/sda or /dev/vda) will contain the

ty
operating system, so look for another disk to find the one you want
si
er
(e.g., /dev/sdb, /dev/sdc, /dev/vdb, /dev/vdc, etc.).
iv
un

• /dev/sda is a specific device file path referring to the first storage


device in the system, typically the primary hard drive. /dev/sdb
would represent the second storage device, /dev/sdc the third, and so
on.
www.lpu.in Lovely Professional University
www.universitystudy.in
69
www.universitystudy.in

• 2. Open the storage device: Use parted to begin working with


the selected storage device. It is important to indicate the
specific device you want to use. If you just type parted with no
device name, it will randomly select a storage device to
modify.

in
y.
• 3. Set the partition table: Set the partition table type to GPT,

ud
then type "Yes" to accept it. The mklabel and mktable

st
commands are used for the same purpose (making a partition

ty
table on a storage device). The supported partition tables are:
si
aix, amiga, bsd, dvh, gpt, mac, ms-dos, pc98, sun, and loop.
er
Remember mklabel will not make a partition, rather it will
iv
un

make a partition table.

www.lpu.in Lovely Professional University


www.universitystudy.in
70
www.universitystudy.in

• 4. Review the partition table: Show information about the


storage device.

• 5. Get help: To find out how to make a new partition, type:

in
y.
(parted) help mkpart.

ud
st
• 6. Make a partition: To make a new partition (in this

ty
example, 1,396MB on partition 0), type the following:
si
er
(parted) mkpart primary 0 1396MB
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
71
www.universitystudy.in

in
y.
ud
st
ty
si
er
iv
un

www.lpu.in Lovely Professional University


www.universitystudy.in
72
www.universitystudy.in
• Parted is a command-line utility in Linux and other Unix-like
operating systems used for disk partitioning and managing disk
partitions.
• Let's assume we want to create a new primary partition on
/dev/sda and format it with the ext4 filesystem. We want this

in
new partition to use all available space on the disk.

y.
ud
sudo parted /dev/sda

st
ty
(parted) mkpart primary ext4 0% 100%
si
er
iv
After running the mkpart command, we can use the print
un

command to review the partition table and verify the changes:

(parted) print

www.lpu.in Lovely Professional University


www.universitystudy.in
73
Comparison of Windows and Linux OS
www.universitystudy.in

S.NO Linux Windows

1. Linux is a open source operating system. While windows is not an open source operating
system.

2. Linux is free of cost. While it is costly.

3. It’s file name case-sensitive. While it’s file name is case-insensitive.

in
4. In linux, monolithic kernel is used. While in this, micro kernel is used.

y.
5. Linux is more efficient in comparison of windows. While windows are less efficient.

ud
6. There is forward slash is used for Separating the While there is back slash is used for Separating the

st
directories. directories.

ty
7. Linux provides more security than windows. While it provides less security than linux.

si
8.
er
Linux is widely used in hacking purpose based While windows does not provide much efficiency in
systems. hacking.
iv
9. There are 3 types of user account – There are 4 types of user account –
un

(1) Regular , (2) Root , (3) Service account (1) Administrator , (2) Standard , (3) Child , (4) Guest

10. Root user is the super user and has all administrative Administrator user has all administrative privileges of
privileges. computers.

11. Linux file naming convention in case sensitive. Thus, In Windows, you cannot have 2 files with the same
sample and SAMPLE are 2 different files in name in the same folder.
Linux/Unix operating system.

www.lpu.in Lovely Professional University


www.universitystudy.in
74
www.universitystudy.in

Virtual Machines
• A Virtual Machine (VM) is a compute resource that uses software instead
of a physical computer to run programs and deploy apps. One or more
virtual “guest” machines run on a physical “host” machine. Each virtual

in
machine runs its own operating system and functions separately from the

y.
other VMs, even when they are all running on the same host. This means

ud
that, for example, a virtual MacOS virtual machine can run on a physical
PC.

st
ty
si
er
• Virtual machine technology is used for many use cases across on-premises
iv
and cloud environments. More recently, public cloud services are using
un

virtual machines to provide virtual application resources to multiple users


at once, for even more cost efficient and flexible compute.

www.lpu.in Lovely Professional University


www.universitystudy.in
75
www.universitystudy.in

• What are virtual machines used for?


• Virtual machines (VMs) allow a business to run an operating system that
behaves like a completely separate computer in an app window on a
desktop.
• VMs may be deployed to accommodate different levels of processing

in
power needs, to run software that requires a different operating system, or

y.
to test applications in a safe, sandboxed environment.

ud
• Virtual machines have historically been used for server virtualization,

st
which enables IT teams to consolidate their computing resources and

ty
improve efficiency.

si
er
iv
un

www.universitystudy.in
www.lpu.in Lovely Professional University
76
www.universitystudy.in

• What are virtual machines used for?


Additionally, virtual machines can perform specific tasks considered too risky
to carry out in a host environment, such as accessing virus-infected data or
testing operating systems. Since the virtual machine is separated from the rest
of the system, the software inside the virtual machine cannot tamper with the

in
host computer.

y.
ud
• How do virtual machines work?

st
• The virtual machine runs as a process in an application window, similar to

ty
any other application, on the operating system of the physical machine.

si
Key files that make up a virtual machine include a log file, NVRAM
er
setting file, virtual disk file and configuration file.
iv
un

www.universitystudy.in
www.lpu.in Lovely Professional University
77

You might also like