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

0% found this document useful (0 votes)
6 views42 pages

Unit - I: Introduc On To Opera NG System

An operating system (OS) serves as an interface between computer hardware and users, managing resources, processes, storage, and security. It has evolved through various generations, from early batch processing systems to modern mobile and cloud-based OSs, incorporating features like AI for enhanced functionality. Key services provided by an OS include program execution, input/output operations, file management, and user interface, ensuring efficient and secure operation of computer systems.
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)
6 views42 pages

Unit - I: Introduc On To Opera NG System

An operating system (OS) serves as an interface between computer hardware and users, managing resources, processes, storage, and security. It has evolved through various generations, from early batch processing systems to modern mobile and cloud-based OSs, incorporating features like AI for enhanced functionality. Key services provided by an OS include program execution, input/output operations, file management, and user interface, ensuring efficient and secure operation of computer systems.
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/ 42

UNIT – I

Introduc on to Opera ng System

An opera ng system acts as an intermediary between the user of a computer and computer
hardware. Hence, An opera ng system is a system so ware that acts as an interface
between computer hardware and computer user. It also provides a basis for applica on
program. Examples : WINDOWS , LINUX , UNIX , ANDROID etc.

 The purpose of an opera ng system is to provide an environment in which a user can


execute programs conveniently and efficiently.

 An opera ng system is so ware that manages computer hardware and so ware. The
hardware must provide appropriate mechanisms to ensure the correct opera on of
the computer system and to prevent user programs from interfering with the proper
opera on of the system.

 The opera ng system (OS) is a program that runs at all mes on a computer. All other
programs, including applica on programs, run on top of the opera ng system.

 It does assignment of resources like memory, processors and input / output devices
to different processes that need the resources. The assignment of resources has to
be fair and secure.

Func onali es of Opera ng System

 Resource Management: When mul ple processes run on the system and need
different resources like memory, input/output devices, the OS works as Resource
Manager, Its responsibility is to provide hardware to the user. It decreases the load in
the system.

 Process Management: It includes various tasks like scheduling and


synchroniza on of processes. Process scheduling is done with the help of CPU
Scheduling algorithms . Process Synchroniza on is mainly required because
processes need to communicate with each other. When processes communicate
different problems arise like two processes can update the same memory loca on in
incorrect order.

 Storage Management: The file system mechanism used for the management of the
secondary storage like Hard Disk. NIFS, CIFS, CFS, NFS, etc. are some file systems that
are used by opera ng systems to manage the storage. All the data is stored in various
tracks of Hard disks that are all managed by the storage manager.

 Memory Management: Refers to the management of primary memory, mainly


alloca on and de-alloca on of memory to processes. The opera ng system has to
keep track of how much memory has been used and by which process. It has to
decide which process needs memory space and how much.

 Security/Privacy Management: Privacy is also provided by the Opera ng system


using passwords so that unauthorized applica ons can't access programs or data. For
example, Windows uses Kerberos authen ca on to prevent unauthorized access to
data.

Primary Goals

The primary goals of an opera ng system (OS) are to provide a easy to use and convenient
environment for execu ng user programs.

1. User Convenience : It should be easy to use, providing a user-friendly interface and


making it simple to interact with the system.

2. Program Execu on: It facilitates the execu on of user programs, providing the
necessary environment and services for them to run.

3. Resource Management: The OS manages and allocates the computer's resources,


including the CPU, memory, disk storage, and input/output devices, to ensure fair
u liza on.

4. Security: The OS protects the system and user data from unauthorized access,
ensuring the confiden ality, integrity, and availability of informa on.

Genera ons of Opera ng Systems

 1940s-1950s: Early Beginnings

o Computers operated without opera ng systems (OS).

o Programs were manually loaded and run, one at a me.

o The first opera ng system was introduced in 1956. It was a batch processing
system GM-NAA I/O (1956) that automated job handling.

 1960s: Mul programming and Timesharing

o Introduc on of mul programming to u lize CPU efficiently.

o Timesharing systems, like CTSS (1961) and Mul cs (1969), allowed mul ple
users to interact with a single system.

 1970s: Unix and Personal Computers

o Unix (1971) revolu onized OS design with simplicity, portability, and


mul tasking.
o Personal computers emerged, leading to simpler OSs like CP/M (1974) and
PC-DOS (1981).

 1980s: GUI and Networking

o Graphical User Interfaces (GUIs) gained popularity with systems like Apple
Macintosh (1984) and Microso Windows (1985).

o Networking features, like TCP/IP in Unix, became essen al.

 1990s: Linux and Advanced GUIs

o Linux (1991) introduced open-source development.

o Windows and Mac OS refined GUIs and gained widespread adop on.

 2000s-Present: Mobility and Cloud

o Mobile OSs like iOS (2007) and Android (2008) dominate.

o Cloud-based and virtualiza on technologies reshape compu ng, with OSs like
Windows Server and Linux driving innova on.

 AI Integra on - (Ongoing)
With the growth of me, Ar ficial intelligence came into picture. Opera ng system
integrates features of AI technology like Siri, Google Assistant, and Alexa and became
more powerful and efficient in many way. These AI features with opera ng system
create a en re new feature like voice commands, predic ve text, and personalized
recommenda ons

Types of Opera ng system – Refer To Notebook (Advantages and Disadvantages are here)

Batch Opera ng System

Advantages Disadvantages

1. Be er CPU u liza on through job batching 1. No direct user interac on during execu on

2. Reduces system idle me 2. Debugging is difficult and slow

3. Good for large and repe ve jobs 3. High turnaround me

4. Simple and organized job management 4. Not efficient for small tasks

5. Automa on reduces user errors 5. Requires skilled operators


Mul programmed Opera ng System

Advantages Disadvantages

1. Keeps CPU busy with mul ple jobs 1. Memory management is complex

2. Improves system throughput 2. CPU scheduling adds overhead

3. Reduces wai ng me for jobs 3. Requires advanced hardware

4. Efficient use of resources 4. Risk of deadlocks

5. Runs mul ple programs at once 5. Debugging is more difficult

Time-Sharing Opera ng System

Advantages Disadvantages

1. Fast response me for users 1. Requires complex scheduling

2. Supports mul ple users simultaneously 2. System slows down with heavy load

3. Shares CPU me fairly 3. Security concerns in mul -user access

4. Efficient use of hardware 4. Setup and maintenance are costly

5. Reduces so ware duplica on 5. Needs fast processors and memory

Real-Time Opera ng System (RTOS)

Advantages Disadvantages

1. Quick and predictable responses 1. System design is complex

2. Works well in me-cri cal tasks 2. Limited mul tasking ability

3. High reliability and stability 3. Expensive hardware needed

4. Used in automa on and control systems 4. Not suitable for general-purpose use

5. Low response latency 5. Difficult to upgrade or scale


Distributed Opera ng System

Advantages Disadvantages

1. Shares resources across mul ple systems 1. Communica on between systems is complex

2. Faster data processing 2. Harder to manage and maintain

3. High fault tolerance 3. Security becomes more challenging

4. Enables access to remote data 4. Expensive to set up

5. Scalable as more systems are added 5. Synchroniza on issues may arise

Cluster Opera ng System

Advantages Disadvantages

1. Provides high system availability 1. Setup and maintenance are costly

2. Supports parallel compu ng 2. System configura on is complex

3. Improves performance and speed 3. Head node failure affects system

4. Balances system load efficiently 4. Needs cluster-specific so ware

5. Easily scalable by adding nodes 5. Troubleshoo ng is harder

Embedded Opera ng System

Advantages Disadvantages

1. Designed for specific tasks 1. Limited to dedicated func ons

