Lecture 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 31

6/30/2023

DISTRIBUTED SYSTEM
Er. Bibat Thokar
BCA Program Coordinator, Lecturer
(Department of Computer Application)
Lecturer, Project Assistant
(Department of Computer Engineering)
Lalitpur Engineering College

MARK DISTRIBUTION
Theory Practical Total
Sessional 20 25 45
Final 80 - 80
Total 100 25 125

Prepared By: Er. Bibat Thokar 1


6/30/2023

INTERNAL MARKS DISTRIBUTION OVERVIEW


• Total Marks = 20
• Assignment = 10
• Presentation/Class Performance = 3
• Attendance = 2
• Assessment = 5

Prepared By: Er. Bibat Thokar 6/30/2023 3

REFERENCE BOOKS
• George Coulouris, Jean Dollimore, Tim Kindberg, “Distributed Systems Concepts and
Design”, Third Edition, Pearson Education.
• A.S. Tanenbaum, M. VanSteen, “Distributed Systems”, Pearson Education.
• Mukesh Singhal, “Advanced Concepts in Operating Systems”, McGraw-Hill Series in
Computer Science.

Prepared By: Er. Bibat Thokar 6/30/2023 4

Prepared By: Er. Bibat Thokar 2


6/30/2023

PRACTICAL
• Implementation of Election Algorithm.
• Simulation for Clock Synchronization in Distributed System using Lamport’s Algorithm.
• Implementation of Banker’s Algorithm for avoiding Deadlock
• Experiment on DFS
• Case Study – CORBA,JINI, Mach, TIB/Rendezvous

Prepared By: Er. Bibat Thokar 6/30/2023 5

INTRODUCTION
4 Hours
8 Marks (Approx.)

Prepared By: Er. Bibat Thokar 3


6/30/2023

OUTLINES
• Introduction to Distributed Systems
• Examples of Distributed Systems
• Main Characteristics
• Advantages and Disadvantages of Distributed System
• Design Goals
• Main Problems
• Models of Distributed System
• Resource Sharing and the Web Challenges
• Types of Distributed System: Grid, Cluster, Cloud

Prepared By: Er. Bibat Thokar 6/30/2023 7

DISTRIBUTED OBJECTS AND


FILE SYSTEM
7 Hours
16 Marks (Approx.)

Prepared By: Er. Bibat Thokar 4


6/30/2023

OUTLINES
• 2.1 Introduction • 2.8 Sun Network File System
• 2.2 Communication between distributed • 2.9 Introduction to Name Services
objects • 2.10 Name Services and DNS
• 2.3 Remote Procedure Call
• 2.11 Directory and Discovery Services
• 2.4 Events And Notifications
• 2.12 Comparison of Different Distributed File
• 2.5 Java RMI Case Study Systems
• 2.6 Introduction to DFS
• 2.7 File Service Architecture

Prepared By: Er. Bibat Thokar 6/30/2023 9

OPERATING SYSTEM
SUPPORT
3 Hours

Prepared By: Er. Bibat Thokar 5


6/30/2023

OUTLINES
• 3.1 The operating system layer
• 3.2 Protection
• 3.3 Process and threads
• 3.4 Communication and invocation
• 3.5 Operating system architecture

Prepared By: Er. Bibat Thokar 6/30/2023 11

DISTRIBUTED
HETEROGENEOUS
APPLICATIONS AND CORBA
3 Hours

Prepared By: Er. Bibat Thokar 6


6/30/2023

OUTLINES
• 4.1 Heterogeneity in Distributed Systems
• 4.2 Middleware
• 4.3 Objects in Distributed Systems
• 4.4 The CORBA approach
• 4.5 CORBA services

Prepared By: Er. Bibat Thokar 6/30/2023 13

TIME AND STATE IN


DISTRIBUTED SYSTEMS
5 Hours

Prepared By: Er. Bibat Thokar 7


6/30/2023

