0% found this document useful (0 votes)
511 views

Operating Systems: Comparison of Various Operating System

The document compares several popular operating systems including MS-DOS, Windows, Linux, Unix, and Android. It provides details on the features and drawbacks of each operating system. MS-DOS was an early non-graphical command line operating system while Windows introduced graphical user interfaces. Linux is an open source alternative to Windows. Unix was an early multi-user operating system and the foundation for modern operating systems. Android is a widely used mobile operating system developed by Google.

Uploaded by

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

Operating Systems: Comparison of Various Operating System

The document compares several popular operating systems including MS-DOS, Windows, Linux, Unix, and Android. It provides details on the features and drawbacks of each operating system. MS-DOS was an early non-graphical command line operating system while Windows introduced graphical user interfaces. Linux is an open source alternative to Windows. Unix was an early multi-user operating system and the foundation for modern operating systems. Android is a widely used mobile operating system developed by Google.

Uploaded by

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

Operating Systems

COMPARISON OF
VARIOUS OPERATING
SYSTEM
PRESENTED BY

Maninder Richa Sejal Tamanna Mahesh Rana Shivam Goyal


(66) (90) (101) (114) (130) (131)
COMPARISON OF
ALL OPERATING
SYSTEM
Operating System

• An operating system acts as an intermediary between the user of a computer and computer
hardware. The purpose of an operating system is to provide an environment in which a user
can execute programs conveniently and efficiently. 

• An operating system is a software that manages computer hardware. The hardware must
provide appropriate mechanisms to ensure the correct operation of the computer system and
to prevent user programs from interfering with the proper operation of the system
Popular Operating Systems are

•1. MS-DOS:
• MS-DOS which is short for Microsoft Disk Operating System is a non-graphical command
line operating system developed for IBM compatible computers with x86 microprocessor.
The operating system used a command line interface for the user to input commands to
navigate, open and manipulate files on their computer.
FEATURES
 It is a single user operating system meaning only one user can operate at a time.

 It is a light weight operating system allowing users to have direct access to the BIOS and its
underlying hardware.

 Loads data and programs from external sources and bring them into the internal memory so
they can be used on the computer.

 Enables the computer to perform input and output operations such as taking commands from
keyboard, printing information on the screen.

 It is very helpful in making file management like creating, editing, deleting files, etc.

 It also controls and manages other external devices such as the printer, keyboard or external
hard drive using various drive utilities.
Drawbacks:

 It does not allow multiple users to operate on the system.

 It does not support graphical interface hence mouse cannot be used to operate it.

 It does not support multiprogramming meaning it can only have one process in the
ram.

 It lacked memory protection which meant no security, and less stability.

 It has difficulty in memory access when addressing more than 640 MB of RAM
WINDOWS

Windows is an operating system designed by Microsoft to be used on a standard


x86 Intel and AMD processors. It provides an interface, known as a graphical user
interface(GUI) which eliminates the need to memorize commands for the command
line by using a mouse to navigate through menus, dialog boxes, buttons, tabs, and
icons. The operating system was named windows since the programs are displayed in
the shape of a square. This Windows operating system has been designed for both
a novice user just using at home as well as for professionals who are into
development.
FEATURES
 It is designed to run on any standard x86 Intel and AMD hence most of the hardware vendors
make drivers for windows like Dell, HP, etc.

 It supports enhanced performance by utilizing multi-core processors.

 It comes preloaded with many productivity tools which helps to complete all types of
everyday tasks on your computer.

 Windows has a very large user base so there is a much larger selection of available software
programs, utilities.

 Windows is backward compatible meaning old programs can run on newer versions.

 Hardware is automatically detected eliminating need of manually installing any device drivers .
Drawbacks:

 Windows can be expensive since the OS is paid license and majority of its applications are
paid products.

 Windows has high computer resource requirement like it should have high ram capacity, a
lot of hard drive space and good graphics card.

 Windows slows and hangs up if the user loads up many programs at the same time.

 Windows includes network sharing that can be useful if user has a network with many PCs.

 Windows is vulnerable to virus attacks since it has a huge user base and users have to
update OS to keep up-to-date with security patches.
LINUX
• The Linux OS is an open source operating system project that is a freely
distributed, cross-platform operating system developed based on UNIX.
This operating system is developed by Linus Torvalds. The name Linux
comes from the Linux kernel. It is basically the system software on a
computer that allows apps and users to perform some specific task on the
computer. The development of Linux operating system pioneered the open
source development and became the symbol of software collaboration.
FEATURES
 Linux is free can be downloaded from the Internet or redistribute it under GNU licenses and
has the best community support.

 Linux OS is easily portable which means it can be installed on various types of devices like
mobile, tablet computers.

 It is a multi-user, multitasking operating system.

 BASH is the Linux interpreter program which can be used to execute commands.

 Linux provides multiple levels of file structures i.e. hierarchical structure in which all the files
required by the system and those that are created by the user are arranged.

 Linux provides user security using authentication features and also threat detection and
solution is very fast because Linux is mainly community driven.
Drawbacks:
 There’s no standard edition of Linux hence confusing for users and also becoming familiar
with the Linux may be a problem for new users.

 More difficult to find applications to support user needs since Linux does not dominate
the market.

 Since some applications are developed specifically for Windows and Mac, those might not
be compatible with linux and sometimes users might not have much of a choice to choose
between different applications like in Windows or Mac since most apps are developed for
operating systems that have a huge user base.

 Some hardware may not be incompatible with Linux since it has patchier support for
drivers which may result in malfunction.
UNIX
The UNIX is an Operating System that is truly the base of all Operating Systems like
Ubuntu, Solaris, POSIX, etc. It was developed in the 1970s by Ken Thompson, Dennis Ritchie,
and others in the AT&T Laboratories. It was originally meant for programmers developing
software rather than non-programmers. 

Unix and the C were found by AT&T and distributed to government and academic institutions,
which led to both being ported to a wider variety of machine families than any other
operating system. The main focus that was brought by the developers in this operating
system was the Kernel. Unix was considered to be the heart of the operating System.

