Unit 2
Unit 2
in
in
y.
Orientation to Computing-I
ud
st
ty
si
er
iv
L T P :2 0 0
un
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
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.
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
in
y.
ud
st
ty
si
er
iv
un
• 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
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
in
y.
ud
st
ty
si
er
iv
un
Process Management
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
• 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
Process creation
• This is the initial stage of a process where it is
in
y.
up the necessary resources, data structures,
ud
and environment for the process to run.
st
ty
si
er
iv
un
Running
• This is the active execution phase of the
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
Preempted
• In some cases, a running process may be
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
Stopped/Terminated
• Normal Completion: The process completes
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
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
in
y.
ud
st
ty
si
er
iv
un
• 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
in
y.
ud
st
ty
si
er
iv
un
• 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
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
in
y.
ud
st
ty
si
er
iv
un
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
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
in
y.
ud
st
ty
si
er
iv
un
• 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
• Storage allocation
in
y.
• Free space management
ud
st
• Disk scheduling
ty
si
er
iv
un
in
y.
ud
st
ty
si
er
iv
un
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
in
y.
ud
st
ty
si
er
iv
un
• 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.
• 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
in
y.
ud
st
ty
si
er
iv
un
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
in
y.
ud
st
ty
si
er
iv
un
in
y.
ud
st
ty
si
er
iv
un
• 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
• 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
• 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
• 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
• 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
• 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
• 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
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
Installation process
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
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
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
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.
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
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
Acyclic-Graph Directories
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
Acyclic-Graph Directories
in
y.
ud
st
ty
si
er
iv
un
Directory Structure
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
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
in
y.
ud
st
ty
si
er
iv
un
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)
Bootloader
• A boot loader, also called a boot manager, is a small program that places
the operating system (OS) of a computer into memory.
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 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
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
in
y.
ud
st
ty
si
er
iv
un
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
Distribution versions
in
y.
ud
st
ty
si
er
iv
un
Installation
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
in
y.
ud
st
ty
si
er
iv
un
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
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
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
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
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
in
y.
ud
st
ty
si
er
iv
un
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
(parted) print
1. Linux is a open source operating system. While windows is not an open source operating
system.
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.
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
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
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