OUTLINES
• 5.1 Time in Distributed Systems,
• 5.1.1 Physical Clocks
• 5.1.2 Logical Clocks
• 5.1.3 Vector Clocks
• 5.1.4 Clock Synchronization
• 5.2 Causal Ordering of Messages
• 5.3 Global State and State Recording
• 5.4 Distributed debugging

Prepared By: Er. Bibat Thokar 6/30/2023 15

COORDINATION AND
AGREEMENT
4 Hours

Prepared By: Er. Bibat Thokar 8


6/30/2023

OUTLINES
• 6.1 Mutual Exclusion in Distributed Systems
• 6.2 Algorithms for Mutual Exclusion
• 6.3 Distributed Elections
• 6.4 Multicast communication
• 6.5 Consensus

Prepared By: Er. Bibat Thokar 6/30/2023 17

REPLICATION
4 Hours

Prepared By: Er. Bibat Thokar 9


6/30/2023

OUTLINES
• 7.1 Reasons for Replication
• 7.2 Object Replication
• 7.3 Replication as Scaling Technique
• 7.4 Fault Tolerant Services
• 7.5 High Available Services
• 7.6 Transaction with Replicated Data

Prepared By: Er. Bibat Thokar 6/30/2023 19

TRANSACTION AND
CONCURRENCY CONTROL
6 Hours

Prepared By: Er. Bibat Thokar 10


6/30/2023

OUTLINES
• 8.1 Transactions • 8.7 Introduction to Distributed Transactions
• 8.2 Nested Transaction • 8.8 Flat and Nested Distributed Transactions
• 8.3 Locks • 8.9 Atomic Commit Protocols
• 8.4 Optimistic Concurrency Control • 8.10 Concurrency Control in Distributed
Transactions
• 8.5 Timestamp Ordering
• 8.6 Comparison of Methods For • 8.11 Distributed Deadlocks
Concurrency Control • 8.12 Transaction Recovery

Prepared By: Er. Bibat Thokar 6/30/2023 21

FAULT TOLERANCE
4 Hours

Prepared By: Er. Bibat Thokar 11


6/30/2023

OUTLINES
• 9.1 Introduction to Fault Tolerance
• 9.2 Process Resilience
• 9.3 Reliable Client Server Communication
• 9.4 Distributed Commit
• 9.5 Recovery

Prepared By: Er. Bibat Thokar 6/30/2023 23

CASE STUDIES
5 Hours

Prepared By: Er. Bibat Thokar 12


6/30/2023

OUTLINES
• 10.1 CORBA
• 10.2 Mach
• 10.3 JINI
• 10.4 TIB/Rendezvous

Prepared By: Er. Bibat Thokar 6/30/2023 25

Let’s get started…

Prepared By: Er. Bibat Thokar 6/30/2023 26

Prepared By: Er. Bibat Thokar 13


6/30/2023

CHAPTER 1
INTRODUCTION
4 Hrs

DISTRIBUTED SYSTEM: INTRODUCTION

• Hardware and software components, located at remote networked


computers, coordinate and communicate their actions only by passing
messages.
• Any distance may separate computers in the network.
• Sharing of resources is the main motivation of distributed systems.
• Resources may be managed by servers and accessed by clients, or they
may be encapsulated as objects and accessed by client objects.
• A distributed operating system runs on multiple Independent computers,
connected through communication network, but appears to its users as a
single virtual machine and runs its own OS.
Prepared By: Er. Bibat Thokar 6/30/2023 28

Prepared By: Er. Bibat Thokar 14


6/30/2023

DISTRIBUTED SYSTEM: INTRODUCTION

Prepared By: Er. Bibat Thokar 6/30/2023 29

DISTRIBUTED SYSTEM: EXAMPLES

• Internet
• Internet is the largest collection of interconnected computer networks.
• Program running on the computers interact with each other within the
internet by the mechanism of message passing.
• Basically, the internet is not a distributed system as it only provides
essential communication and connectivity channels to the distributed
system but the services provided by the internet are the distributed
systems.