.
FEATURES
•Fu ll m u lt i t a s k i n g w i t h p r o t e c t e d me mo r y . M u lt i p le u s e rs c a n ru n m ul ti p l e p r o gr a m s ea c h a t th e s a m e t im e
w i t ho u t i n t e rf e r in g w i t h e a c h o t h e r o r c r a s h i ng t h e s y st em .

•V e ry e f f i c i e nt v ir t u a l m e m o ry , s o m a n y p ro g r a m s c a n r u n w i th a m o d e st a mo u nt o f p h ys i ca l m e mo r y.

•A c c e s s c o n t r o l s a n d s e c u r i t y . A l l u s e r s mu s t b e a u t h e n t i c a te d b y a v a l i d a cco u nt a n d p a s s w o r d t o u s e
t h e s y s t e m a t a ll A r i c h s e t o f s m a l l c o m m a n d s a nd u t il i t i e s th a t d o s p ec i f i c ta s ks w el l -- no t c lu tt ere d
u p w i t h lo t s o f s p e c i a l o p t i o n s . U ni x i s a w e l l- s t o c k e d t o o lb o x, no t a gi a nt d o -i t-a ll S w is s A r my K n i f e.

•A b i li t y t o s t r i ng c o m m a n d s a nd u t i li t ie s t o g e t h e r in u nl i m i ted w a ys t o a c co m p li s h m o r e co m p l i ca t ed t a s ks
- - no t l im i t e d t o p re c o nf ig u r e d c o m b i na t i o ns o r m e n u s , a s i n p er s o na l c o m p ut er s ys t ems .

•A p o w e r f u ll y u ni f ie d f il e s y st e m . E v e r y t h i n g i s a f i le : d a ta , p r o gr a ms , a n d a l l p h ys i ca l d ev i ces . E nt ir e
f i le s y s t e m a p p e a rs a s a s in g le l a r g e t r e e o f n e s t e d d i r ect o r i es , reg a rd les s o f h o w ma ny d if f er en t
p h y s i c a l d e v i c e s ( d i s k s ) a r e in c l u d e d .
Drawbacks:
• The traditional command line shell interface is user hostile -- des igned for the
programmer, not the casual user.

• Commands often have cryptic names and g ive very little response to tell the user what
they are doing . Much use of special keyboard characters - little typos have unexpected
results.

• To use Unix well, you need to understand some of the main design features. Its power
comes from knowing how to make commands and programs interact with each other, not
just from treating each as a fixed black box.

• Richness of utilities (over 400 standard ones) often overwhelms novices. Documentation
is short on examples and tutorials to help you fig ure out how to  use  the many tools
provided to accomplish various kinds of tasks.
ANDROID
• Android is the mobile operating system developed by Google. These days android is a
very popular OS in the market. Over 2 million apps are available in g oogle play store to
download and install on the android device. Android OS is used by about 2 billion people
all over the world and this is most used OS nowadays. There is a large range of devices
which use android including watches, cars audio player, android TV, PC, tablets and
smartphones. Android was first time named by Android Inc. then Google acquired android
in 2005 in $50 million. Most of the an droid core developers were hired by Google and
they built more features in the software. In early days android only supports physical
QUERTY keyboards and was not touch screen. But when mobile companies started
laun ching touch screen mobiles then Google decided to launch android OS that only
supports touch screens. Later Google marketed its mobile OS to mobile companies and it
becomes renowned.
Features
Millions of apps:-

• Users have a vast choice to choose which apps they need. Apps are categorized into topics and every topic has
large amount of apps to download.

Third-party apps also supported:-

• You can also install third-party apps. These apps can be downloaded from different websites. Users are flexible in
choosing which apps they want to download either from google play store or any other website. You just need to
authorize the app to be downloaded.

Notifications are nicely displayed:-

• All the notifications of apps, messages, emails, low battery are displayed nicely. Users can access the notification
by just sliding from top to bottom. You can also see the notifications in lock mode.

Sharing of internet among devices:-

• With a mobile hotspot, you can share your device internet with other devices or with PC. This can help saving
money also. If you living in a house then you can share your internet with your family members and they don’t need
to buy separate internet packages.
Drawbacks
Apps run in the background:-

• In the older version of Android, most apps always run in the background and come to foreground as they
wish. But in new version of android apps cannot automatically come to foreground. As some apps run in
the background then it consumes mobile battery and your device battery vanishes quickly.

Developers have a tough time:-

• Learning and developing android apps is hard because there are a variety of screen sizes and to make
app adaptive to all screen sizes is challenging for the developers

Low specification mobiles run slow:-

• As android is a very large operating system that consumes lot of storage and some default apps also
comes with operating system so low specification devices run slow.

Virus protection:-

• Android is not good at virus protection.


IOS
• Developed by Apple Inc., iOS is the hardware specific operating system of the
company whose first version was released in 2007. The operating system is used
for iPhones, iPads and iWatches with names iOS, iPadOS and watchOS
respectively. Since smartphones are the most commonly used handheld devices,
after Android, iOS is the second most used mobile operating system. Most iOS
users come from developed countries and those with economic affluence. With
more than 3 million apps in the Apple Store, iOS is a powerful entity and we’ll
zero in on iOS and its advantages and disadvantages in this blog.
Features
Easy to use with simple interface even after version upgrade

• iOS has this tremendous advantage of being very simple and compatible with each subsequent upgrade.

Multitasking like listening to music & typing docs possible

• Letting users multi-task is surely one of the big draws that the iOS has over and above any other operating system.
Those wanting to work on their iPhones or iPads can continue to do so while listening to music without any interruption.

Efficient Battery use with less heat generation

• Big time fans of iPhones will vouch for the fact that these devices generate less heat even when in use for long hours.
The reason for this is that iPhone batteries are known to be far more efficient and generate less heat than those that
run on other operating systems. A lot of users prefer the operating system and its proprietary devices only because
they can continue to play games uninterrupted for long hours without heating issues.