2. Highly reliable and stable 2. Hard to update or modify

3. Consumes very li le memory and power 3. Cannot be reused for other tasks

4. Quick system boot and execu on 4. Tightly coupled with hardware

5. Performs in real- me environments 5. Debugging and maintenance are difficult

Services of Opera ng System

The OS coordinates the use of the hardware and applica on programs for various users. It
provides a pla orm for other applica on programs to work. The opera ng system is a set of
special programs that run on a computer system that allows it to work properly. It controls
input-output devices, execu on of programs, managing files, etc

1. Program Execu on

It is the Opera ng System that manages how a program is going to be executed. It loads
the program into the memory a er which it is executed. The order in which they are
executed depends on the CPU Scheduling Algorithms. A few are FCFS, SJF, etc. When the
program is in execu on, the Opera ng System also handles deadlock i.e. no two processes
come for execu on at the same me. The Opera ng System is responsible for the smooth
execu on of both user and system programs. The Opera ng System u lizes various
resources available for the efficient running of all types of func onali es.

2. Input Output Opera ons

Opera ng System manages the input-output opera ons and establishes communica on
between the user and device drivers. Device drivers are so ware that is associated with
hardware that is being managed by the OS so that the sync between the devices works
properly. It also provides access to input-output devices to a program when needed.

3. Communica on Between Processes

The Opera ng system manages the communica on between processes. Communica on


between processes includes data transfer among them. If the processes are not on the
same computer but connected through a computer network, then also their
communica on is managed by the Opera ng System itself.

4. File Management

The opera ng system helps in managing files also. If a program needs access to a file, it is
the opera ng system that grants access. These permissions include read-only, read-write,
etc. It also provides a pla orm for the user to create and delete files. The Opera ng
System is responsible for making decisions regarding the storage of all types of data or
files, i.e, floppy disk/hard disk/pen drive, etc. The Opera ng System decides how the data
should be manipulated and stored.

5. Memory Management

Let's understand memory management by OS in simple way. Imagine a cricket team with
limited number of player . The team manager (OS) decide whether the upcoming player
will be in playing 11 ,playing 15 or will not be included in team , based on his performance
. In the same way, OS first check whether the upcoming program fulfil all requirement to
get memory space or not ,if all things good, it checks how much memory space will be
sufficient for program and then load the program into memory at certain loca on. And
thus , it prevents program from using unnecessary memory.

6. Process Management
Let's understand the process management in unique way. Imagine, our kitchen stove as
the (CPU) where all cooking(execu on) is really happen and chef as the (OS) who uses
kitchen-stove(CPU) to cook different dishes(program). The chef(OS) has to cook different
dishes(programs) so he ensure that any par cular dish(program) does not take long
me(unnecessary me) and all dishes(programs) gets a chance to cooked(execu on) . The
chef(OS) basically scheduled me for all dishes(programs) to run kitchen(all the system)
smoothly and thus cooked(execute) all the different dishes(programs) efficiently.

7. Security and Privacy

 Security : OS keep our computer safe from an unauthorized user by adding security
layer to it. Basically, Security is nothing but just a layer of protec on which protect
computer from bad guys like viruses and hackers. OS provide us defenses
like firewalls and an -virus so ware and ensure good safety of computer and
personal informa on.

 Privacy : OS give us facility to keep our essen al informa on hidden like having a
lock on our door, where only you can enter and other are not allowed . Basically , it
respect our secrets and provide us facility to keep it safe.

8. Resource Management

System resources are shared between various processes. It is the Opera ng system that
manages resource sharing. It also manages the CPU me among processes using CPU
Scheduling Algorithms. It also helps in the memory management of the system. It also
controls input-output devices. The OS also ensures the proper use of all the resources
available by deciding which resource to be used by whom.

9. User Interface

User interface is essen al and all opera ng systems provide it. Users either interacts with
the opera ng system through the command-line interface or graphical user interface or
GUI. The command interpreter executes the next user-specified command.

A GUI offers the user a mouse-based window and menu system as an interface.

10. Networking

This service enables communica on between devices on a network, such as connec ng to


the internet, sending and receiving data packets and managing network connec ons.

11. Error Handling

The Opera ng System also handles the error occurring in the CPU, in Input-Output devices,
etc. It also ensures that an error does not occur frequently and fixes the errors. It also
prevents the process from coming to a deadlock. It also looks for any type of error or bugs
that can occur while any task. The well-secured OS some mes also acts as a
countermeasure for preven ng any sort of breach of the Computer System from any
external source and probably handling them.

12. Time Management

Imagine traffic light as (OS), which indicates all the cars(programs) whether it should be
stop(red)=>(simple queue), start(yellow)=>(ready queue),move(green)=>(under execu on)
and this light (control) changes a er a certain interval of me at each side of the
road(computer system) so that the cars(program) from all side of road move smoothly
without traffic.

Different ways of providing these Services – U lity Programs, System Calls.

System Call

A system call is a programma c way in which a computer program requests a service from
the kernel of the opera ng system on which it is executed. A system call is a way for
programs to interact with the opera ng system. A computer program makes a system call
when it requests the opera ng system's kernel. System call provides the services of the
opera ng system to the user programs via the Applica on Program Interface(API). System
calls are the only entry points into the kernel system and are executed in kernel mode.

Features of System Calls

 Interface: System calls provide a well-defined interface between user programs and
the opera ng system. Programs make requests by calling specific func ons and the
opera ng system responds by execu ng the requested service and returning a result.

 Protec on: System calls are used to access privileged opera ons that are not
available to normal user programs. The opera ng system uses this privilege to
protect the system from malicious or unauthorized access.

 Kernel Mode: When a system call is made, the program is temporarily switched from
user mode to kernel mode. In kernel mode, the program has access to all system
resources, including hardware, memory and other processes.

 Context Switching: A system call requires a context switch, which involves saving the
state of the current process and switching to the kernel mode to execute the
requested service. This can introduce overhead, which can impact system
performance.

 Error Handling: System calls can return error codes to indicate problems with the
requested service. Programs must check for these errors and handle them
appropriately.

 Synchroniza on: System calls can be used to synchronize access to shared resources,
such as files or network connec ons. The opera ng system provides synchroniza on
mechanisms, such as locks or semaphores, to ensure that mul ple programs can
access these resources safely.

How does System Call Work?

 Users need special resources: Some mes programs need to do some special things
that can't be done without the permission of the OS like reading from a file, wri ng
to a file, ge ng any informa on from the hardware or reques ng a space in memory.

 The program makes a system call request: There are special predefined instruc ons
to make a request to the opera ng system. These instruc ons are nothing but just a
"system call". The program uses these system calls in its code when needed.

 Opera ng system sees the system call: When the OS sees the system call then it
recognizes that the program needs help at this me so it temporarily stops the
program execu on and gives all the control to a special part of itself called 'Kernel'.
Now 'Kernel' solves the need of the program.

 The opera ng system performs the opera ons: Now the opera ng system performs
the opera on that is requested by the program. Example: reading content from a file
etc.

 Opera ng system give control back to the program : A er performing the special
opera on, OS give control back to the program for further execu on of program.

Services Provided by System Calls

 Process Crea on and Management

 Main Memory Management

 File Access, Directory and File System Management

 Process Control: end, abort, create, terminate, allocate and free memory.

 File Management: create, open, close, delete, read files, etc.

 Device Management

 Informa on Maintenance & Communica on

 Protec on, Networking, etc.

Advantages of System Calls

1. Provide a controlled interface to access hardware and OS services.

2. Enable user programs to perform opera ons like file and device handling.

3. Enhance security by restric ng direct hardware access.


