Professional Documents
Culture Documents
Distributed OS
Terminology
Communication models
Remote procedure calls
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 2
2
WHAT IS DISTRIBUTED
SYSTEM?
A collection of autonomous computers
linked by a network
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 3
3
DISTRIBUTED SYSTEM : EXAMPLE
Applications of DS
Intranets,
Internet,
WWW,
email.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 4
4
DISTRIBUTED SYSTEM…
It consists of multiple computers that do not share a
memory.
Each Computer has its own memory and runs its own
operating system.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 5
5
DISTRIBUTED SYSTEM…
Where is the knowledge of distributed operating systems
likely to be useful?
Custom OS's for high performance computer systems
OS subsystems, like Network File System (NFS), Network Information
Service (NIS)
Distributed ``middleware'' for large computations
Distributed applications
Note: The Network Information Service (NIS) and Network File System (NFS) are services that
allow you to build distributed computing systems that are both consistent in their appearance
and transparent in the way files and data are shared. NIS provides a distributed
database system for common configuration files.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 6
6
DISTRIBUTED SYSTEM…
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 7
7
WHY BUILD A DISTRIBUTED
SYSTEM?
Microprocessors are getting more and more powerful.
A distributed system combines (and increases) the computing
power of individual computer.
Some advantages include:
Resource sharing (but not as easily as if on the same machine)
Enhanced performance (but 2 machines are not as good as a single machine
that is 2 times as fast)
Improved reliability & availability (but probability of single failure increases,
as does difficulty of recovery)
Modular expandability
Scalability:
In distributed computing systems you can add more machines
as needed.
Flexibility:
It makes it easy to install, implement and debug new services.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 9
9
DISADVANTAGES
Distribution-aware PLs, OSs and applications
Network connectivity essential
Security and privacy
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 10
10
TRANSPARENCY IN A DS
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 11
11
OPEN DISTRIBUTED SYSTEMS
Offer services that are described a priori
Syntax and semantics are known via protocols
Portability
Extensibility
Open system evolve over time and should be extensible to
accommodate new functionality.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 12
12
SYSTEM MODELS
The minicomputer model (e.g early computer network)
Each user has local machine
Local processing but can fetch remote data (files, databases)
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 13
13
SYSTEM MODELS…
Client-server Model (e.g., V system, world wide web)
User has local workstation
Powerful workstations serve as servers (file, print, DB servers)
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 14
14
SYSTEM MODELS…
Cluster computing systems / Data centers
LAN with a cluster of servers + storage
Linux, Mosix, ..
Used by distributed web servers, scientific applications, enterprise
applications
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 15
15
EMERGING MODELS
Distributed Pervasive Systems
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 16
16
UNIPROCESSOR OPERATING SYSTEMS
(REVIEW)
An OS acts as a resource manager or an arbitrator
Manages CPU, I/O devices, memory
Layered design
Functionality is decomposed into N layers
Each layer uses services of layer N-1 and implements new service(s)
for layer N+1
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 17
17
UNIPROCESSOR OPERATING SYSTEMS
(REVIEW)
Microkernel architecture
Small kernel
user-level servers implement additional functionality
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 18
18
ISSUES IN DISTRIBUTED
SYSTEM
The lack of global knowledge.
Naming.
Scalability.
Compatibility.
Process synchronization (requires global knowledge)
Resource management (requires global knowledge)
Security.
Fault tolerance, error recovery.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 19
19
LACK OF GLOBAL KNOWLEDGE
Communication delays are at the core of the problem
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 20
20
NAMING
Named objects: computers, users, files, printers, services
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 21
21
SCALABILITY
How large is the system designed for?
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 22
22
COMPATIBILITY
Binary level: same architecture (object code)
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 23
23
PROCESS SYNCHRONIZATION
test-and-set instruction won't work.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 24
24
DISTRIBUTED RESOURCE
MANAGEMENT
Data migration: data are brought to the location that
needs them.
distributed filesystem (file migration)
distributed shared memory (page migration)
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 26
26
STRUCTURING
The monolithic kernel: one piece
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 27
27
COMMUNICATION NETWORKS
WAN and LAN
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 28
28
COMMUNICATION MODELS
Message passing
Remote procedure call (RPC)
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 29
29
MESSAGE PASSING PRIMITIVES
Send (message, destination), Receive (source, buffer)
buffered vs. unbuffered
blocking vs. nonblocking
reliable vs. unreliable
synchronous vs. asynchronous
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 30
30
RPC
With message passing, the application programmer must worry about
many details:
parsing messages
pairing responses with request messages
converting between data representations
knowing the address of the remote machine/server
handling communication and system failures
RPC is introduced to help hide and automate these details.
RPC is based on a ``virtual'' procedure call model
client calls server, specifying operation and arguments
server executes operation, returning results
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 31
31
RPC ISSUES
Stubs (See Unix rpcgen tool, for example.)
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 32
32
RPC DIAGRAM
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 33
33
SCALABILITY PROBLEMS
Scalability problems in distributed systems appear as
performance problems caused by limited capacity of servers and
network.
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 34
34
SCALING TECHNIQUES
Principles for good decentralized algorithms
Techniques
Asynchronous communication
Distribution
Caching and replication
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 35
35
SCALING TECHNIQUES 1
There are now basically only three techniques for scaling:
1. Hiding communication latencies : avoid waiting for responses
to remote service request when possible
Asynchronous communication
Reduce overall communication
2. Distribution : split a component into parts & distribute them
across the system
3. Replication:
Increase availability
Helps balance the load
May hide communication latency
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 36
36
SCALING TECHNIQUES 1
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 37
37
SCALING TECHNIQUES 2
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 38
38
HARDWARE CONCEPT
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 39
39
MULTIPROCESSORS 1
Single address space shared by all
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 40
40
MULTIPROCESSORS 2 (SWITCH-
BASED)
Competition for the bus is still an issue
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 41
41
HOMOGENEOUS MULTICOMPUTER
SYSTEMS
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 42
42
SOFTWARE CONCEPTS
Software Concepts OS for multicomputer/multiprocessors can be
divided in two categories
Distributed OS – tightly-coupled systems
Network OS – loosely-coupled systems
From a NOW, to get a distributed system you need middleware
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 43
43
UNIPROCESSOR OPERATING
SYSTEM
Uniprocessor Operating Systems OS for distributed systems and
uniprocessors are very much alike
They act as resource managers for the underlying hardware
Provide a virtual machine that hide the intricacies of the underlying
hardware
Part of enabling resource sharing is protecting apps from each other
Dual mode of operation – monolithic Oss
Microkernels
Pros and cons
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 44
44
MULTIPROCESSOR OPERATING
SYSTEM 1
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 45
45
MULTIPROCESSOR OPERATING
SYSTEM 1
No shared memory – communication through message
passing
You can
Exposed message passing to application
Hide it through distributed shared memory
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 46
46
MULTIPROCESSOR OPERATING
SYSTEM 2
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 47
47
DISTRIBUTED SHARED MEMORY
SYSTEM 1
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 48
48
DISTRIBUTED SHARED
MEMORY
Since MP seems to be more difficult to program for
Distributed Shared Memory
AS divided into pages
Pages distributed among machines
Performance improvements
Replicate read-only pages
Replicate all pages
Weaker than strict consistency
Larger pages sizes
potential problem of false sharing
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 49
49
DISTRIBUTED SHARED MEMORY
SYSTEM 2
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 50
50
DISTRIBUTED OPERATING
SYSTEM
Manages resources in a distributed system
Seamlessly and transparently to the user
Provides transparency
Location, migration, concurrency, replication,…
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 51
51
TYPES OF DISTRIBUTED OSS
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 52
52
MULTIPROCESSOR OPERATING
SYSTEMS
Like a uniprocessor operating system
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 53
53
MULTIPROCESSOR OPERATING
SYSTEMS
Example: MOSIX cluster - single system image
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 54
54
NETWORK OPERATING SYSTEM
1
Various machines interconnected; users can access
remote resources
No assumptions of
Homogeneous underlying hardware
Managed as a single system
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 55
55
NETWORK OPERATING SYSTEM
2
Employs a client-server model
Minimal OS kernel
Additional functionality as user processes
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 56
56
NETWORK OPERATING SYSTEM
3
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 57
57
MIDDLEWARE-BASED SYSTEM
Remember the definition of a distributed system
Distributed OS – not intended to handle independent machines
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 58
58
MIDDLEWARE AND OPENNESS
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 59
59
COMPARISON BETWEEN
SYSTEMS
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 60
60
CLIENT -SERVER MODEL
Clients and Servers as a model for distributed applications
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 61
61
11/08/2021
11/08/2021
Dr. Afroza Nahar
Dr. Afroza Nahar 62
62