100% (1) 100% found this document useful (1 vote) 704 views 141 pages OS Book Basic To Advance
### Study Guide for Operating Systems (OS)
1. **Basics & Structure:** Understand OS types, functions, services, and architectures using "Operating System Concepts" by Silberschatz, Galvin, Gagne and "Modern Operating Systems" by Tanenbaum.
2. **Advanced Topics:** Explore processes, memory management, scheduling, security, and advanced systems with the same books, plus "Distributed Systems: Principles and Paradigms" by Tanenbaum and Van Steen.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here .
Available Formats
Download as PDF or read online on Scribd
Go to previous items Go to next items
Save OS book basic to advance For Later
UT Erary
ST are)
Se
WSBTEI SCHEME PATTERN |
ae H
Coe we a
eon) i
an WISE Sa Su
AT emis
PG USSU SR TTL‘sper Rorzed Slabs of
MSBTE - I SCHEME
Operating System
T.Y. Diploma (Semester - V)
Computer Engineering / IT Program Group (CO/CMVIF/CW)
Iresh A. Dhotre
ME. (Information Technology)
EcFacully, Sinhgod College of Engineering
Pune
Poonam A. Vengurlekar
Pursuing ME. (), [Link], (7)
Lecturer, Thakur Polytechnic
Kandivali East, Mumbo!
Hitesh K. Mhatre
ME. (Computer Engineering)
VC Head of Computer Engineering Department
Provin Potil College of Diploma Engineering
and Technology
Thone
+. TECHNICAL
PUBLICATIONS vos reziapotet cy
AnUpTirst fr Koowedge —_miNsienorh contestant
oOperating System
LY, Diploma (Serester- V)
‘Computer Ensineesing / IT Prosram Group (CO/CM/IF/OW)
Fn Edo Jane 2019
© Copyright with Authors
{All publishing rights (printed and ebock version) reserved with Technical Publications. No part of this baok
should be reproduced in any form, Elecronic, Mechanical, Photocopy or any information storage and
retrieval tem without aor permission in wring, From Technical Publications, Pune
Publhedlby: wy, OMes No. 412, Solow Poth Pere - 411000, M8. NDA
SP TECHNIGAL 2 ""S°3,25.2).ci pei is Moye
Printer
Sree
Sind oral ane, Nido lbp,
Price 8120
Isuy 978-98-89140-02-2
ih
BUSSSITROO2?
9780389120089 (11 woPREFACE
The importance of Operating System is well known in various engineering fields.
Overwhelming respondse to our books on various subjects inspired us to write this Book.
The boob is structured to cover the key aspects of the subject Operating System.
The book uses plain, lucid language to explain fundamentals of this subject. The book
provides logical method of explaining various complicated concepts and stepwise
‘methods to explain the important topics. Each chapter is well supported with necessary
illustrations, practical examples and solved problems. All chapters in this book are
arranged in @ proper sequence that permits each topic to build upon earlier studies. All
care has been taken to make students comfortable in understanding the basic concepts
of this subject
Board questions have been added at the end of each section to help the students in
picking important points from that section.
The book not only covers the entire scope of the subject but explains the philosophy of
the subject. This makes the understanding of this subject more clear and makes it more
interesting. The bock will be very useful not only to the students but also to the subject
teachers. The students have to omit nothing and possibly have to cover nothing more.
‘We wish 10 express our profound thanks to all those who helped in making this book a
reality. Much needed moral support and encouragement is provided on numerous
occasions by our whole family, We wish to thank the Publisher and the entire team of
Technical Publications who have taken immense pain to got this book In time with
quality printing.
Any suggestion for the Improvement of the book will be acknowledged and well
appreciated.
Authers
2. A Dhetre
Poonam A, Dengurtekar
Hutesh K. Mateo
Dedieated to God.
aSYLLABUS
Operating System (22516)
Teaching Examination Scheme
‘Sehome
creat Theory Practical
(L+T+P)|Poper| ESE PA Total ESE PA Total
ute es
ax | atin | max | min | Max | min | max | Min | max | atin | Max | min
af-[2) [| [a | | @ | wo] © [ase] wo | 2s | | so | 2
Unit Unit Outcomes (UOs) Topics and Sub «topics
{in cognitive domain)
Unit -1 1a. Explain the functioning of given | 11 Operating System - Concept,
overew of component of O5, Components of operating.
system, operations of OS:
owns tb, Explain characteristics of the FE ee
Biven type of operating system. Resource management, Security
1c. eotify type of operating | REOURE man »
system sullable for the giver | Yowy of O8, User view, System
type of application ve
1d. Exscute command on command | 4.) pifrent Types of Operating
line for the given task. systems- Batch operating system,
Malt Programmed, © Time
Shared "OS, Muliprocessor
Systems, Distributed. Syste,
Real time systems Mobile OS
(Android, 05)
13. Command line based OS - DOS,
UNIX
GUI based OS - WINDOWS,
LINUX
Unit 2a Suc stp, and rst the given | 24 Different Suviews of Operating
Componants'ot | 2>- Explain uso of tho given Systom | 22 System Calls- Concept, types,
Operating System cal of specified 05. of system calls
2c, Explain process the OS follows | 23 05 Components Process
Jn-managing the given resource. ‘Management, Main Memory
2d. Explain use of the given Management, File Management,
‘operating system tool V0 System management.
Seconclary stocage managernent
24 Use of operating system tool
‘user management, security
policy “device manegemnent,
performance monitor, task
Scheduler
omunit 3a. Explain functions carried out in] 31 Process: process states, Process
Process Management |. BE BYES Pres tt Contzol Block (PCB).
acess Management|, Describe the fmetion of the | 32 Process Scheduling- Scheduling
given component of process | Queues, “Schedules, Context
ack in PCE switch
Se Byplain. characteristics of the| 33. Inerprocess commuriation
given mulitiveating model (PC) troduction, shared
Bd. Deserhe method of executny memory system and message
the, given. process command | Passing system
vith Example 34 Threads - Benefits, users and
kere! threads, Multithreading,
Models: Many to One, One 10
One, Many t© Many
25 Execute process commands- lke
po. walt leep, ext, il
Unit = “a. Justify the need and objective of | 41. Scheduling types - scheduling
given job scheduling criteria | Objectives, CPU and 1/0 burst
PU Scheduling and | Frith relevant example eycies, Preempave, Now
‘Algorithms 4. Explain with example she ee ee
procedure of allocating CPU to ul ni.
fhe. given process ing the | 42 Types of Scheduling. algorithms.
specled 08 Fist. come fist served (FCFS),
de Coloulaw tumarvund time and | Shottes Job First (JM), Shortest
average, wating, time of the | Remaining Time(SRTN), Round
fiven scheduling gorithm. Robin (RR) Priority scheduling,
4d, Explain functioning ofthe piven | , . Tuutlevel queue scheduling
rekessury cOndiuon leading, to | 43 Deadlock- System Models,
deadlock Necessary Conditions leading
to Deadlocks, Deadlock
Handling: Preventions,
avoidance
Unit-v Se Desbe ihe working of | SI Baie Memory Managoret
specified memory management ming, a
wiley Fnction. Varible, free Space
aregomen °
jain characteristic of the| management ‘Techniques
ppm owt of te] at
fecmnigues 52 Virtual Memory: Introduction 40
Se Write algorithm for the given) Pasing ‘Segmentation,
wate igen for, eo PO din mi
Sd, Calculate Page fault for the | 53. Page Replacement Algorithms:
given page reference string
FIFO, LRU, Optimal
7Unit - vi
Fille Management
Explain structure of the given
file system with example.
Describe mechanism of the given
file access method.
Explain procedure to create and
access directories and assign
the given files access
permissions,
Explain features of the given
Raid level structure of “hard
disk.
6
62
63
File = Concepts, Attributes,
Operations, types and File
System Structure
‘Access Methods - Sequential,
Direct, Swapping, File
“Allocation Methods =
Contiguous, Linked, Indexed,
Directory structure Single level ,
two levels, qeestructured
directory, Disk Organization and
disk Structure ~ Physical
structure, Logical structure,
aid structure of disky raid level
Ot 6.
woTABLE OF
ss
Chapter-1 Overview of Operating System
(1=1) to (1 +28)
1.4 Operating System Concept «....[Link] Tel
1.2. Components of Computer System. el
1.3 Operation of OS.
1.3.1 Dual Mode Operation
1.3.2 Resouree Management
1.33 Protection and Security
1 Views of 08,
LA User View
1.42 System View
15 Different Types of Operating System
1 Batch Operating System
1.5.11 Spooting, 7
1.52 Multiprogrammed OS 1-7
153. Time Shared OS Les
1.54. Difference betwoen time sharing OS and
Muliprogramming OS Leo
1.6 Multiprocessor OS. 10
1.6.1 Advamages and Disadvantages of
“Multiprocessor Systems 10
1.6.2. Symmetric Multiprocessing 10
1.63 Asymmetric Multiprocessor un
1.64. Difference between Symmetric and Asymmetric
Mukiprocessor ei
1.65. Differentiate between Multiprocessing and
Mukiprogramming OS
1.7 Distributed OS
wn
Client-Server Computing
72
173
Peerto-Pocr System
Distinguish between Client» Server and
Peerso-Peer Model
1.8 Reol Time Systems
wi)
CONTENTS
19 Mobile [Link] 1s
19.1 Andiiod. ... Leis
1.9.11 Android Architecire
[Link] Comparison of Android OS Vs iPhone OS
Features [ele
1.9.13 Android Benefits tele
192 ios leis
[Link] Media Layer te
1.9.22 Core Services Layer 1-20
1.9.23 Core OS Layer beat
1.10 Command Line based OS 1-22
1.10.1 Dos. 1-22
1.102. UNIX. 1-22
1.1021 Architecur of Unix OS, teas
LIL GUL based 0S 1-3
LAL Windows, 1-23
LALLA Windows Architecture tae
1.12 Two Marks Questions with Answers. “0
Lita
Chapter-2 Services and Components of
Operating System
(2-1) to (2-8)
21 Different Services of Operating System 2
22 System Calls 2-2
2.211 Clasification of System Call... 223
2.3. 0S Components . 2-4
23.1 Process Management 2-4
2.3.2 Main Memory Management, 2-5
23.3 File Management... 2-5
23.4 UO System Management. . 2-5
23,5. Secondary Storaze Mansgement ........ 2+
24 Use of Operating System Tools 2-6
2.5 Two Marks Questions with Answers 2-7Chapter-3 Process Management
(8-1) t0 (3-18)
3.1 Process Bi
3.11 Proves States 3-2
3.12 Process Control flock 3-2
3.1.3. Difforenee between Process and Program . 3-3
3.2 Process Scheduling 3-4
321 Schedulers 3-4
3.2.2. Difference between Long Term, Short Term and.
Moaium Term Scheduler 3-6
323. Content Switch 3-6
3 Inter-Process Communication 3-7
33.1 Shared Memory 368
33.2 Message Passing System 3-9
33.3 Features of Message Passing 3-10
3.4 Threads 3-01
3.4.1 Thread Benefits. 3-11
3.42 Difference between Thread and Process... 3= 1]
3.43 Thread Lifeeyele
3.4 User Level Thread
3.4.5 Kemel Level Thread
3.46 Dilerence between User Level and Kemel
Level Thread
3.4.7 Mulitneading Models
3.5 Execute Process Commands
3.5.1 ps Command
352. wait.
353. Sleep.
354 exit
355
ill
3.6 Two Marks Questions with Answers .....2. 3-17
Chapter-4 CPU Scheduling and Algorithms.
(41) to (4 +28)
4.1 Scheduling Types
4.1.1 Preemptive and Noxepreemplive Scheduling 4= 1
4.1.2 Difference between Preemptive and
"Non-preemptive Scheduling 4-2
41.3 CPU Scheduling Criteria 4.2
414 Dispatcher 4-2
42 Types of Scheduling Algorithms 4e3
4.2.1 First Come First Serve Scheduling 433
4.22 Shortest Job Fist Scheduling 403
4.23 Priority Scheduling 44
44.2.4 Round Robin Scheduling 404
42.5 Comparison between FCFS and RR... 4-4
4.2.6 Cornparison of CPU Scheduling Algorithm 4-5
42.7 Shortest Remaining Time Next 4e5
4.2.8 Multilevel Queue Scheduling 4-6
4.2.9 Multilevel Feedback Queve Scheduling... 4=7
4.3 Deadlock. 4e12
43.1 Sysiem Model an
4.3.2 Resource Allocation Graphs 4an14
4.3 Necessary Condition for Deadlock ans
43.4 Deadlock Handinge Deadlock Prevention . 4=15
43.5 Deadlock Avoidance 4-15
435.1 Banker's Algorithm 24-18
4.4 Two Marks Questions with Answers ....... 4-26
Chapter-5 Memory Management
(5-1) to (5-30)
8.1 Basic Memory Management ae
5.1.1 Punetions of Memory Management 5-1
5.1.2 Basie Hardware of Memory se
5.1.3 Address Binding 5-2
¥ TECHUEN. PUBLICATIONS" fap rac roadoo
5.14 Logical and Physical Address 5.2
5.15 Swopping. $03
5.2 Fixed Partitioning s-4
52.1 Dynamic Memory Partitions. ........0065-5
5.2.2 Memory Protection and Mapping. 5-6
5.3 Variable Partitioning S-7
5.3.1 Difference between Contiguous and
‘Nencontiguous Memory Alloeation. ......5=7
5.3.2 Fragmentation csneScl
5.3.3 Difference between Intemal and External
Fragmentation 5-8
53.4 Compection ene
53.5 Placement Algorithms. 25-9
4.4 Free Space Management Techniques .........5=10
8.5 Virtual Memory... s-12
SO Paging ...ecsesee sxnvera eS all
5.61 Protection and Sharing 5-16
5.62 Paging with TLB, s-17
5.63 Page Teble Structure 5-18
5.63.1 Multilevel or Hierarchical Page Table
vSe18
5.63.2 Hashed Page Tables 5-19
5.6.3 Inverted Page Table 5-19
564 Advantages of Poging 5-20
5.65 Disadvantages of Paging. 5-20
$8.7 Segmentation 5-20
5.7.1. Protection and Sharing 3-21
S72 AGVOMIOGES ooo esessesseseereeeeeeS=21
5.73. Disadvantages $221
5.7. Diflerence beoween Segmentation
und Paringississcitvscavscsevessoie SM
‘8.8 Page Replacement Algoritam ..... 5-22
58.1 FirstleeFiestOut 5-22
58.1.1 Belady’s Anomal 5-2
5.82 LRU Page Replecement Alport .....3=24
5.83. LRU Appronimetion Algorithms 5-25
5.84 Optimal Poge Replacement os 5-26
58.5. ifference between FIFO, LRU
snd Optimal. 5-27
5.9 Two Marks Questions with Answers 5-29
Chapter-6 File Management
(6-1) to (6-14)
Gite sea ccvovmeressernemmcnasaed él
6.1.1. File Concept... 6-1
6.1.2 File Arwibues 6-1
6.1.3 lle Types... 6
6.14 File operations. 6-2
6.15. File System Structures... 26
6.2 Access Methods 6-3
62.1. Sequential Access Method 63
62.2. Dineet Access Method 623
62.3. Swepping 6-4
624 Allocation Methods .......060s0cesees 624
62.41 Contiguous Allocation Got
62.42 Linked Allocation 65
62.43 Indexed Allocation 65
63 Directory Structures 66sec ee ee cence 66
63.1. Single Level Directory Sucture = 6-6
63.2 Two Level Directory Structure .....4.24 6-7
633. Tree Structured Directories... 6-7
634 - 6-8
635 6-9
63.6 RAID Structure. 6-10
6.4 Two Marks Questions with Answers ....... 6<13
Solved Sample Papers (8-1) to (S-4)
¥ EERE. PABUICATONS™ dapat now«
pe a owinsUNIT
OVERVIEW O!
F OPERATING SYSTEM
1.4 | Operating System Concept
Dofine operating system
‘+ An operating, system is a program that controls the
execution of application programs and acts as an
Interface between the user of a computer and the
‘computer hardware
What are the functions of OS 7
+ Operating system performs three functions :
1. Convenience : An OS makes a computer
more convenient to use.
Rfficiency : An OS allows the computer
system resources to be used in an fficient
Ability to evolve : An OS should be
constructed im such a way as to permit the
effective development testing and
introduction of system functions
without at the same time interfering with
Board Question
1. List amy four functions of operating systor
41.2 | Components of Computer System
+ Computer system consists of hardware device and
software that are combined to provide a tool to user
for solving problems.
+ Fig. 12.1 shows modern computer system.
+ Modern computer consists of one or two CPU with
main memory and various 1/0 devices. Common,
ae»
bus is used for
devices. Hach device has its own device controller.
communication between these
CPU and device controller uses memory cycle for
execution purposes. But memory cycle is only
available to one device at a time,
+ Bootstrap program is loaded when user start the
computer. It initials all the device connected to the
computer system and then loads required device
drivers.
«+ After this, operating system loads in the computer
system, In UNIX OS, an ‘init! is the first process
which execute by OS.
Intecrupt is software and hardware, It is used to
send signal to CPU, Software interrupt is sometime
called system call.
‘+ When interrupt is trigger. the CPU stops executing
the instruction and control is transfor to the fixed
location. Starting address is stored at fixed location
‘where the service routine executes.
“Interrupts do not alter the control flow of the
process executing on the processor.
Storage structure
«+ Processor access the data from main memory before
executing any instruction. Main memory is also
called Random Access Memory (RAM).
DRAM js used in main memory. Fig. 12.2 shows
‘hierarchy of storage device.
‘At the top of the hierarchy, we have storage on the
CPU registers. For accessing the CPU, it is fastest
form of storage.
+ Cache memory capacity is less than 1 MB.Operating Syste
comoter
Overview of Opting Sytem
Mouse
Fig. 1.2.1 Modem computer system
Fig. 1.22 Hierarchy of storage device
+ User program and data are stored in the main
memory, Main memory is volatile, so it cannot
stored permanently.
+ Storage system is classified as temporary storage or
permanent storage,
Top level storage devices are low capacity with
faster CPU access and bottom level storage devices
having very large capacity with slow CPU access
speed.
Wo structure
+ Every device uses a device controller to connect it
to the computer's address and data bus. Devices can
be classified as a block oriented or character
oriented, depending on the number of bytes
transferred on an individual operation
+ Storage devices are used to store data while the
computer is off
+ All the 1/0 devices are connected to each other by
using common bus. CPU and main memory is also
connected with this bus,
+ Various types of controller is used in the computer
system, Small Computer System Interface (SCSI)
controller can handle upto seven devices. Each
device controller have its own buffer,
*
TEERRUCAL PUBLICA. Ap tensOpecating System L
+ Device controller manage the data transfer between
peripheral device and its controller. Device driver is
handled by dovice controler.
VO operation stops
1. Device driver loads the registers within the
device controller,
2 Device controller takes action according to the
data loaded into the register.
3. Data is transfer from device to its local buffer
with the help of device controler
4. After completion of data transfer, the device
controller sends an interrupt signal to device
driver about data transfer completion operation,
5. Then control goos to operating system.
+ The device driver is the operating system entity that
controls CPU-/0 parallelism. The software that
communicates with device controller is called device
driver
+A device can be started by the device driver, and
the application program can continue operation in
parallel with the device operation
Board Question
1, List and drao a neat labelled diagram of four
components of computer system.
4.3 ] Operation of OS
+ For singleuser programmer operating systems,
programmer has the complete control over the
system. They operate the aystem from the console.
When new operating systems developed with some
additional features, the system control transfers
from programmer to the operating system.
Old operating systems were called resident
monitors, The operating system began to perform
‘many of the functions, like input-output operation
‘with the resident monitor,
+ Before the operating system, programmer is
responsible for the controls of input-output device
operations. As the requirements of programmers
from computer systems go on increasing and
development in the field of communication helps to
Overvsw of Operating Syst
the operating system to fulfill the needs of
programmers,
+ Sharing of resource among different programmers is
possible without increasing cost. It improves the
system utilization but problems increase. If single
system was used without share, an error occurs,
that could cause problems for only the one program.
‘which was running on that machine
In sharing, other programs also affected by single
program. For example, hatch operating system faces
the problem of infinite loop. This loop could
prevent the correct operation of many jobs. In
multiprogramming system, one erroreous program
affects the other program or data of that program.
+ For proper operation and crror free result,
protection of error is required. Without protection,
only single process will execute one at a time
otherwise the output of each program is separated
While designing the operating system, this type of
care must be taken into consideration.
+ Computer hardware detects the errors. Operating,
system handled this type of exrors, Execution of
illegal instruction or access of memory that is not in
the user's address space, this type of operation
found by the hardware and will trap to the
operating system.
+ Trap uses an interrupt vector and it transfer the
contralto the operating system. When
‘occurs, OS terminates the program abnormally
Hardware protection is used to handle this type of
situation
1.3.1 | Dual Mode Operation
‘+ For proper operation and correct output, operating,
system must be protected. The users program and
dala must be protected from any malfunctioning
program, Shared resource also needs some kind of
protection.
+ Dual mode uses user mode and monitor mode for
working of OS, The monitor mode also called
system mode, supervisor mode ot privileged mode.
«+ For indicating current mode of the system, mode bit
is used in the computer hardware. The mode bit is
© for monitor and 1 for user, With the mode bit,
user are able to distinguish between a task that is
executed in user mode or monitor mode.
¥ TECHWUCAL PUBLICATIONS fo up et oeOperating Sytem
verew of Operating System,
+ At the booting time, the hardware starts in the
‘monitor mode, then operating system is loaded. The
hardware switches from user mode to monitor
‘mode when interrupts occur. In monitor mode, OS
gains control of the system,
The dual mode operation provides the protection to
the operating system from unauthorised users. The
privileged instructions are executed only in the
monitor mode. The computer hardware isnot
allowed for executing the privilege instructions in
‘other mode, ie. user mode. If anybody tries to
execute the instructions in user mode, it is,
considered as illegal instruction and also traps it to
the operating system.
Software may trigger an interrupt by exceuting a
special operation called a system call. System call is,
fone type of request which is invoked by the user or
system, Using privileged. instructions, user will
interact with the operating. system. This type of
request is invoked by user to execute the privileged
instructions, As said earlier, this request is called
system call or monitor call. When a system call is
executed, itis treated by the hardware as a software
interrupt.
4.3.2 | Resource Management
A computer is a set of resources, These resource
provides various functions to the user. Functions
like data movement, storing of data and program,
operation on data are control by an operating,
system,
“Fig. L341 shows OS as a resource manager.
| 1 kerio
JOS kere] |—=[] pnnter
eer }—O Nowe
oer “NG controior 4 +O
‘program an!
ree] | Novoruoters ok
sce
ae
= =
Se
Fig. 4.31 08 as a resource manager
+The operating system is responsible for managing
tho all resources. portion of the OS is in. main
‘memory. This portion of the OS is called kernal
+ User program and data is also stored in remaining
parts of the memory. Allocation of main memory is
controlled by operating roraicer CPUrae |
Slaven,
Symmeteic multiprocessing Asymmete
is ensier to implement in mulliprcessing is dificult
‘operating systems ‘o implement.
Single OS manages all Separate 0S, or seperete
cores copy of same Os manage
Simultaneously. feath core
Masocaiew samy ek
cused.
Is uses concept of
masterslave concept
‘The processors
‘communicate with each
‘other through shared
memory.
4.6.5 | Differentiate between Mul
‘and Multiprogramming OS:
Shared memory is not
used for communication.
Maltiprocsesing
“Multiprocessing refers to
processing of multiple
‘st same time by
Foultiple CPUs,
It ullizes multiple CPUs
Maltiprograrning
-Multiprogramming keeps
several programs in main
‘memory at the same time
and execute thom
concurrently wilizing
single CPU.
1e utlizes single CPU
* TECHIICN. PLICATIONS. po omeOperating Sytem an
1k permits parallel Context switching takes
processing! place.
Less time taken to process Mare Time taken to
the jabs. process the jobs
1 used in parallel Tes used in batch
‘operating system ‘operating stern,
More exponsive systom Less expensive system
Board Questions
1, List different types of operating systems.
Explain adoetees of malipocesor sytem
(any too. INSBTE Waters es
2. What i& multiprocesor sysen 1 Gice two
adoosages of
3. Explain multiprocessor system: and ite fo types.
[Ez Joiseinuted 08
«Definition : A distributed system is a collection of
autonomous hosts that are connocted through a
computer network
+A distributed system is a collection of independent
computers that appears to its users as single
coherent system. Each host executes components
and operates a distnbution middleware.
‘+ Middloware enables the components t0 coordinate
thelr activities, Users porceive the system as a
single integrated computing facility
+A distributed computer system consists of multiple
software components that are on multiple
computers, but run as a single system. The
computers that are in a distlbuted systom can be
physically cose together and connected by a local
network, of they can be geographically distant and
connected by a wide area network
Overview of Operating System
© A distributed system can consist of any number of
possible configurations, such as mainframes,
personal computers, workstations, minicomputers
fand so on.
‘Distributed operating systems depend on,
networking for their operation, Distributed OS runs
oon and controls the resources of multiple machines.
It provides resource sharing across the boundaries
of a single computer system, It looks to users like 4
single machine OS.
«Distributing OS owns the whole network and makes
it Took like a virtual uni-processor or may be 2
virtual multiprocessor.
‘Definition : A distributed operating system is one
that looks to its users like an ordinary operating
system but runs on multiple, independent CPU,
«Distributed systems depend on networking for their
functionality. Fig 171 shows the distributed
system,
‘Examples of disinbuted operating system are
Amoeba, chrous, mach and y-system
“© A Local Area Network (LAN) is a network that is
confined to a relatively small area. It is generally
Limited to a geographic area such as a college, lab
or building.
‘= WAN provides long distance transmission of data
‘and voice. Computers connected to a wide-area
network are often connected through public
networks, such as the telephone system. They can
alco be connected through leased lines or satellites.
+A MAN typically covers an area of between 5 and
50 km diameter. Many MANs cover an atea the size
of a city, although in some cases MANe may be as
small as a group of building
( A cotonay
Fig. 1.7.1 Distributed systom
TEEHCAL PUBLEAIIONS™ Jap rite nweazeOperating Stern 1
Overview of Operating Syste
+A MAN often acts as a high speed network to allow
sharing of regional nasources. MAN provides the
transfer rates from 34 to 150 Mbps.
Advantages of distributed OS :
4. Resource sharing : Sharing of software resources
such as software libraries, database and hardware
resources such as hard disks, printers and
CDROM can also be done in a very effective way
among all the computers and the users.
2. Higher reliability : Reliability refers to the
degree of tolerance against errors and component
failures. Availability is one of the important
aspects of reliability. Availability zefers to. the
fraction of time for which a system is available
for use,
3. Better price performance ratio : Reduction in the
price of microprocessor and increasing,
‘computing power gives good priosperformance
ratio.
4. Shorter responses times and higher throughput.
5. Incremental growth : To extend power and
functionality of a system by simply adding.
additional resources to the system.
Difficulties in distributed OS are
1. There are no current commercially successful
examples.
2 Protocol overhead can dominate computation
costs.
3. Hard to build well,
4, Probably impossible to build at the seale of the
internet.
1.7.1 | Client-Server Computing
‘+ The system is structured as a set of processes, called
servers that offer services to the users, called clients.
+ Server systems are of two types : compute servers
and file servers
‘+ Compute-server system : It provides an interface to
which a client can send a request to perform an
action. In response, the server performs some
operation and sends the results to the client. Server
contains database,
‘+ File-server system : Client can performs various
‘operation like create, read, update and delete file on
file server. Web server is best example of this type.
+ Fig. 172 shows the client server model.
Gan Panes Rowest Toy
| Response | esporse
a —
Fig. 1.7.2 Client server model
cient
1+ The client-server model is usually based on a simple
request/reply protocol, implemented with,
send/receive primitives or using Remote Procedure
Calls (RPC) or Remote Mothod Invocation (RMI)
1. The client sends a request (invocation)
message to the server asking for some
2. The server does the work and retams a
result (eg. the data requested) or an error
code if the work could not be performed.
*Server is a process; Client is a process. Clients
invoke servers, servers sond results to clients
Secvers can be clients of other servers.
HITTP (Web) server is a server process to its client
processes (web browsers), HTTP server may be a
client of a database server. Service may be provided
by multiple cervers, as is most often the case within
a large enterprise,
Cache is a repository of recently accessed objects
(files, graphics) that is physically closer to the client
than the server from which it originated. Proxy
server sits in between clients and servers and can.
play many mitigation roles
‘Advantages =
1. Simple to implement.
2. Provides good security
3. All files are stored in a central location.
¥ TECHOACAL PUBLICATIONS Jo op te er ineOperating system 1
Disadvantages :
1. Single point of failure
2A specialist network operating system is needed.
1.7.2 | Peor-to-Peor System
+All processes (objects) play similar role, Do not
roquire a server process. Processes (objects) interact,
without particular distinction between clients and
‘The pattern of communication depends on the
articular application. Fig. 17.3 shows the
peer-to-peer model.
7 hed
Fig. 1.7.3 Peer to poor model
+A large number of data objects are shared; any
individual computer holds only a small part of the
application database, Processing and communication
loads for access to objects are distributed across
‘many computers and access links. This is the most
general and flexible model.
A group of computers connected together to
combine their computing and processing abilities to
search the Internet or salve very complex problems
+ Problems with peer-to-peer : High complexity due
to
1. Cleverly place individual objects
2, Rotriove the objects
3, Maintain potentially large number of zeplicas,
Overview of Operating Sytem
Distinguish between Client - Server
‘and Pecr-to-Peor Modol
eerto-peet mode!
‘The prerto-peer model
The Image )0
framework, the purpose of which is to facilitate
the importing and exporting of image data and
image metadata, was introduced in 10S 4. The
framework supports a wide range of image
formats including PNG, JPEG, TIFF and GIF.
4, Assets brary framework : The assets library
provides a mechanism for locating and retrieving
video and photo files located on the iPhone
dovice. In addition to accessing existing images
and videos, this framework also allows new
photos and videos to be saved to the standard
device photo alburn.
5. Core graphics framework : The 108 core graphics
provides a lightweight two
dimensional rendering engine. Features of this
framework inchide PDF document creation and
resentation, vector based drawing, transparent
layers, path based drawing, antivaliased
framework
* RCAC PURLICAIONS™ 0 nt reOpertng System
Overview of Operating Syne
rendering, color manipulation and management,
image rendering and gradients,
6 Core image framework : A new framework
Inteoduced with iOS 5 providing a set of video
and image filtering and manipulation capabilities
for application developers,
7. Quartz core framework : The purpose of the
Quarts Core framework Is to provide animation
capabilities on the iPhone. It provides the
foundation for the majority of the visual effects
and animation used by the UIKit framework and
provides an ObjectiveC based programming
terface for creation of specialized animation
within iPhone apps.
B. OpenGL £S framework ; For many years the
industry standard for high performance 2D and
3D graphics drawing has been OpenGL. OpenGL.
for Embedded Systems (ES) is a lightweight
version of the full OpenGL specification designed
specifically for smaller devices such as the
Phone,
9. GLKit framework : The GLKit framework is an
Objective-C based API designed to ease the task
of creating OpenGL ES based applications.
10. NewsstandKit framework : The Newsstand
application is a new feature of 10S 5 and is
Intended a a central location for users +0 gain
access to newspapers and magazines. ‘The
NewsstandKit framework allows forthe
development of applications that usllize this new
11, 108 audio support 108 is capable of supporting
audio in AAC, Apple Lossless (ALAQ), A-law,
IMAJADPCM, Linear PCM, plaw, DVI/Intel IMA
ADPCM, Microsoft GSM 610 and AES3-2003
formats through the support provided by the
following frameworks
12. AV foundation framework : An Objective-C
based framework designed to allow the playback,
recording and management of audio content
1922] Core Services Layer
+The Core Services layer contains fundamental
system services for apps
‘Key among these services are the core foundation
and foundation frameworks, which define the basic
types that all apps use.
‘This layer also contains individual technologies to
support features such 2s location, ‘Cloud, social
media and networking.
+ Features
Peer-to-Peer services
iCloud storage
‘Automatic reference counting
Block objects
Grand central dispatch
In-App purchase
SQLite
XML support
File-sharing support, data protection
‘It consists of the following frameworks.
Address book framework : This provides
programmatic access to the iPhone Address Book
contact database allowing applications to retrieve
‘and modify contact entries.
+ CFNetwork framework ; The CFNetwork framework
provides 2 Chased interface to the CPAP
networking protocol stack and low level access to
BSD sockets. This enables application code to be
written that works with HTTP, FTP and domain
name servers and to establish secure and encrypted
connections using Secure Sockets Layer (SSL) or
‘Transport Layer Security (ILS)
+ Core Data Framework : This framework is provided
to ease the creation of data modeling and storage in
Model-View-Controller (MVC) based applications
Use of the Core Data framework significantly
reduces the amount of code that needs to be writton
to perform common tasks when working with
structured data within an application
1+ Core foundation framework : The core foundation
framework is a Cased Framework which provides
basic functionality such as data types, string
‘manipulation, raw block data management, URL.
‘manipulation, threads and run loops, date and
times, basic XML manipulation and port and socket
‘communication.
* TRERRUCAL BURLERTIONS™ An pa ageOperating Sytem 1
a
Overview of Operating Systm
+The core media framework is the lower level
foundation upon which the AV foundation layer is
built.
+ Core telephony framework : The iOS core telephony’
framework is provided to allow applications to
interrogate the device for information about the
current cell phone service provider and to receive
notification of telephony related events.
«+ EventKit framework : An API designed to provide
applications with aceess to the calendar and alarms
‘on the device.
“Most applications will use iCloud document storage
to share documents from a user's iCloud account
‘This is the feature that users think of when they
think of iCloud storage. A user cares about whether
documents are shared across devices and can see
and manage those documents from a given device.
+ Data protection allows applicatione that work with
sensitive user data to take advantage of the builtin
encryption available on some devices
«When your application designates a specific file as
Protected, the system stores that file on-disk in an
encrypted format. While the device is locked, the
contents of the file are inaccessible to both your
application and to any potential intruders.
+ However, when the device is unlocked by the user,
a decryption key is created to allow your
application to access the file.
[1823] Core 0S Layer
«The Core OS layer contains the low-level features
that most other technologies are built upon
+ Even if you do not use these technologies directly
in your apps, they are most likely boing used by
other frameworks.
+ And in situations where you necd to explicitly deal
with securty or communicating with an extemal
hardware accessory, you do so using the
frameworks in this layer
‘+ This layer provides a variety of services including.
Jow lovel networking, access to external accessories
and the ‘operating system
services such as memory management, file system
handling and threads.
usual fundamental
+ The Core OS layer occupies the bottom position of
the 10S stack and, as such, sits directly on top of
the device hardware
+The layer provides a variety of services including.
Jow level notworking, access to external accessories
and the usual fundamental operating system
services such as memory management, file system
handling and threads,
+ Accelerate framework : Introduced in 108 40, the
Accelerate framework contains interfaces for
periorming DSP, linear algebra and.
‘image-processing calculations, The advantage of
using this framework over writing your own
these that they
‘optimized for all of the hardware configurations
present in 108, based devices, Therefore, you can
write your code once and be assured that it runs
efficiently on all devices
+ Extemal accessory framework : It provides the
ability to interrogate and communicate with external
accessories connected physically to the iPhone via
the 30-pin dock connector or wirelessly via
Bluetooth.
+ Security framework : The 108 Security framework
Provides all the security interfaces you would
expect to find on a device that can connect to
external networks including certificates, public and
private keys, trust policies, key chains, encryption,
digests and Hask-based Message Authentication
Code (HMAC),
+ The core bluetooth framework allows developers to
interact specifically with Bluetooth Low-Energy
(“LE’) accessories, The Objective-C interfaces of this
framework allow you to sean for LE accessories,
connect and disconnect to ones you find, read and
write attributes within a service, register for service
and attribute change notifications and much more
+ System : The system level encompasses the kernel
environment, drivers and low level UNIX interfaces
fof the operating system, The kernel itself is based
fon Mach and is responsible for every aspect of the
operating system.
versions of interfaces is are
‘it manages the virtual memory system, threads, file
system, network and interprocess communication
The drivers at this layer also provide the interface
F
TEERICN. PUBLICATIONS" ip tract x ee