4. Allow communica on between user and kernel mode.

5. Standardize interac on with system resources.

Disadvantages of System Calls

1. Involve overhead due to mode switching.

2. Slower than direct func on calls.

3. Complex to implement and maintain.

4. Improper use may lead to system vulnerabili es.

5. Increases system design complexity.

U lity Programs

They are a type of system so ware that are designed to help users manage, maintain, and
op mize their computer systems. U lity so ware includes a wide range of tools and
applica ons that perform specific tasks to improve the performance, security, and
func onality of a computer system. Applica on programs are large in comparison to u lity
programs hence they are smaller in size than u lity programs.

Examples of U lity Programs

Here are the some Examples of U lity Programs are given below -

1. An virus So ware

It is used to protect a computer from the virus. It detects a virus and no fy the user and take
ac on to secure the computer. The virus are kept in different loca on called vault where it
has different file system due to which virus effect it. User can itself instruct an virus to
delete malicious program, put it in vault or even ignore it. These days most come in GUI
form. The first an virus program appeared in 1987 with the introduc on of an an virus
program from G Data So ware for the Atari ST. Later in the same year, VirusScan was
introduced by John McAfee, which later became the McAfee an virus program.
Some examples of An virus So wares are:

 Windows Defender

 AVG

 AVAST

 MCAFEE

2. File Management Tool

The so ware is used to manage files stored in a file system. It can be used to create, group
file. Like windows file explorer is a file management tool.
File system (like FAT32, NTFS) should not be confused with File management tool former is a
data structure used to store file in an OS while later is used to perform task on file stored in
the file system.

Some examples of File management Tool are:

 File Manager in Windows.

 macOS Finder.

 Directory Opus.

 Dolphin in KDE.

3. Compression Tool

These tool are used to reduce the size of a file based on the
selected algorithm. Most opera ng systems include tools for compressing and
uncompressing files. Linux has tools for both .tar.gz and .zip. Other compressed files, like .7z
and .rar, require a third-party compression u lity to be installed.

Some Examples of compression so wares are as below.

 WinAce

 WinZip

 WinRAR

 7-Zip

 PKZIP

4. Disk Management Tool

Disk Management is u lity first introduced in Window XP as a replacement of the fdisk


command. It enables us to view or manage the disk drives installed in their computer and
the par on associated with those drives.
Disk Management is used to manage the drives installed in a computer- like hard disk drives,
and flash drives. It can be used to par on drives, assign drive le ers, and much more.

Some disk management tools are.

 Mini Tool Par on Wizard

 Paragon Par on Manager

 EaseUS Par on Master

 SMART Monitoring Tools

 AOMEI Par on Assistant


5. Disk Cleanup Tool

It is computer u lity maintenance which is included in Microso Windows. It allows user to


remove files that are no longer needed or that can be safely deleted. Removing unnecessary
files, including temporary files, can help to improve the func oning and increase the free
space of the computer. Running Disk Cleanup at least once a month is an excellent
maintenance task.
Disk Cleanup tool can delete temporary internet files, old check disk files, compress old files
and offline webpages. Disk Cleanup also allows you to empty the Recycle Bin, delete
temporary files, and delete Thumbnails.

Some Disk Cleanup so ware are:-

 Iolo System mechanic

 IObit Advanced systemCare

 Piriform CCleaner

 Razer Cortex

6. Disk Defragmenter

It is a u lity in Microso Windows designed to increase access speed by rearranging file


stored on a disk to occupy con guous storage loca ons, a technique is
called Defragmenta on. Defragmen ng a disk minimizes head travel, which reduces the
me it takes to read files from and write files to the disk. The defragmenter will search your
hard drive par on and move data from one loca on to other loca on, so that the files
stored there are one con guous piece, instead of being throughout mul ple loca ons on the
hard drive's par on.

Some Example of Disk Defragmenter so ware are:-

 Auslogics Disk Defrag

 MyDefrag

 Perfect disk

 Defraggler

Why Need U lity So ware ?

U lity so ware is essen al for several reasons:

1. System maintenance: U lity so ware provides a range of tools and applica ons that
help users manage and maintain their computer systems. By regularly using these
tools, users can op mize their system performance, remove unnecessary files and
programs, and keep their system running smoothly.
2. Security: U lity so ware includes tools such as an virus and encryp on so ware
that help users protect their computer systems from security threats such as viruses,
malware, and unauthorized access.

3. Efficiency: U lity so ware can help users op mize their system performance and
reduce the me and effort required to perform rou ne tasks such as disk cleanup,
file compression, and data backup.

4. Data recovery: U lity so ware includes backup and recovery tools that can help
users recover lost or deleted data in the event of a system failure or data loss.

5. User experience: U lity so ware can help users customize their system se ngs and
preferences to enhance their overall user experience.

Advantages

1. Improve overall system performance and speed.

2. Help maintain data integrity and reduce data loss.

3. Provide be er security through virus protec on.

4. Simplify disk and file management.

5. Automate maintenance tasks like cleanup and updates.

Disadvantages

1. May consume system resources and slow down processes.

2. Some tools can be complex for beginners.

3. Third-party u li es might pose security risks.

4. Improper use may cause data loss or corrup on.

5. Frequent updates or licenses may be required.

UNIT – II
File : A computer file is defined as a medium used for saving and managing data in the
computer system. The data stored in the computer system is completely in digital format,
although there can be various types of files that help us to store the data.

What is a File System?


A file system is a method an opera ng system uses to store, organize, and manage files and
directories on a storage device. Some common types of file systems include:

 FAT (File Alloca on Table): An older file system used by older versions of Windows
and other opera ng systems.

 NTFS (New Technology File System): A modern file system used by Windows. It
supports features such as file and folder permissions, compression, and encryp on.

 ext (Extended File System): A file system commonly used on Linux and Unix-based
opera ng systems.

 HFS (Hierarchical File System): A file system used by macOS.

 APFS (Apple File System): A new file system introduced by Apple for their Macs and
iOS devices.

A file is a collec on of related informa on that is recorded on secondary storage. Or file is a


collec on of logically related en es. From the user’s perspec ve, a file is the smallest
allotment of logical secondary storage.

The name of the file is divided into two parts as shown below:

 Name

 Extension, separated by a period.

Files A ributes And Their Opera ons

File Types and Their Content


File Directories

The collec on of files is a file directory. The directory contains informa on about the files,
including a ributes, loca on, and ownership. Much of this informa on, especially that is
concerned with storage, is managed by the opera ng system. The directory is itself a file,
accessible by various file management rou nes.
Below are informa on contained in a device directory.

 Name Type
 Address Current length
 Maximum length Date last accessed
 Date last updated Owner id Protec on informa on

The opera on performed on the directory are:

 Search for a file

 Create a file

 Delete a file

 List a directory

 Rename a file

 Traverse the file system

1. User’s View of File System

Defini on:
From the user's perspec ve, the file system is a logical and user-friendly interface that
allows easy access, crea on, manipula on, and organiza on of data without worrying about
how data is stored or retrieved physically.

Main Features:

Feature Descrip on

Naming and Users iden fy files using file names, extensions, and directories (e.g.,
Access mydoc.txt in C:\Documents).

File Organiza on Users see a hierarchical structure of folders/directories.

Users perform ac ons like create, open, read, write, edit, copy, delete,
File Opera ons
move, etc.

Access Control Files have permissions (read, write, execute) to ensure data security.

Abstrac on Users are unaware of physical storage details such as blocks or sectors.

Key Points (Bullet Format):

 Users interact with files and directories, not physical storage.

 Uses a graphical interface or command-line to manage files.

 File names, extensions, and metadata help in iden fica on.

 Users perceive storage as logical drives (C:, D:).

 Access control defines who can do what with a file (owner, group, others).

 No concern about internal storage structures like file alloca on tables or inode