Prepared By: Er. Bibat Thokar 6/30/2023 30

Prepared By: Er. Bibat Thokar 15


6/30/2023

DISTRIBUTED SYSTEM: EXAMPLES

• World Wide Web


• Contains multiple components under the hood that help browsers to
display content but from the user’s view it helps to access the web via
a browser such that it looks like a single system.
• Telecommunication networks
• Telephone networks and Cellular networks.

Prepared By: Er. Bibat Thokar 6/30/2023 31

DISTRIBUTED SYSTEM: CHARACTERISTICS

• Concurrency :
• Distributed System allows the programs that share resources to
execute concurrently(i.e. at the same time).
• It is a property that enables processes running in different machines
to form a common system that is capable of executing codes on
multiple machines at the same time.
• Example: A web application is concurrent as it can be used by various
users at the same time.

Prepared By: Er. Bibat Thokar 6/30/2023 32

Prepared By: Er. Bibat Thokar 16


6/30/2023

DISTRIBUTED SYSTEM: CHARACTERISTICS

• No Global Clock :
• In other to coordinate to the remote networks it is necessary to
synchronize clock in primitive technologies.
• But as there is no single correct global timing system, it is very difficult
to synchronize global clock across all the networks of the system
located at different locations.
• Distributed System does not need any global clock system to
coordinate with the network at different locations because the only
way of communication is message passing through the network.
Prepared By: Er. Bibat Thokar 6/30/2023 33

DISTRIBUTED SYSTEM: CHARACTERISTICS

• Independent Failures :
• Computer System can fail or crash at any time.
• In primitive centralized system, if the server fails then the whole
system fails to operate leaving the negative consequences to the end
users.
• With distributed system, even one network fails, it does not hamper
the overall system.
• Workload of the failed network can be overcome by the other
networks within the system situated at different locations.

Prepared By: Er. Bibat Thokar 6/30/2023 34

Prepared By: Er. Bibat Thokar 17


6/30/2023

ADVANTAGES OF DISTRIBUTED SYSTEMS

• All the nodes in the distributed system are connected to each other. So
nodes can easily share data with other nodes.
• More nodes can easily be added to the distributed system i.e. it can be
scaled as required.
• The failure of one node does not lead to the failure of the entire
distributed system. Other nodes can still communicate with each other.
• Resources like printers can be shared with multiple nodes rather than
being restricted to just one.

Prepared By: Er. Bibat Thokar 6/30/2023 35

DISADVANTAGES OF DISTRIBUTED SYSTEMS

• It is difficult to provide adequate security in distributed systems because


the nodes as well as the connections need to be secured.
• Some messages and data can be lost in the network while moving from
one node to another.
• The database connected to the distributed systems is quite complicated
and difficult to handle as compared to a single user system.
• Overloading may occur in the network if all the nodes of the distributed
system try to send data at once.

Prepared By: Er. Bibat Thokar 6/30/2023 36

Prepared By: Er. Bibat Thokar 18


6/30/2023

DEIGN GOALS OF DISTRIBUTED SYSTEM

Prepared By: Er. Bibat Thokar 6/30/2023 37

HETEROGENEITY

• Heterogeneous components that must be able to interoperate, apply to all


of the following:
• Networks
• Hardware architectures
• Operating systems
• Programming languages
• Examples that mask differences in network, operating systems, hardware
and software to provide heterogeneity are: Middleware, Internet
protocols, Mobile code
Prepared By: Er. Bibat Thokar 6/30/2023 38

Prepared By: Er. Bibat Thokar 19


6/30/2023

OPENNESS

• Interfaces should allow components to be added or replaced.


• Distributed systems must be extensible.
• Openness of a computer system is the characteristic that determines
whether the system can be extended and re-implemented in various
ways.
• The first step in openness is publishing the documentation of software
components and interfaces of the components to make them available to
software developers.