Impeccable security makes phone free of malicious codes & viruses

• Apple phones and other devices offer hassle-free use because of the strict security processes that the platform offers.
Devices running on this platform do not have chances of contracting virus or other malicious codes as apps and features
are tested for the specific platform before being loaded for use. Both fingerprint and face detection sensors are
supported by the platform ensuring double security checks.
Drawbacks
No widget support for iOS apps that are also costly

• iOS supports only apps made specifically for the platform and does not support any external widgets to enhance their
features. Moreover, with so many restrictions, apps made for the iOS have to fulfill several specifications that
naturally raise their development costs making them expensive for the end buyer.

Limited device use as platform runs only on Apple devices

• The platform runs only on devices made by the company and so there is a limitation when it comes to using devices
running on iOS. As a user, even if you like the additional feature that any other device outside the company offers,
you’re not in a position to use it as iOS runs only on hardware coming from the Apple factory.

Doesn’t provide NFC and radio is not in-built

• NFC is the feature that enables communication between devices close by. But the sad part is that iOS devices do not
support NFC. Also, unlike devices running on other platforms, Apple phones do not come with radio pre-loaded on them.
Users wanting to listen to radio on the iPhones have to do so by downloading radio apps.

App sizes are usually too big consuming too much space

• With specific features and characteristics made specifically for the iOS, apps made for the platform become very heavy
taking up a lot of storage space of the device.!
Windows Linux UNIX Android iOS

Manufacturer Microsoft Inc. Linux is developed as Three biggest distributions are Open source OS Apple Inc. closed,
open source OS under Solaris running (Oracle), AIXon designed &developed with components
the GNU project by the (IBM) & HP-UX Hewlett Packard. by Android Inc. Google that are source
Originator, Linus And Apple Makes OSX, an Unix is now the current openly
Torvalds and many based OS owner
others.

Development and Developed and Linux is Open Sourced Unix system has various flavors, OHA (Open Handset Apple Inc.
Distribution distributed by and distributed by most of which are developed by Alliance) developed and
Microsoft. various vendors. AT&T with other commercial distributed iOS
vendors and non-profit orgs.

Computer x86, x86-64 x86, x86-64, PowerPC, Available on PA-RISC and Itanium Android-x86 powered ARM
Architecture SPARC, Alpha, Others machines. Solaris also available by AMD and Intelx86
Supported for x86/x64 based systems. OSX is processors.
PowerPC(10.0-10.5)/x86(10.4)/x6
4 (10.5-10.8)
Target System Workstation, Personal Desktop/Server Workstation, 8086 UNIX Consumer, Smartphone, music
Type Computer, Media Centre, Depends on Personal Computer, system, PDP- Enterprise, system player,
Tablet PC, Embedded. Distribution embedded 11/70 system education Tablet system/
computer

File System NTFS, FAT & exFAT with ext2, ext3, HFS+, HFS, MFS jfs, gpfs, hfs, Ext4 HFS+, FTP
Supported ISO 9660; UDF, 3rd Party ex4,ReiserFS,FAT, (Mac OS 8.0 and hfs+, ufs, xfs, zfs
driver that supports file ISO 9660,UDF, before) AFP, with format
system ext2, and ext3, NFS, and others. ISO 9660, FAT, UDF
ReiserFS, and HFS

User Friendly for Very User Friendly Depends on Very User Friendly Unix is user- Very User Very User Friendly
Lay Users Distribution. More friendly. It's just Friendly
friendlier to users choosy about
than Unix who its friends
are
ARCHITECTURE
DOS LINUX
MS-DOS operating system is split into various The Linux system basically works on 4 layers
layers and each of the layers have different
Hardware,kernel,shell,Applications.
functionalities. In DOS each layer has connected
with one another.
KERNAL :- Monolithic Kernel

KERNAL:- DOS KERNEL


WINDOWS UNIX
KERNAL:- Monolithic
KERNAL:- Hybrid Kernel
Kernel

Windows has 2 main components :- kernel mode The architecture of Unix is divided into  kernel,

and user mode. hardware, shell, files and directories  in which the
kernel manages the connections related to hardware,
applications and commands.
ANDROID

Android architecture contains


different number of components to
support any android device needs.

KERNEL :- Linux kernel

The main components of android


architecture are following:-
•Applications
•Application Framework
•Android Runtime
•Platform Libraries
•Linux Kernel
IOS
The s truct ure o f th e I O S o pera ti ng
Sys tem is La yered b as ed. I t s
co mm unica tio n do es n’t o ccur
direct ly. T he la yer’ s bet w een th e
Ap plicat io n L a yer a nd t he Ha rdw a re
la yer w ill help f o r Co m munica t io n.

KE R N EL : - H ybrid t yp e ( XN U Kernel
o f Da rw in)
DOS WINDOWS UNIX LINUX Android IOS

MOSH
Command.com CMD Originaly bourne Bash shell Blink Shell
SHELL shell but now
compatible with
Terminal many others

Type of OS Single Multiuser, Multiuser, batch Multiuser ,


User/Tasking multitasking processing . multitasking. Multitasking Multitaskin
But not real time g
operations.

DOS does not GUI is internal KDE and Gnome Common Desktop
GUI have GUI part of Windows Environment User Default
OS. Interface & user
Navigation interface ·
bookmark_b Cocoa
order Touch
UNIX ANDROID IOS
Windows Linux

Security Threats Huge Negligible Mild Negligible Negligible

Reliability Great Great Greatest Could be More than


unstable Android

Compatibility Can coexist on Linux has few Unix does not have as many Better than iOS Compatibility is
local networks programs and programs and games as Windows fair
with Windows, games like
BSD, Macs, and Windows. But is
other Unix-like more compatible
systems. More and scalable than
compatible. Unix
Process
Synchronization
Process Synchronization in Linux
 Process synchronization in Linux involves providing a time slice for each process so that