tables.

 Supports file backup, search, sort, and categoriza on.

2. System Programmer’s View of File System

Defini on:

From the system programmer’s (or OS designer’s) view, the file system is a complex system
of data structures, algorithms, and access protocols that manages how files are stored,
indexed, and retrieved on physical storage devices.

Main Components:
Component Descrip on

File Control Block A data structure used by OS to store metadata (permissions, size,
(FCB) mestamps, pointers).

Directory Structure Organizes FCBs in a way that supports hierarchical folder systems.

File Alloca on Methods like con guous, linked, indexed alloca on used to manage
Methods space.

Free Space
Tracks unallocated blocks using bitmaps, linked lists, or tables.
Management

I/O Control Handles read/write requests, buffering, caching, and error handling.

Inodes (Unix/Linux) A data structure that holds metadata and pointers to file blocks.

Key Points (Bullet Format):

 Responsible for implementa on and op miza on of file access and storage.

 Handles file descriptors, access control lists (ACLs), and device drivers.

 Ensures efficient space alloca on using file alloca on tables (FAT), inodes, or extent-
based systems.

 Implements buffering, caching, and scheduling for I/O efficiency.

 Deals with concurrency issues, crash recovery, and data consistency.

 Manages moun ng and unmoun ng of file systems.

 Deals with disk layout and interacts directly with storage hardware via low-level
instruc ons.

File Alloca on Methods (Disk Space Alloca on Methods)

There are several types of file alloca on methods. These are men oned below.

 Con guous Alloca on

 Linked Alloca on(Non-con guous alloca on)

 Indexed Alloca on

Con nuous Alloca on

A single con nuous set of blocks is allocated to a file at the me of file crea on. Thus, this is
a pre-alloca on strategy, using variable size por ons. The file alloca on table needs just a
single entry for each file, showing the star ng block and the length of the file. This method is
best from the point of view of the individual sequen al file. Mul ple blocks can be read in at
a me to improve I/O performance for sequen al processing. It is also easy to retrieve a
single block. For example, if a file starts at block b, and the ith block of the file is wanted, its
loca on on secondary storage is simply b+i-1.

Linked Alloca on(Non-Con guous Alloca on)

Alloca on is on an individual block basis. Each block contains a pointer to the next block in
the chain. Again the file table needs just a single entry for each file, showing the star ng
block and the length of the file. Although pre-alloca on is possible, it is more common
simply to allocate blocks as needed. Any free block can be added to the chain. The blocks
need not be con nuous. An increase in file size is always possible if a free disk block is
available. There is no external fragmenta on because only one block at a me is needed but
there can be internal fragmenta on but it exists only in the last disk block of the file.
Indexed Alloca on

It addresses many of the problems of con guous and chained alloca on. In this case, the file
alloca on table contains a separate one-level index for each file: The index has one entry for
each block allocated to the file. The alloca on may be on the basis of fixed-size blocks or
variable-sized blocks. Alloca on by blocks eliminates external fragmenta on, whereas
alloca on by variable-size blocks improves locality. This alloca on technique supports both
sequen al and direct access to the file and thus is the most popular form of file alloca on.

Alloca on Advantages Disadvantages

- Simple to implement - Fast - External fragmenta on - Difficult to


Con guous
sequen al and direct access - Good grow file - Requires knowing file size in
Alloca on
for large files with predictable size advance

- No external fragmenta on - Easy - Slow direct access (no indexing) -


Linked
to grow file dynamically - Simple Extra space needed for pointers -
Alloca on
management of free space Vulnerable to pointer corrup on

- Supports direct and random - Index block may become large -


Indexed
access - Handles dynamic file size Slightly complex implementa on -
Alloca on
well - No external fragmenta on Overhead of maintaining index blocks

File Protec on

File protec on in an opera ng system is the process of securing files from unauthorized
access, altera on, or dele on. It is cri cal for data security and ensures that sensi ve
informa on remains confiden al and secure. Opera ng systems provide various
mechanisms and techniques such as file permissions, encryp on, access control lists,
audi ng, and physical file security to protect files. Proper file protec on involves user
authen ca on, authoriza on, access control, encryp on, and audi ng. Ongoing updates and
patches are also necessary to prevent security breaches. File protec on in an opera ng
system is essen al to maintain data security and minimize the risk of data breaches and
other security incidents.

Type of File protec on

File protec on is an essen al component of modern opera ng systems, ensuring that files
are secured from unauthorized access, altera on, or dele on. In this context, there are
several types of file protec on mechanisms used in opera ng systems to provide robust data
security.

 File Permissions ? File permissions are a basic form of file protec on that controls
access to files by se ng permissions for users and groups. File permissions allow the
system administrator to assign specific access rights to users and groups, which can
include read, write, and execute privileges. These access rights can be assigned at the
file or directory level, allowing users and groups to access specific files or directories
as needed. File permissions can be modified by the system administrator at any me
to adjust access privileges, which helps to prevent unauthorized access.

 Encryp on ? Encryp on is the process of conver ng plain text into ciphertext to


protect files from unauthorized access. Encrypted files can only be accessed by
authorized users who have the correct encryp on key to decrypt them. Encryp on is
widely used to secure sensi ve data such as financial informa on, personal data, and
other confiden al informa on. In an opera ng system, encryp on can be applied to
individual files or en re directories, providing an extra layer of protec on against
unauthorized access.

 Access Control Lists (ACLs) ? Access control lists (ACLs) are lists of permissions
a ached to files and directories that define which users or groups have access to
them and what ac ons they can perform on them. ACLs can be more granular than
file permissions, allowing the system administrator to specify exactly which users or
groups can access specific files or directories. ACLs can also be used to grant or deny
specific permissions, such as read, write, or execute privileges, to individual users or
groups.

 Audi ng and Logging ? Audi ng and logging are mechanisms used to track and
monitor file access, changes, and dele ons. It involves crea ng a record of all file
access and changes, including who accessed the file, what ac ons were performed,
and when they were performed. Audi ng and logging can help to detect and prevent
unauthorized access and can also provide an audit trail for compliance purposes.

 Physical File Security ? Physical file security involves protec ng files from physical
damage or the . It includes measures such as file storage and access control, backup
and recovery, and physical security best prac ces. Physical file security is essen al for
ensuring the integrity and availability of cri cal data, as well as compliance with
regulatory requirements.

Advantages Disadvantages

Prevents unauthorized access to sensi ve Can be complex to manage in mul -


files user systems

Incorrect permission se ngs may


Ensures data confiden ality and privacy
block legi mate users

Maintains data integrity by preven ng Adds overhead to the system (access


accidental modifica ons or dele on checks, encryp on, etc.)

Enables controlled sharing among users Users may need technical knowledge
(e.g., read-only access) to set proper permissions

Helps in audi ng and accountability (via Can lead to reduced performance due
logs and permissions) to added security layers

Disk Scheduling Algorithms

Disk scheduling algorithms are crucial in managing how data is read from and wri en to a
computer's hard disk. These algorithms help determine the order in which disk read and
write requests are processed, significantly impac ng the speed and efficiency of data access.

Goal of Disk Scheduling Algorithms

 Minimize Seek Time

 Maximize Throughput

 Minimize Latency

 Fairness

 Efficiency in Resource U liza on

First Come First Serve (FCFS)


FCFS is the simplest disk scheduling algorithm. As the name suggests, this algorithm
entertains requests in the order they arrive in the disk queue. The algorithm looks very fair
and there is no starva on (all requests are serviced sequen ally) but generally, it does not
provide the fastest service.