Prepared By: Er. Bibat Thokar 6/30/2023 39

SECURITY

• Security of a computer system is the characteristic that the resources are


accessible to authorized users and used in the way they are intended.
• Security for information resources has three components:
• Confidentiality
• Protection against disclosure to unauthorized individual.
• Integrity
• Protection against alteration or corruption.
• Availability
• Protection against interference with the means to access the resources.
Prepared By: Er. Bibat Thokar 6/30/2023 40

Prepared By: Er. Bibat Thokar 20


6/30/2023

SCALABILITY

• System should work efficiently with an increasing number of users.


• System performance should increase with inclusion of additional
resources.
• Scalable distributed systems operate effectively and efficiently at many
different scales, ranging from a small Intranet to the Internet.
• Scalable distributed systems remain effective when there is a significant
increase in the number of resources and the number of users.

Prepared By: Er. Bibat Thokar 6/30/2023 41

FAILURE HANDLING

• Failure of a component (partial failure) should not result in failure of the


whole system.
• Failures in distributed systems are partial, that is some components fail
while others continue to function.

Prepared By: Er. Bibat Thokar 6/30/2023 42

Prepared By: Er. Bibat Thokar 21


6/30/2023

TRANSPARENCY

• Distribution should be hidden from the user as much as possible.


• Transparency is defined as the hiding of the separation of components in
a distributed systems from the user and the application programmer.
• With transparency the system is perceived as a whole rather than a
collection of independent components.

Prepared By: Er. Bibat Thokar 6/30/2023 43

CONCURRENCY

• Concurrency can be achieved by standard techniques such as


semaphores, which are used in most operating systems.
• With concurrency, services and applications can be shared by clients in a
distributed system.
• For an object to be safe in a concurrent environment, its operations must
be synchronized in such a way that its data remains consistent.
• Concurrency can be achieved by standard techniques such as
semaphores, which are used in most operating systems.

Prepared By: Er. Bibat Thokar 6/30/2023 44

Prepared By: Er. Bibat Thokar 22


6/30/2023

DISTRIBUTED SYSTEM/COMPUTING: TYPES

• Cloud Computing
• It uses distributed computing to provide customers with highly
scalable cost-effective infrastructures and platforms.
• Cloud providers usually offer their resources through hosted services
that can be used over the internet.
• Service Models of Cloud Computing:
• Software as a service (SaaS)
• Platform as a service(PaaS)
• Infrastructure as a service (IaaS)

Prepared By: Er. Bibat Thokar 6/30/2023 45

SOFTWARE AS A SERVICE (SAAS)


• In the case of SaaS, the customer uses the cloud provider’s
applications and associated infrastructure (e.g. servers,
online storage, computing power).
• Maintenance and administration of the outsourced
infrastructure is handled by the cloud provider. (e.g. a
browser-based web app).

Prepared By: Er. Bibat Thokar 6/30/2023 46

Prepared By: Er. Bibat Thokar 23


6/30/2023

PLATFORM AS A SERVICE(PAAS)

• In the case of PaaS, a cloud-based environment is provided (e.g. for


developing web applications).
• Customer retains control over the applications provided
• Customer can configure customized user settings while the technical
infrastructure for distributed computing is handled by the cloud provider.

Prepared By: Er. Bibat Thokar 6/30/2023 47

INFRASTRUCTURE AS A SERVICE (IAAS)

• In the case of IaaS, the cloud provider supplies a technical infrastructure


that users can access via public or private networks.
• Provided infrastructure may include the following components: servers,
computing and networking resources, communication devices (e.g.
routers, switches, and firewalls), storage space, and systems for
archiving and securing data.
• As for the customer, they retain control over operating systems and
provided applications.
Prepared By: Er. Bibat Thokar 6/30/2023 48

Prepared By: Er. Bibat Thokar 24


6/30/2023

DISTRIBUTED SYSTEM/COMPUTING: TYPES