they g et the required time for execution.

 The process can be created using the fork() comman d in Linux. The creating process is
called the parent process and the created process is the child process. A child process
can have only one parent but a parent proces s may have many children . Both the parent
and child processes have the same memory image, open files an d environment strings.
However, they have distin ct address spaces.

 A diagram that demonstrates the fork()

 command is given as follows −


 Orphan Processes

 There are some processes that are still running even though their parent process has terminated or
finished. These are known as orphan processes. Processes can be orphaned intentionally or
unintentionally. An intentionally orphaned process runs in the background without any manual
support. This is usually done to start an indefinitely running service or to complete a long-running
job without user attention.

 An unintentionally orphaned process is created when its parent process crashes or terminates.
Unintentional orphan processes can be avoided using the process group mechanism.

 Daemon Processes

 Some processes run in the background and are not in the direct control of the user. These are
k n o w n a s d a e m o n p r o c e s s e s . T h e s e p r o c e s s e s a r e u s u a l l y s t a r t e d w h e n t h e s y s t e m i s bo o t s t r a p p e d
and they terminate when the system is shut down.

 Usually the daemon processes have a parent process that is the init process. This is because the
i n i t p r o c e s s u s u a l l y a d o p t s t h e d a e m o n p r o c e s s a f t e r t h e p a r e n t p r o c e s s fo r k s t h e d a e m o n p r o c e s s
a n d t e r m i n a te s .
Process Synchronization in Windows
 Win do ws oper ati ng syst em is a multith read ed ker nel t ha t pro vid e s uppo r t for real t ime
applicatio n a nd multiproce ssors. On un iprocessor s ys te m, Wi nd ows pr ov ides in terr upt
ma sks to pro te ct access to global resources. It pr ote cts acce ss t o glob al re so ur ce us in g
s pin lo ck. The ke rn el uses spin locks only to prote ct sh or t cod e se gmen t like So lari s. The
ke rne l en sures that while holdin g a spinlock, a threa d wi ll nev er b e pree mpted.

 Win do ws pro vi de dispatche r obje ct for thread syn chr on izatio n acco rdi ng to s ev era l
d iffer en t mechan isms in cludin g mutexe s, sema pho re s, ev en ts and t imer s. The s ys tem
pr otects shar ed dat a by requiring a thread to ga in o wner shi p o f a  mutex  fo r acces si ng the
d ata an d whe n it i s fin ished, relea se s the ownersh ip.

 Ev en ts   acts as a con dition a l variable t o n ot ify a wai ting thr ead when des ired con diti on
o ccurs .

 Tim ers a re  use d to n otify on e or more thre ad when t ime expir ed.
 Dispatcher objects  may be either signaled state or a non-signaled state.

 Signaled state indicates that an object is available and a thread will not block when
acquiring the object.

 Non-signaled state indicates that an object is not available and a thread will block when
trying to acquire the object.

 The below figure shows the state transitions of a mutex lock dispatcher object −
Process Synchronization in Solaris(Unix based OS)
 S o l a r i s i m p l e m e n t s v a r i e t y o f l o c k s t o s u p p o rt m u l t i t a s k i n g , m u l t i t h r e a d i n g a n d m u l t i p r o c e s s i n g . I t
uses adaptive mutexes, conditional variables, semaphores, read-write locks, turnstiles to control
a c c e s s t o c r i t i c a l s e c ti o n s .

 An adaptive mutex uses for protecting every critical data item which are only accessed by short
code segments.

 O n A m u l t i p r o c e s s o r s y s t e m i t s ta r t s a s a s t a n d a r d s e ma p h o r e s p i n - l o c k . I f t h e l o c k i s h e l d b y a
t h r e a d w h i c h i s r u n n i n g o n a n o th e r C P U t h e n t h e t h r e a d s p i n s . I f th e l o c k i s h e l d b y a t h r e a d w h i c h
i s c u r r e n t l y i n r u n s t a te , t h e t h r e a d b l o c k s , g o i n g t o s l e e p u n t i l i t i s a w a k e n e d b y t h e s i g n a l o f
releasing the lock.

 T h e s p i n - w a i t i n g m e t h o d i s e x c e e d i n g l y i n e f fi c i e n t i f c o d e s e g m e n t i s l o n g e r . S o   c o n d i t i o n a l
v a r i a b l e s , s e m a p h o r e s   a r e u s e d fo r t h e m .

 S o l a r i s p r o v i d e s   R e a d - W r i t e  l o c k t o p r o t e c t th e d a t a a r e fr e q u e n t l y a c c e s s e d b y l o n g s e c t i o n o f
code usually in read-only manner.
 It uses  turnstiles  to order the list of threads waiting to acquire either an adaptive
mutex or read-writer lock. Turnstile is a queue structure containing threads blocked on
a lock. They are per lock holding thread, not per object. Turnstiles are organized
according to priority-inheritance which gives the running thread the highest of the
priorities of the threads in its turnstiles to prevent priority inversion.

 Locking mechanisms are used by kernel is also used by user-level threads, so that the
locks are available both inside and outside of the kernel. The difference is only that
priority-in heritance in only used in kernel, user-level thread does not provide this
functionality.

 To optimize Solaris performance, developers refin e the locking methods as locks are
used frequently and typically for crucial kernel functions, tuning their implemen tations
and use to g ain great performance.
Process Synchronization in MS-DOS

 MS-DOS doesn’t support reentrant code (Basis for Multitasking)

 Programs can’t break out middle of DOS routine and then restart routine from
somewhere else.

 Each job runs in complete segments and is not interrupted midstream.

 Interrupt handlers allow the saving of all information about parent program
that allow its proper restart after child program has finished.
Process Synchronization in ANDROID
 In Andro id, ev ery tim e w h en us er s t a rt up a a p plicat io n, it w ill genera t e a L inux p ro ces s a nd a