Advantages of FCFS

 Every request gets a fair chance

 No indefinite postponement
Disadvantages of FCFS

 Does not try to op mize seek me

 May not provide the best possible service

SSTF (Shortest Seek Time First)

In SSTF (Shortest Seek Time First), requests having the shortest seek me are executed first.
So, the seek me of every request is calculated in advance in the queue and then they are
scheduled according to their calculated seek me. As a result, the request near the disk arm
will get executed first. SSTF is certainly an improvement over FCFS as it decreases the
average response me and increases the throughput of the system.

Advantages of Shortest Seek Time First

 The average Response Time decreases

 Throughput increases

Disadvantages of Shortest Seek Time First

 Overhead to calculate seek me in advance

 Can cause Starva on for a request if it has a higher seek me as compared to


incoming requests

 The high variance of response me as SSTF favours only some requests

SCAN (Elevator) Disk Scheduling Algorithms

In the SCAN algorithm the disk arm moves in a par cular direc on and services the requests
coming in its path and a er reaching the end of the disk, it reverses its direc on and again
services the request arriving in its path. So, this algorithm works as an elevator and is hence
also known as an elevator algorithm. As a result, the requests at the midrange are serviced
more and those arriving behind the disk arm will have to wait.

Advantages of SCAN (Elevator) Algorithm

 This algorithm is simple and easy to understand.

 SCAN algorithm has no starva on.

 This algorithm is be er than the FCFS Disk Scheduling algorithm.

Disadvantages of the SCAN (Elevator) Algorithm

 More complex algorithm to implement.

 This algorithm is not fair because it causes a long wai ng me for the cylinders just
visited by the head.
 It causes the head to move ll the end of the disk in this way the requests arriving
ahead of the arm posi on would get immediate service but some other requests that
arrive behind the arm posi on will have to wait for the request to complete.

C-SCAN

In the SCAN algorithm, the disk arm again scans the path that has been scanned, a er
reversing its direc on. So, it may be possible that too many requests are wai ng at the other
end or there may be zero or few requests pending at the scanned area.

These situa ons are avoided in the CSCAN algorithm in which the disk arm instead of
reversing its direc on goes to the other end of the disk and starts servicing the requests
from there. So, the disk arm moves in a circular fashion and this algorithm is also similar to
the SCAN algorithm hence it is known as C-SCAN (Circular SCAN).

LOOK

LOOK Algorithm is similar to the SCAN disk scheduling algorithm except for the difference
that the disk arm in spite of going to the end of the disk goes only to the last request to be
serviced in front of the head and then reverses its direc on from there only. Thus it prevents
the extra delay which occurred due to unnecessary traversal to the end of the disk.

C-LOOK

As LOOK is similar to the SCAN algorithm, in a similar way, C-LOOK is similar to the CSCAN
disk scheduling algorithm. In CLOOK, the disk arm in spite of going to the end goes only to
the last request to be serviced in front of the head and then from there goes to the other
end’s last request. Thus, it also prevents the extra delay which occurred due to unnecessary
traversal to the end of the disk.

Algorithm Advantages Disadvantages

Provides uniform wait me for all Longer seek me as it always returns to


C-SCAN
requests. the start.

Ignores requests while moving back to


Reduces variance in response me.
the start.

More overall head movement compared


Good for heavy load systems.
to LOOK.

Less seek me by stopping at last


LOOK Not as fair as C-SCAN in uniformity.
request.

More efficient than SCAN in head Can cause delay to newly arrived requests
movement. near start.
Algorithm Advantages Disadvantages

Avoids unnecessary traversal to disk


Performance degrades under heavy load.
ends.

Be er than C-SCAN in reducing head


C-LOOK May s ll cause delays for far-off requests.
movement.

Ensures more uniform wait me than Ignores intermediate requests while


LOOK. jumping back.

Not op mal for low or light request


Efficient in large number of requests.
traffic.

System Calls for File Management, Disk Organiza on, Tape Organiza on – Refer to
notebook

UNIT – III
Process in Opera ng System

A process is a program in execu on. For example, when we write a program in C or C++ and
compile it, the compiler creates binary code. The original code and binary code are both
programs. When we actually run the binary code, it becomes a process.

 A process is an 'ac ve' en ty instead of a program, which is considered a 'passive'


en ty.

 A single program can create many processes when run mul ple mes; for example,
when we open a .exe or binary file mul ple mes, mul ple instances begin (mul ple
processes are created). .

How Does a Process Look Like in Memory?

A process in memory is divided into several dis nct sec ons, each serving a different
purpose. Here's how a process typically looks in memory.
 Text Sec on: A text or code segment contains executable instruc ons. It is typically a
read only sec on

 Stack: The stack contains temporary data, such as func on parameters, returns
addresses, and local variables.

 Data Sec on: Contains the global variable.

 Heap Sec on: Dynamically memory allocated to process during its run me.

A ributes of a Process

A process has several important a ributes that help the opera ng system manage and
control it. These a ributes are stored in a structure called the Process Control Block
(PCB) (some mes called a task control block). The PCB keeps all the key informa on about
the process, including:

1. Process ID (PID): A unique number assigned to each process so the opera ng system
can iden fy it.

2. Process State: This shows the current status of the process, like whether it is running,
wai ng, or ready to execute.

3. Priority and other CPU Scheduling Informa on: Data that helps the opera ng
system decide which process should run next, like priority levels and pointers to
scheduling queues.

4. I/O Informa on: Informa on about input/output devices the process is using.

5. File Descriptors: Informa on about open files files and network connec ons.

6. Accoun ng Informa on: Tracks how long the process has run, the amount of CPU
me used, and other resource usage data.

7. Memory Management Informa on: Details about the memory space allocated to
the process, including where it is loaded in memory and the structure of its memory
layout (stack, heap, etc.).

Scheduling Concepts

CPU scheduling is a process used by the opera ng system to decide which task or process
gets to use the CPU at a par cular me. This is important because a CPU can only handle
one task at a me, but there are usually many tasks that need to be processed. The
following are different purposes of a CPU scheduling me.

 Maximize the CPU u liza on

 Minimize the response and wai ng me of the process.

What is the Need for a CPU Scheduling Algorithm?


CPU scheduling is the process of deciding which process will own the CPU to use while
another process is suspended. The main func on of CPU scheduling is to ensure that
whenever the CPU remains idle, the OS has at least selected one of the processes available
in the ready-to-use line.

In Mul programming, if the long-term scheduler selects mul ple I/O binding processes then
most of the me, the CPU remains idle. The func on of an effec ve program is to improve
resource u liza on.

Terminologies Used in CPU Scheduling

 Arrival Time: The me at which the process arrives in the ready queue.

 Comple on Time: The me at which the process completes its execu on.

 Burst Time: Time required by a process for CPU execu on.

 Turn Around Time: Time Difference between comple on me and arrival me.

Turn Around Time = Comple on Time – Arrival Time

 Wai ng Time(W.T): Time Difference between turn around me and burst me.

Wai ng Time = Turn Around Time – Burst Time

Different CPU Scheduling algorithms have different structures and the choice of a
par cular algorithm depends on a variety of factors.

 CPU U liza on: The main purpose of any CPU algorithm is to keep the CPU as busy as
possible. Theore cally, CPU usage can range from 0 to 100 but in a real- me system,
it varies from 40 to 90 percent depending on the system load.

 Throughput: The average CPU performance is the number of processes performed


and completed during each unit. This is called throughput. The output may vary
depending on the length or dura on of the processes.

 Turn Round Time: For a par cular process, the important condi ons are how long it