• Grid Computing
• Based on the idea of a supercomputer with enormous computing
power. Servers and computers can thus perform different tasks
independently of one another.
• Advantage of this is that highly powerful systems can be quickly used
and the computing power can be scaled as needed.
• Since grid computing can create a virtual supercomputer from a
cluster of loosely interconnected computers, it is specialized in solving
problems that are particularly computationally intensive.
• This method is often used for ambitious scientific projects and
decrypting cryptographic codes.
Prepared By: Er. Bibat Thokar 6/30/2023 49

DISTRIBUTED SYSTEM/COMPUTING: TYPES

• Cluster Computing
• It can not be clearly differentiated from cloud and grid computing.
• It is a more general approach and refers to all the ways in which
individual computers and their computing power can be combined
together in clusters.
• Examples: Server clusters, clusters in big data and in cloud
environments, database clusters, and application clusters.
• Computer networks are also increasingly being used in high-
performance computing which can solve particularly demanding
computing problems.
Prepared By: Er. Bibat Thokar 6/30/2023 50

Prepared By: Er. Bibat Thokar 25


6/30/2023

MODELS OF DISTRIBUTED SYSTEM

Prepared By: Er. Bibat Thokar 6/30/2023 51

MODELS OF DISTRIBUTED SYSTEM

• Architectural Models
• Fundamental Models

Prepared By: Er. Bibat Thokar 6/30/2023 52

Prepared By: Er. Bibat Thokar 26


6/30/2023

ARCHITECTURAL MODELS
• Client-Server Model
• The system is structured as a set of processes, called servers that offer
services to the users, called clients.
• 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 method invocation (RMI).
• The client sends a request (invocation) message to the server asking for
some service.

Prepared By: Er. Bibat Thokar 6/30/2023 53

CLIENT-SERVER MODEL

Prepared By: Er. Bibat Thokar 6/30/2023 54

Prepared By: Er. Bibat Thokar 27


6/30/2023

ARCHITECTURAL MODEL: PEER TO PEER MODEL

• All processes (objects) play a similar role.


• Processes (objects) interact without a particular distinction between clients and
servers.
• The pattern of communication depends on the particular application.
• 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.
Prepared By: Er. Bibat Thokar 6/30/2023 55

PEER TO PEER MODEL

Prepared By: Er. Bibat Thokar 6/30/2023 56

Prepared By: Er. Bibat Thokar 28


6/30/2023

FUNDAMENTAL MODELS

• Fundamental Models are concerned with a more formal


description of the properties that are common in all the
architectural models
• Types:
• Interaction models
• Interaction models are for handling time i. e. for process
execution, message delivery, clock drifts, etc.

Prepared By: Er. Bibat Thokar 6/30/2023 57

FUNDAMENTAL MODELS: FAULT MODELS

• Failures can occur both in processes and communication channels. The


reason can be both software and hardware faults.
• Fault models are needed in order to build systems with predictable
behavior in case of faults (systems that are fault-tolerant).
• Such a system will function according to the predictions, only as long as
the real faults behave as defined by the “fault model”.

Prepared By: Er. Bibat Thokar 6/30/2023 58

Prepared By: Er. Bibat Thokar 29


6/30/2023

END OF CHAPTER

Prepared By: Er. Bibat Thokar 6/30/2023 59

ASSIGNMENT-1

• Solve the questions from ‘old questions collection’ starting from 2079
Bhadra to 2068 Magh related to chapter-1.
• You may avoid repeated questions
• Please refer reference books prescribed by syllabus of IOE.
• Remember: Assignments contains 20 % overall internal marks!!!
• No copy paste, no skip of questions!!!

Prepared By: Er. Bibat Thokar 6/30/2023 60

Prepared By: Er. Bibat Thokar 30


6/30/2023

THANK YOU

Prepared By: Er. Bibat Thokar 6/30/2023 61

Prepared By: Er. Bibat Thokar 31

You might also like