m a in t hrea d. N o rma lly, a ll co mp o nen ts o f a n o ngo in g a pp lica t io n a re ma int a ined in t his pro ces s
a nd t h rea d. I f res o urces are run ning o ut , Andro id w o uld t ry to s t o p s o me t hrea ds t o k eep
runn ing t hi s a pp licat io n.

 T he mo s t int eres t ing t hings t ha t I am ca re a bo ut t he A ndro id t h rea d m a nag em ent is h o w t o


co n duct a pa inles s t hrea d w it hin a s ing le t h rea d m o del. Andro id is us ing a s ingle t hrea d mo del:
w hen yo u f irs t s t a rt a n Andro id a pp lica t io n, a t hrea d ca lled "m ain" is a ut o ma t ica lly crea t ed.

 T he ma in th read, a ls o ca lled t he U I t hrea d, is v ery i mpo rta nt beca us e it is in ch ar ge o f


disp a tch ing t he ev ent s to t he a p pro p ria te w idg et s and th is includes t he dra w ing ev ent s . I t is
a lso t he t h rea d yo u int era ct w it h Andro id w idget s o n. F o r ins ta nce, if yo u t o uch t he a but t o n o n
s creen, t he UI t hrea d dis pa t ches t h e t o u ch ev ent t o t h e w idget w hich in tu rn s ets it s pres s ed
s t at e a nd p o s t s a n inv a lida t e reques t t o t h e ev ent queue.
 T h e U I th r e a d d e q u e u e s t h e r e q u e s t a n d n o t i fi e s t h e wi d g e t t o r e d r a w i ts e l f. H o w e v e r , t h i s
s i n g l e t h r e ad m o d e l c o u l d g e t i n v o lv e d i n t o p o o r pe r f o r m an c e , b e c a u s e th e U I t h r e a d c ou l d b e
b lo c k e d b y th e o n g o i n g ta s k s , s u c h a s n e t w o r k an d e tc . T h u s , t h e s u b - t h r e a d s ’ t as k s s h o u ld n o t
b e h a n d l e d b y m a i n U I th r e a d . T o s o lv e th i s pr o b l e m , A n d r o i d i n t r o d u c e s a m e t h o d t h a t c o m b i n g
M e s s a g e q u e ue , h an d l e r an d lo o p e r to e x c h a n g e m e s s a g e s b e tw e e n th r e ad s .

 M e s s ag e Q u e u e i s i n v o l v e d t o s t o r e t h e m e s s a g e s pu b l i s h e d b y h an d l e r . I t i s m a i n t ai n e d b y t h e
t h r e ad .

 T h r o u g h H a n d l er , a n i n s t an c e c o u l d b e s e n t . Ev e r y h an d l e r i s r e l a te d w i th u n i q u e th r e a d a n d
i t s m e s s ag e q ue u e . W h e n a H an d l e r i s c r e at e d , i t i s b o u n d to th e m e s s ag e q ue u e o f th e t h r e a d
t h a t c r e a te d i t. O n d e fa u l t, i t w i l l o n l y a s s o c ia t e d w i th t h e t h r e ad s th at c r e at e d . T h a t m e an s ,
i f t h e t h r e ad s s e n d m e s s a g e t o o t h e r s , i t w i l l o n l y b e s e n t t o t h e a s s o c i at e d m e s s ag e q u e u e .

 L o o pe r i s l i k e a “ b r i d g e ” b e t w e e n h a n d l e r a n d m e s s a g e q ue u e . A p pl i c a t i o n t h r e a d s fi r s t p u t th e
m e s s ag e to l oo p e r t h r o u g h h a n d l e r , t h e n l o o pe r pu t th e m e s s ag e i nt o m e s s ag e qu e ue . M e a n w h i l e ,
l o o pe r b r o ad c a s t th e m e s s ag e to al l h an d l e r s fo r t h e t h r e a d s .
Process Synchronization in IOS
 Each process (application) in Mac OS X or iPhone OS is made up of one or more
threads, each of which represents a single path of execution through the
application’s code. Every application starts with a single thread, which runs the
application’s main function.

 Applications can spawn additional threads, each of which executes the code of a
specific function. When an application spawns a new thread, that thread
becomes an independent entity inside of the application’s process space. Each
thread has its own execution stack and is scheduled for runtime separately by
the kernel. A thread can communicate with other threads and other processes,
perform I/O operations, and do anything else you might need it to do.
 Because they are inside the same process space, however, all threads in a sing le
application share the same virtual memory space and have the same access rig hts as the
process itself. Threads itself in iPhone OS costs allocation memories from kernel and
the programer’s space.

 Creating threads is inv olving different methods, such as using NSThread, POSIX
Threads and etc. Threads created usin g these techniques inherit a default set of
attributes, determined by the technology you use. To terminate a thread, the
recommended way is to let it exit its entry point routine normally, rather than killing
threads explicitly because this would poten tially result in memory leak.
What is Interprocess Communication?
 Interprocess communication is the mechanism provided by the operating system
that allows processes to communicate with each other. This communication could
involve a process letting another process know that some event has occurred or
the transferring of data from one process to another.

 A diagram that illustrates interprocess communication is as follows −


Synchronization in Interprocess Communication
 Sy nc h r o n i za t i o n i s a ne c e s s a r y p a r t o f i nt e r p r o c e s s c o m m u n i c a t i o n . I t i s e i t h e r p r o v i d e d b y t h e
i nt e r p r o c e s s c o n t r o l m e c h a n i s m o r h a nd l e d b y t h e c o m m u n i c a t i n g p r o c es s e s . S o m e o f t h e m e t h o d s
to provide synchronization are as follows −

 Sem a p h o r e - A s em a p h o r e i s a v a r i a b l e t h a t c o nt r o l s t h e a c c e s s t o a c o m m o n r es o u r c e b y m u l t i p l e