takes to perform that process. The me elapsed from the me of process delivery to
the me of comple on is known as the conversion me. Conversion me is the
amount of me spent wai ng for memory access, wai ng in line, using CPU and
wai ng for I/O.

 Wai ng Time: The Scheduling algorithm does not affect the me required to
complete the process once it has started performing. It only affects the wai ng me
of the process i.e. the me spent in the wai ng process in the ready queue.

 Response Time: In a collabora ve system, turn around me is not the best op on.
The process may produce something early and con nue to compu ng the new
results while the previous results are released to the user. Therefore another method
is the me taken in the submission of the applica on process un l the first response
is issued. This measure is called response me.

Different Types of CPU Scheduling Algorithms

There are mainly two types of scheduling methods:

 Preemp ve Scheduling: Preemp ve scheduling is used when a process switches from


running state to ready state or from the wai ng state to the ready state.

 Non-Preemp ve Scheduling: Non-Preemp ve scheduling is used when a process


terminates , or when a process switches from running state to wai ng state.

What is Process Scheduling?

Process scheduling is the ac vity of the process manager that handles the removal of the
running process from the CPU and the selec on of another process based on a par cular
strategy. Throughout its life me, a process moves between various scheduling queues, such
as the ready queue, wai ng queue or devices queue.

Types of Process Schedulers

There are three types of process schedulers:

1. Long Term or Job Scheduler

Long Term Scheduler loads a process from disk to main memory for execu on. The new
process to the 'Ready State'.

 It mainly moves processes from Job Queue to Ready Queue.

 It controls the Degree of Mul -programming, i.e., the number of processes present
in a ready state or in main memory at any point in me.

 It is important that the long-term scheduler make a careful selec on of both I/O and
CPU-bound processes. I/O-bound tasks are which use much of their me in input and
output opera ons while CPU-bound processes are which spend their me on the
CPU. The job scheduler increases efficiency by maintaining a balance between the
two.

 In some systems, the long-term scheduler might not even exist. For example, in me-
sharing systems like Microso Windows, there is usually no long-term scheduler.
Instead, every new process is directly added to memory for the short-term scheduler
to handle.

 Slowest among the three (that is why called long term).


2. Short-Term or CPU Scheduler

CPU Scheduler is responsible for selec ng one process from the ready state for running (or
assigning CPU to it).

 STS (Short Term Scheduler) must select a new process for the CPU frequently to
avoid starva on.

 The CPU scheduler uses different scheduling algorithms to balance the alloca on of
CPU me.

 It picks a process from ready queue.

 Its main objec ve is to make the best use of CPU.

 It mainly calls dispatcher.

 Fastest among the three (that is why called Short Term).

The dispatcher is responsible for loading the process selected by the Short-term scheduler on
the CPU (Ready to Running State). Context switching is done by the dispatcher only. A
dispatcher does the following work:

 Saving context (process control block) of previously running process if not finished.

 Switching system mode to user mode.

 Jumping to the proper loca on in the newly loaded program.

3. Medium-Term Scheduler

Medium Term Scheduler (MTS) is responsible for moving a process from memory to disk (or
swapping).

 It reduces the degree of mul programming (Number of processes present in main


memory).

 A running process may become suspended if it makes an I/O request. A suspended


processes cannot make any progress towards comple on. In this condi on, to
remove the process from memory and make space for other processes, the
suspended process is moved to the secondary storage. This process is called
swapping and the process is said to be swapped out or rolled out. Swapping may be
necessary to improve the process mix (of CPU bound and IO bound)

 When needed, it brings process back into memory and pick up right where it le off.

 It is faster than long term and slower than short term.


Threads

A thread is a single sequence stream within a process. Threads are also called lightweight
processes as they possess some of the proper es of processes. Each thread belongs to
exactly one process.

 In an opera ng system that supports mul threading, the process can consist of many
threads. But threads can be effec ve only if the CPU is more than 1 otherwise two
threads have to context switch for that single CPU.

 All threads belonging to the same process share - code sec on, data sec on, and OS
resources (e.g. open files and signals)

 But each thread has its own (thread control block) - thread ID, program counter,
register set, and a stack

 Any opera ng system process can execute a thread. we can say that single process
can have mul ple threads.

Why Do We Need Thread?

 Threads run in concurrent manner that improves the applica on performance. Each
such thread has its own CPU state and stack, but they share the address space of the
process and the environment. For example, when we work on Microso
Word or Google Docs, we no ce that while we are typing, mul ple things happen
together (forma ng is applied, page is changed and auto save happens).

 Threads can share common data so they do not need to use inter-process
communica on. Like the processes, threads also have states like ready, execu ng,
blocked, etc.

 Priority can be assigned to the threads just like the process, and the highest priority
thread is scheduled first.

 Each thread has its own Thread Control Block (TCB). Like the process, a context
switch occurs for the thread, and register contents are saved in (TCB). As threads
share the same address space and resources, synchroniza on is also required for the
various ac vi es of the thread.

Components of Threads

These are the basic components of the Opera ng System.

 Stack Space: Stores local variables, func on calls, and return addresses specific to
the thread.

 Register Set: Hold temporary data and intermediate results for the thread's
execu on.
 Program Counter: Tracks the current instruc on being executed by the thread.

Types of Thread in Opera ng System

Threads are of two types. These are described below.

 User Level Thread

 Kernel Level Thread

1. User Level Thread

User Level Thread is a type of thread that is not created using system calls. The kernel has no
work in the management of user-level threads. User-level threads can be easily
implemented by the user. In case when user-level threads are single-handed processes,
kernel-level thread manages them. Let's look at the advantages and disadvantages of User-
Level Thread.

Advantages of User-Level Threads

 Implementa on of the User-Level Thread is easier than Kernel Level Thread.

 Context Switch Time is less in User Level Thread.

 User-Level Thread is more efficient than Kernel-Level Thread.

 Because of the presence of only Program Counter, Register Set, and Stack Space, it
has a simple representa on.

Disadvantages of User-Level Threads

 The opera ng system is unaware of user-level threads, so kernel-level op miza ons,


like load balancing across CPUs, are not u lized.

 If a user-level thread makes a blocking system call, the en re process (and all its
threads) is blocked, reducing efficiency.

 User-level thread scheduling is managed by the applica on, which can become
complex and may not be as op mized as kernel-level scheduling.

2. Kernel Level Threads

A kernel Level Thread is a type of thread that can recognize the Opera ng system easily.
Kernel Level Threads has its own thread table where it keeps track of the system. The
opera ng System Kernel helps in managing threads. Kernel Threads have somehow longer
context switching me. Kernel helps in the management of threads.

Advantages of Kernel-Level Threads

 Kernel-level threads can run on mul ple processors or cores simultaneously, enabling
be er u liza on of mul core systems.
 The kernel is aware of all threads, allowing it to manage and schedule them
effec vely across available resources.

 Applica ons that block frequency are to be handled by the Kernel-Level Threads.

 The kernel can distribute threads across CPUs, ensuring op mal load balancing and
system performance.

Disadvantages of Kernel-Level threads

 Context switching between kernel-level threads is slower compared to user-level


threads because it requires mode switching between user and kernel space.

 Managing kernel-level threads involves frequent system calls and kernel interac ons,
leading to increased CPU overhead.

 A large number of threads may overload the kernel scheduler, leading to poten al
performance degrada on in systems with many threads.

 Implementa on of this type of thread is a li le more complex than a user-level


thread.

Difference Between Process and Thread


Process Thread

Process means a program in


Thread means a segment of a process.
execution.

A process takes more time to


A thread takes less time to terminate.
terminate.

It takes more time for


It takes less time for creation.
creation.

It also takes more time for


It takes less time for context switching.
context switching.

A process is less efficient in Thread is more efficient in terms of


terms of communication. communication.
Process Thread

We don't need multi programs in action for


Multiprogramming holds the
multiple threads because a single process
concepts of multi-process.
consists of multiple threads.

Every process runs in its own


Threads share memory.
memory.

A process is heavyweight A Thread is lightweight as each thread in a


compared to a thread. process shares code, data, and resources.

Process switching uses an


Thread switching may not require calling
interface in an operating
involvement of operating system.
system.

If one process is blocked,


If a user-level thread is blocked, then all
then it will not affect the
other user-level threads are blocked.
execution of other processes.

A process has its own Thread has Parents' PCB, its own Thread
Process Control Block, Stack, Control Block, and Stack and common
and Address Space. Address space.

Since all threads of the same process share


Changes to the parent address space and other resources so any
process do not affect child changes to the main thread may affect the
processes. behavior of the other threads of the
process.

No system call is involved, it is created


A system call is involved in it.
using APIs.

A process does not share


Threads share data with each other.
data with each other.
UNIT – V
Distributed Opera ng System?

In a Distributed Opera ng System, mul ple CPUs are u lized, but for end-users, it appears as
a typical centralized opera ng system. It enables the sharing of various resources such as
CPUs, disks, network interfaces, nodes, and computers across different sites, thereby
expanding the available data within the en re system.

Effec ve communica on channels like high-speed buses and telephone lines connect all
processors, each equipped with its own local memory and other neighboring processors.

Due to its characteris cs, a distributed opera ng system is classified as a loosely coupled
system. It encompasses mul ple computers, nodes, and sites, all interconnected
through LAN/WAN lines. The ability of a Distributed OS to share processing resources
and I/O files while providing users with a virtual machine abstrac on is an important feature.

Types of Distributed Opera ng System

There are many types of Distributed Opera ng System, some of them are as follows:

1. Client-Server Systems

In a client-server system within a distributed opera ng system, clients request services or


resources from servers over a network. Clients ini ate communica on, send requests, and
handle user interfaces, while servers listen for requests, perform tasks, and manage
resources.

 This model allows for scalable resource u liza on, efficient sharing, modular
development, centralized control, and fault tolerance.

 It facilitates collabora on between distributed en es, promo ng the development


of reliable, scalable, and interoperable distributed systems.

2. Peer-to-Peer(P2P) Systems

In peer-to-peer (P2P) systems, interconnected nodes directly communicate and collaborate


without centralized control. Each node can act as both a client and a server, sharing
resources and services with other nodes. P2P systems enable decentralized resource
sharing, self-organiza on, and fault tolerance.

 They support efficient collabora on, scalability, and resilience to failures without
relying on central servers.

 This model facilitates distributed data sharing, content distribu on, and compu ng
tasks, making it suitable for applica ons like file sharing, content delivery, and
blockchain networks.
3. Middleware

Middleware acts as a bridge between different so ware applica ons or components,


enabling communica on and interac on across distributed systems. It abstracts complexi es
of network communica on, providing services like message passing, remote procedure calls
(RPC), and object management.

 Middleware facilitates interoperability, scalability, and fault tolerance by decoupling


applica on logic from underlying infrastructure.

 It supports diverse communica on protocols and data formats, enabling seamless


integra on between heterogeneous systems.

 Middleware simplifies distributed system development, promotes modularity, and


enhances system flexibility, enabling efficient resource u liza on and improved
system reliability.

4. Three-Tier

In a distributed opera ng system, the three- er architecture divides tasks into presenta on,
logic, and data layers. The presenta on er, comprising client machines or devices, handles
user interac on. The logic er, distributed across mul ple nodes or servers, executes
processing logic and coordinates system func ons.

 The data er manages storage and retrieval opera ons, o en employing distributed
databases or file systems across mul ple nodes.

 This modular approach enables scalability, fault tolerance, and efficient resource
u liza on, making it ideal for distributed compu ng environments.

5. N-Tier

In an N- er architecture, applica ons are structured into mul ple ers or layers beyond the
tradi onal three- er model. Each er performs specific func ons, such as presenta on,
logic, data processing, and storage, with the flexibility to add more ers as needed. In a
distributed opera ng system, this architecture enables complex applica ons to be divided
into modular components distributed across mul ple nodes or servers.

 Each er can scale independently, promo ng efficient resource u liza on, fault
tolerance, and maintainability.

 N- er architectures facilitate distributed compu ng by allowing components to run


on separate nodes or servers, improving performance and scalability.

 This approach is commonly used in large-scale enterprise systems, web applica ons,
and distributed systems requiring high availability and scalability.

Applica ons of Distributed Opera ng System


Distributed opera ng systems find applica ons across various domains where distributed
compu ng is essen al. Here are some notable applica ons:

 Cloud Compu ng Pla orms:

o Distributed opera ng systems form the backbone of cloud compu ng


pla orms like Amazon Web Services (AWS), Microso Azure, and Google
Cloud Pla orm (GCP).

o These pla orms provide scalable, on-demand compu ng resources


distributed across mul ple data centers, enabling organiza ons to deploy and
manage applica ons, storage, and services in a distributed manner.

 Internet of Things (IoT):

o Distributed opera ng systems play a crucial role in IoT networks, where


numerous interconnected devices collect and exchange data.

o These opera ng systems manage communica on, coordina on, and data
processing tasks across distributed IoT devices, enabling applica ons such as
smart home automa on, industrial monitoring, and environmental sensing.

 Distributed Databases:

o Distributed opera ng systems are used in distributed database management


systems (DDBMS) to manage and coordinate data storage and processing
across mul ple nodes or servers.

o These systems ensure data consistency, availability, and fault tolerance in


distributed environments, suppor ng applica ons such as online transac on
processing (OLTP), data warehousing, and real- me analy cs.

 Content Delivery Networks (CDNs):

o CDNs rely on distributed opera ng systems to deliver web content, media,


and applica ons to users worldwide.

o These opera ng systems manage distributed caching, content replica on, and
request rou ng across a network of edge servers, reducing latency and
improving performance for users accessing web content from diverse
geographic loca ons.

 Peer-to-Peer (P2P) Networks:

o Distributed opera ng systems are used in peer-to-peer networks to enable


decentralized communica on, resource sharing, and collabora on among
distributed nodes.
o These systems facilitate file sharing, content distribu on, and decentralized
applica ons (DApps) by coordina ng interac ons between peers without
relying on centralized servers.

 High-Performance Compu ng (HPC):

o Distributed opera ng systems are employed in HPC clusters and


supercomputers to coordinate parallel processing tasks across mul ple nodes
or compute units.

o These systems support scien fic simula ons, computa onal modeling, and
data-intensive computa ons by distribu ng workloads and managing
communica on between nodes efficiently.

 Distributed File Systems:

o Distributed opera ng systems power distributed file systems like Hadoop


Distributed File System (HDFS), Google File System (GFS), and CephFS.

o These file systems enable distributed storage and retrieval of large-scale data
sets across clusters of machines, suppor ng applica ons such as big data
analy cs, data processing, and content storage.

Examples of Distributed Opera ng System

Below are some Examples of Distributed Opera ng System.

 Solaris: The SUN mul processor worksta ons are the intended use for it.

 OSF/1: The Open Founda on So ware Company designed it, and it works with Unix.

 Micros: All nodes in the system are assigned work by the MICROS opera ng system,
which also guarantees a balanced data load.

 DYNIX: It is created for computers with many processors, known as Symmetry.

 Locus: It can be viewed simultaneously from both local and distant files without any