p r o c e s s e s . T h e tw o t y p es o f s e m a p h o r e s a r e b i n a r y s em a p h o r e s a n d c o u n t i n g s em a p h o r es .

 Mu t u a l Ex c l u s i o n – M u t u a l e xc l u s i o n r e q u i r e s t h a t o n l y o n e p r o c e s s t h r e a d c a n e n t e r t h e c r i t i c a l
s e c t i o n a t a t i m e. T h i s i s u s ef u l f o r s y nc h r o ni z a t i o n a n d a l s o p r e v e n t s r a c e c o n d i t i o n s .

 B a r r i e r - A ba r r i er d o e s no t a l l o w i nd i v i du a l p r o c e s s e s t o p r o c e e d u n t i l a l l t h e p r o c e s s e s r e a c h i t .
Ma n y p a r a l l el l a n g u a g e s a nd c o l l e c t i v e r o u t i ne s i m p o s e b a r r i e r s .

 Sp i n l o c k - T h i s i s a t y p e o f l o c k . T h e p r o c es s e s t r y i n g t o a c q u i r e t h i s l o c k w a i t i n a l o o p w h i l e
c h ec k i n g i f t h e l o c k i s a v a i l a b l e o r no t . T h i s i s kno w n a s bu s y w a i t i n g b e c a u s e t h e p r o c e s s i s n o t
d o i ng a n y u s e f u l o p e r a t i o n e v en t h o u gh i t i s a c t i v e .
Approaches to Interprocess Communication
 T h e d i f f e r e n t a p p r o a c h e s t o i m p l e m e n t i n t e r p r o c e s s c o m m u n i c a t i o n a r e g iv e n a s f o l l o w s −

 P ip e - A p i p e i s a d a t a c h a n n e l t h a t i s u n id ir e c t i o n a l . T w o p ip e s c a n b e u s e d t o c r e a t e a t w o - w a y
d a t a c h a n n e l b e t w ee n t w o p r o c e s s e s . T h is u s e s s t a n d a r d i n p u t a n d o u t p u t m e t h o d s . P ip e s a r e u s e d
in all POSIX systems as well as Windows operating systems.

 S o c k e t - T h e s o c ke t is t h e e n d p o in t f o r s e n d i n g o r r e c e i v in g d a t a i n a n e t w o r k . T h i s is t r u e f o r
d a t a s e n t b e t w e e n p r o c e s s e s o n t h e s a m e c o m p u t e r o r d a t a s e n t b e t w e e n d if f e r e n t c o m p u t e r s o n
t h e s a m e n e t w o r k. M o s t o f t h e o p e r a t i n g s y s t e m s u s e s o c k e t s f o r i n t e r p r o c e s s c o m m u n ic a t i o n .

 F i l e - A f i l e is a d a t a r e c o r d t h a t m a y b e s t o r e d o n a d i s k o r a c q u ir e d o n d e m a n d b y a f i l e s e r v e r .
M u l t i p l e p r o c e s s e s c a n a c c e s s a f i l e a s r e q u i r e d . A l l o p e r a t in g s y s t e m s u s e f i l e s f o r d a t a s t o r a g e .

 S i g n a l - S ig n a l s a r e u s e f u l i n in t e r p r o c e s s c o m m u n ic a t i o n in a l i m i t e d w a y . T h e y a r e s y s t e m
m e s s a g e s t h a t a r e s e n t f r o m o n e p r o c e s s t o a n o t h e r . N o r m a l l y , s ig n a l s a r e n o t u s e d t o t r a n s f e r
data but are used for remote commands between processes.
 S hared Me mo ry - S ha red memo ry is t he memo ry t ha t
ca n be s imult a neo us ly a cces s ed by mult iple pro ces s es .
T his is do ne s o t ha t t h e pro ces s es ca n co mmu nica t e
w it h ea ch o t her . A ll PO SI X s ys tems , a s w ell as
Wi ndo w s o p erat ing s yst ems us e s h a red m em o ry.

 M essage Q ue ue - Mult iple pro ces s es ca n read and


w rit e da t a t o th e mes s a ge q ueue w i th o ut being
co n nect ed to ea ch o t h er. Mes s a ges a re s t o red in t he
queue unt il t h eir recip ient r et riev es t hem . Mes s a ge
queues a re quit e us ef ul f o r int erp ro ces s
co m munica t io n and are us ed by m o s t o pera t ing
s yst em s .

 A dia gra m t ha t dem o ns tra t es m es s a ge queue a nd


s ha red memo ry met ho ds o f int erpro ces s
co m munica t io n is a s f o llo w -
DEADLOCK HANDLING
 DOS :- As it is single tasking OS , so no deadlock occurs.

 Windows :- Windows ignores the deadlock.

 Linux :- Linux ignores the deadlock.

 Unix :- Unix ignores the deadlock.

 IOS :- iOS ignores the deadlock.

 Android :- Android detects and recovers the deadlock.


CPU Scheduling

MS DOS WINDOWS UNIX

LINUX IOS ANDROID


CPU Scheduling

MS DOS
 Uni-programming system

 Processes don’t execute in parallel

 Time spent waiting for I/O is wasted


CPU Scheduling

WINDOWS
 Quantum based preemptive priority
scheduling algorithm

 Round robin technique with a multi-


level feedback queue for priority
scheduling
CPU Scheduling

UNIX
 Multi-level feedback queue

 Round robin algorithm within


individual priority queues
CPU Scheduling

LINUX
 Time-sharing Algorithm

 Combination of preemptive priority


and round robin algorithm

 Implements FIFO and round robin real


time scheduling classes
CPU Scheduling

IOS
 Uses a priority – queue based
scheduling system

 Uses derivation of Mach Kernel’s


scheduler
CPU Scheduling

ANDROID
 Priority based preemptive task
scheduling

 Uses O(1) scheduling algorithm ,


named as Completely Fair Scheduler
MEMORY
MANAGEMENT
WINDOWS
W i n d o w s p r o v i d e s a n i l l u s i o n o f a f l a t v i r t u a l a d d r e s s s p a c e ,
when in reality, there is a much smaller amount of physical
memory.

L a z y a l l o c a t o r . T h e V i r t u a l M e m o r y m a n a g e r o f t h e o p e r a t i n g
system use Demand Paging to overcome the space limitation of
Physical memory.

 W i n d o w s 1 0 i m p l e m e n ts a L R U - a p p r o x i m a t i o n c l o c k a l g o r i t h m
for page replacement.
•T h e r e p l a c e m e n t p o l i c y i s a c o m bi n a t i o n o f g l o b a l a n d l o c a l .

•A global replacement algorithm is free to select any page in memory. Local page

replacement assumes some form of memory partitioning that determines how


many pages are to be assigned to a given process or a group of processes.
•  
UNIX
 UNIX memory management scheme includes swapping and
demand paging.

 Swapping consists of bringin g in each process in physical


memory entirely and running it. When the process is no
longer in use, the process will be terminated or is
swapped out to disk.

• Early versions of UNIX used variable partitioning with no


virtual memory scheme.

• Current implementation s of UNIX make use of paged


virtual memory.
UNIX is using least recently used algorithm for page
replacement. The least recently used algorithm replaces
the page that has not been used for the longest time, on
the assumption that the page will not be needed again. 
DOS
 No multitasking no virtual memory
• MS-DOS operating system uses Single Contiguous Allocation.
In this method, all types of computer's memory (called
conventional memory) except a small portion which is
reserved for the OS (upper memory) is available for one
application. memory. An embedded system also runs on a
single application.

•  When DOS executes a program, it gives all of the available


memory, from the start of that program to the end of RAM, to
the executing process. Any attempt to allocate memory
without first giving unused memory back to the system will
produce an "insufficient memory" error.
Linux
• N o w a d a y s L i n u x u s e s t h e b u d d y s y s t e m t o m a n a g e a l l o c a t i o n o f me m o r y , p o s s i b l y

b e c a u s e i t i s a l l o c a t i n g m a n y s t r u c t u r e s w h i c h a r e a l r e a d y p o w e r o f t w o , l i k e f r a me s .

• T h e   b u d d y s y s t em   i s a m e mo r y a l l o c a t i o n a n d m a n a g e m e n t a l g o r i t h m t h a t m a n a g e s m e mo r y i n   p o w e r
o f t w o i n c r e m e n t s . A s s u m e th e m e m o r y s i z e i s 2 U , s u p p o s e a s i z e o f S i s r e q u i r e d .

• I f 2 U - 1 <S <= 2 U :   A l l o c a t e t h e w h o l e b l o c k

• E l s e :   R e c u r s i v e l y d i v i d e t h e b l o c k e q u a l l y a n d t e s t t h e c o n d i ti o n a t e a c h ti me , w h e n i t s a t i s f i e s ,
allocate the block and get out the loop.

• S y s te m a l s o k e e p t h e r e c o r d o f a l l t h e u n a l l o c a t e d b l o c k s e a c h a n d c a n me r g e t h e s e d i f fe r e n t s i z e
blocks to make one big chunk.

• Advantage –

• Easy to implement a buddy system


 Allocates block of correct size

 It is easy to merge adjacent holes

 Fast to allocate memory and de-allocating memory

 D i s a d va n t a g e –

 It requires all allocation unit to be powers of two

 It leads to internal fragmentation

 E x a mp l e –
Consider a system having buddy system with physical address space
128 KB. Calculate the size of partition for 18 KB process.
Solution –

 So, size of partition for 18 KB process = 32 KB.

 I t d i vi d e s b y 2 , t i l l p o s s i b l e t o g e t m i n i m u m b l o c k

 to fit 18 KB.
ANDROID
• The A ndro id  Run tim e ( AR T ) and Dalv ik v irt ua l ma chine us e pa ging a nd  memo ry- ma p ping
(mm a pp ing) t o   m ana ge m em o ry. T his mea ns t h a t a ny m emo ry a n a p p mo dif ies —w het her by
a llo ca t ing new o bjects o r t o uching mma p ped pa ges —rema ins res ident in R AM a nd ca nno t be
pa ged o ut . 

• The o nly w a y t o relea s e mem o ry f ro m a n a p p is t o releas e o bject ref erences t h at t he a pp


ho lds , ma k ing t h e memo ry av a ilable t o t h e ga rba ge co llect o r. Th a t is w it h o ne except io n: a ny
f iles mm a pped in w it ho ut mo dif icat io n, s uch a s co de, can be pa ged o ut o f R AM i f t he s ys tem
w a nt s to us e t ha t m emo ry els ew h ere.
IOS
• When an object is created, it has a
reference count of 1. The creator is
the owner.

• Ev ery time, a new owner is added, the


reference count increases by 1

• Ev ery time, a owner relinquishes control


, the reference count decreas es by 1

• When reference count is 0, runtime


destroys the object by callin g dealloc()
on it.
File System
File system is a method for storing an d organizing computer files and the data they contain
to make it easy to find and access them.

Most file systems make use of an underlying data storage device such as Hard Disks
that offers access to an array of fixed-size blocks which is the smallest logical amount
of disk space that can be allocated to hold a file.

F ile systems typically have directories which associate file names with files, usually by
connecting the file name to an index in a file allocation table of some sort, such as the
F AT in a DOS file system, or an inode in a Unix-like file system.

F ile names are simple strings, and per-file Metadata is maintained which is the
bookkeeping information, typically associated with each file within a file system.

Metadata could contain file attributes such as file size, data and time of creation or
modification o f the file, owner of the file, access permissions etc.
Types of File System
File system types can be classified into disk file systems, n etwork file systems and
flash file systems.

A disk file system is a file system designed for the storage of files on a data storag e
device, most commonly a disk drive e.g. FAT, NTFS, etx2, ext3 etc.

A network file system is a file system that acts as a client for a remote file access
protocol, providing access to files on a server e.g. NFS, SMB etc.

A flash file system is a file system designed for storing files on flash memory devices.
File System and OS
 Operating systems provide a file system, as a file system is an integral part of any modern