loca on restric ons.

 Mach: It permits the features of mul tasking and mul threading.

Security in Distributed Opera ng system

Protec on and security are crucial aspects of a Distributed Opera ng System, especially in
organiza onal se ngs. Measures are employed to safeguard the system from poten al
damage or loss caused by external sources. Various security measures can be implemented,
including authen ca on methods such as username/password and user key. One Time
Password (OTP) is also commonly u lized in distributed OS security applica ons.

Advantages of Distributed Opera ng System


Below are some Advantages of Distributed Opera ng System.

 It can increase data availability throughout the system by sharing all resources (CPU,
disk, network interface, nodes, computers, and so on) between sites.

 Because all data is replicated across all sites, it reduces the probability of data
corrup on because users can access data from another opera ng site in the event
that one site fails.

 Data transfer from one site to another is accelerated by it.

 Since it may be accessible from both local and remote sites, it is an open system.

 It facilitates a reduc on in the me needed to process data.

 The majority of distributed systems are composed of mul ple nodes that work
together to provide fault tolerance. Even if one machine malfunc ons, the system
s ll func ons.

Disadvantages of Distributed Opera ng System

Below are some Disadvantages of Distributed Opera ng System.

 Which tasks need to be completed, when they need to be completed, and where
they need to be completed must be determined by the system. The restric ons of a
scheduler might result in unpredictable run mes and unused hardware.

 Since the nodes and connec ons in DOS need to be secured, it is challenging to
establish sufficient security.

 Comparing a DOS-connected database to a single-user system, the la er is easier to


maintain and less complex.

 Compared to other systems, the underlying so ware is incredibly sophis cated and
poorly understood.

 Compiling, analyzing, displaying, and keeping track of hardware u liza on metrics for
large clusters may be quite challenging.

Network Opera ng System

The basic defini on of an opera ng system is that the opera ng system is the interface
between the computer hardware and the user. In daily life, we use the opera ng system on
our devices which provides a good GUI, and many more features. Similarly, a network
opera ng system(NOS) is so ware that connects mul ple devices and computers on the
network and allows them to share resources on the network. Let's see what are the
func ons of the network opera ng system.

Func ons of the NOS (Network Opera ng System)


The following are the main func ons of NOS:

 Crea ng and managing user accounts on the network.

 Controlling access to resources on the network.

 Provide communica on services between the devices on the network.

 Monitor and troubleshoot the network.

 Configuring and Managing the resources on the network.

Now let's see the type of Network Opera ng systems.

Types of Network Opera ng Systems

There are mainly two types of networks, one is peer-to-peer and another is client/server.
Now let's see each type one by one.

 Peer to Peer: Peer-to-peer network opera ng systems allow the sharing of resources
and files with small-sized networks and having fewer resources. In general, peer-to-
peer network opera ng systems are used on LAN.

 Client/server: Client-server network opera ng systems provide users access to


resources through the central server. This NOS is too expensive to implement and
maintain. This opera ng system is good for the big networks which provide many
services.

Features of Network Opera ng Systems

Let's see what are the func ons of the network opera ng system.

 Printers and applica on sharing on the network.

 File systems and database sharing.

 Provide good security by using func onality like user authen ca on and access
control.

 Create backups of data.

 Inter-networking.

Now let's see what are the advantages of NOS.

Advantages of Network Opera ng Systems

 Highly stable due to central server.

 Provide good security.


 Upgrada on of new technology and hardware can be easily implemented in the
network.

 Provide remote access to servers from different loca ons.

Disadvantages of Network Opera ng Systems

 Depend on the central loca on to perform the opera ons.

 High cost to buying server.

 Regular upda ng and maintenance are required.

Now let's see what are the examples of network opera ng systems.

Examples of Network Opera ng Systems

Following are the examples of network opera ng systems.

 Microso Windows Server

 UNIX/Linux

 Ar so ’s LANtas c

 Banyan’s VINES

S.NO Network Opera ng System Distributed Opera ng System

Network Opera ng System's main Distributed Opera ng System's main


1. objec ve is to provide the local objec ve is to manage the hardware
services to remote client. resources.

In Network Opera ng System, In Distributed Opera ng System,


2. Communica on takes place on the Communica on takes place on the basis
basis of files. of messages and shared memory.

Network Opera ng System is more


Distributed Opera ng System is less
3. scalable than Distributed Opera ng
scalable than Network Opera ng System.
System.

In Network Opera ng System, fault While in Distributed Opera ng System,


4.
tolerance is less. fault tolerance is high.
S.NO Network Opera ng System Distributed Opera ng System

Rate of autonomy in Network While The rate of autonomy in Distributed


5.
Opera ng System is high. Opera ng System is less.

Ease of implementa on in Network While in Distributed Opera ng System


6.
Opera ng System is also high. Ease of implementa on is less.

In Network Opera ng System, All


While in Distributed Opera ng System, All
7. nodes can have different opera ng
nodes have same opera ng system.
system.

What is meant by a Mul -Processing Opera ng System?

A mul processing opera ng system is defined as a type of opera ng system that makes use
of more than one CPU to improve performance. Mul ple processors work parallelly in mul -
processing opera ng systems to perform the given task. All the available processors are
connected to peripheral devices, computer buses, physical memory, and clocks. The main
aim of the mul -processing opera ng system is to increase the speed of execu on of the
system. The use of a mul processing opera ng system improves the overall performance of
the system. For example, UNIX, LINUX, and Solaris are the most widely used mul -
processing opera ng system.

Working of Mul -Processing Opera ng System

 Mul -processing opera ng system consists of mul ple CPUs. Each CPU is connected
to the main memory.

 The task to be performed id divided among all the processors.

 For faster execu on and improved performance, each processor is assigned a specific
task.

 Once all the tasks of each processor are completed they are compiled together in
order to produce a single output.

 The alloca on of resources for each processor is handled by the opera ng system.
This process results in be er u liza on of the available resources and improved
performance.

The below diagram describes the working of mul -processing opera ng systems.
Working of Mul processing Opera ng System

Types of Mul -Processing Opera ng Systems

Mul -processing opera ng systems are classified into two types. They are:

1. Symmetrical Mul processing Opera ng System

In a Symmetrical mul processing opera ng system, each processor executes the same copy
of opera ng system every me. Each process makes its own decisions and works according
to all other process to make sure that system works efficiently. With the help of CPU
scheduling algorithms, the task is assigned to the CPU that has least burden. Symmetrical
mul processing opera ng system is also known as "Shared Everything System" because all
the processors share memory and input-output bus. Below image describes about
symmetrical mul processing opera ng system.

Symmetrical Mul processing Opera ng System

Advantages

 Failure of one processor does not affect the func oning of other processors.

 It divides all the workload equally to the available processors.

 Makes use of available resources efficiently.


Disadvantages

 Symmetrical mul processing OS are more complex.

 They are more costlier.

 Synchroniza on between mul ple processors is difficult.

2. Asymmetrical Mul processing Opera ng System

In Asymmetrical mul processing opera ng system one processor acts as a master whereas
remaining all processors act a slaves. Slave processors are assigned with ready to execute
processes by the master processor. A ready queue is being maintained by master processor
to provides with processes for slaves. In mul processing opera ng system a schedular is
created by master process that assigns processes to be executed to slave processors. Below
diagram describes about the asymmetrical mul processing opera ng system.

Asymmetrical Mul processing Opera ng System

Advantages

 Asymmetrical mul processing opera ng system are cost-effec ve.

 They are easy to design and manage.

 They are more scalable.

Disadvantages

 There can be uneven distribu on of workload among the processors.

 The processors do not share same memory.

 En re system goes down if one process fails.

You might also like