operating system.
 Windows Operating system supports FAT and NTFS File Systems
 Linux popularly supports ext4 File Systems and Ext, Ext2, Ext3, JFS, XFS, btrfs and swap are also
available
 Other flavors of Operating Systems may support other File Systems like
 UFS in many UNIX Operating Systems and
 APFS In MAC,IOS
 Android  supports FAT32/Ext3/Ext4  file system.
 The MS-DOS filesystem  is File  Allocation Table, or FAT16 (FAT for short).
 All Operating Systems provide a user interface like Command Line (CLI) or File Browser to access
and manage File System information.

Windows Linux MS-Dos UNIX Android iOS

File System FAT, NTFS Ext4, Ext, Ext2, FAT UFS FAT32/Ext3/Ext4  APFS
Ext3, JFS, XFS,
btrfs and swap
Properties of File System
  Sparse file  is a type of  computer file that attempts to use  file system space more
efficiently when the file its elf is partially empty.

  Filesystem-level en cryption is a form of  disk encryption where individual files or

directories are  encrypted by the  file system itself.

 Data deduplication is a techn ique for eliminating duplicate copies of repeating data
FILE SYSTEM SPARSE FILES Filesystem-level Data deduplicati
encryption on
FAT PARTIAL NO NO

NTFS YES YES YES


APFS YES YES NO
EXT YES NO NO
UFS YES NO NO
Directory Structures
A  d irec t or y  is a c o nta iner that is used to con tain fo lders
and file s. It o rg a niz e s files and fo ld ers in a hierarch ical
man ner.

TYPES: 

Single-level directory –

In it, all files are contained in the same directory


which makes it easy to support and understand.
Two-level directory –

In the two-level directory structure, each user has their


own  user files directory (UFD) . The UFDs have similar
structures, but each lists only the files of a single
user. 

Tree-structured directory –  

A tree structure is the most common directory


structure. The tree has a root directory, and every file
in the system has a unique path.  
Acyclic graph directory –  

An acyclic graph is a graph with no cycle and allows


us to share subdirectories and files. The same file or
subdirectories may be in two different directories.  

General graph directory structure –

In general graph directory structure, cycles are allowed


within a directory structure where multiple directories
can be derived from more than one parent directory.  

FILE SYSTEM FAT NTFS APFS EXT UFS

Directory Single-level B-tree B-tree Table tables


contents directory  variant
Windows Linux Mac UNIX Android iOS
Market Share 30.84% 1.01% Less than 1% Less than 1% 41.43% 16.1%
Cost, Windows 10 Free Bundled with Unix Free Bundled with
availability Home US$119, hardware; Free costs $1,407 hardware and
Windows 10 updates and per user free updates
Pro US$199[7 upgrades via given to most
Mac App Store existing users,
for users of subject to
Mac OS X 10.6 hardware
or later requirements

Licence Proprietary;  GPLv2 and Proprietary Varies; some Apache 2.0, Proprietary


Source-availabl others (the  higher level versions are  GNU GPLv2  higher level
e name "Linux" API layers; proprietary, API layers;
is a trademark) open source others are free/ open source
core system open-source so core system
(Apple Silicon- ftware (ARM
Intel-PowerPC versions): 
versions):  APSL, GNU
APSL, GNU GPL, others
GPL, others
Some Applications

WINDOWS MS-DOS

Exam p l es of ap pl i cat i o n s t hat ru n o n MS-DOS a llows the use r to navigate,


Wi n d ows OS are t h e Mi cr os o ft O ut l o o k, open, a nd otherwise mani pulate files on
In t ern et Ex pl or er, Rem ot e Desk t o p their computer f rom a comma nd line
Co n di t i o n, S n i pp i ng Too l , an d nu mer o us instea d of a   GUI  like  Windows. Today,
ot h ers . MS-DOS is no longer used; howe ver, the
command shell, mor e c ommonly known
as the  Windows command line  is still
used by many user s
Some Applications (Cont.)

UNIX LINUX

The applications and utility layer in Unix To p 10 ap pl i cat i on s  Li n ux Ap pl i cat i o n s


includes the word processors, graphics
fo r 2 0 21 , F i r efo x, Li b reOffi c e,VS C od e,
programs, database management programs,
commands etc. The application programs provide VLC Med i a P l aye r, Th u nd erb i rd ,
an application to the end users. For example, a Fl ames h ot , XDM, Ti m es hi f t , Op en S ho t
web browser is used to find information while
gaming software is used to play games. The
requests for service and application
communication systems used in an application
by a programmer is known as an application
program interface (API).
Some Applications (Cont.)

ANDROID IOS

Android devices come with preinstalled Google i OS dev i ces co me wi t h  p r ei ns t al l ed ap ps


apps including Gmail, Google Maps, Google
 dev el o ped b y Ap p l e i nc lu d i ng Mai l ,
C h r o m e , Yo u Tu b e , G o o g l e P l a y M u s i c , G o o g l e
P l a y M o v i e s & T V, a n d m a n y m o r e . A m o n g t h e Maps , T V, Mu si c, F aceTi me, Wal l et ,
various Application categories developed by us Heal t h, and m any mo r e. App l i cat i o ns ( "
on the android platform, some of them are; app s") are t h e m os t g en eral f or m o f
Communication Application, Business
app l i cat i o n  s o ft war e t h at can b e i n st al l ed
Application, Multimedia Application, Internet
Application, Fun/Entertainment Application, on i OS .
Gaming Application, Utility and Security
Application. 
References
 htt ps :/ /g s . statcou nter. com /o s -m a r ket-s h a re

 htt ps :/ /en .wi ki p e d i a . o rg / wi ki /

 htt ps :/ /w w w. i j ca on l i n e. org /a rch i ve s /vol u m e1 76 /n u m b e r3 9/a d e kot u j o- 2 02 0- i j ca - 92 0 49 4 . p d f


Thank you

You might also like