0% found this document useful (0 votes)
9 views7 pages

Distributed System

Uploaded by

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

Distributed System

Uploaded by

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

Explain different types of Distributed System.

Difference between Centralized Database and Distributed Database Virtualization in Cloud Computing and Types
Virtualization is a technique of how to separate a service from the underlying
A Distributed System is a Network of Machines that can exchange 1. Centralized Database physical delivery of that service. It is the process of creating a virtual version
information with each other through Message-passing. It can be very A centralized database is basically a type of database that is stored, located of something like computer hardware. It was initially developed during the
useful as it helps in resource sharing. as well as maintained at a single location mainframe era. It involves using specialized software to create a virtual or
only. This type of database is modified software-created version of a computing resource rather than the actual
and managed from that location itself. version of the same resource. With the help of Virtualization, multiple
• Client/Server Systems: Client requests to the This location is thus mainly any database operating systems and applications can run on same machine and its same
server for resources or a task to do, the server system or a centralized computer hardware at the same time, increasing the utilization and flexibility of
allocates the resource or performs the task and system. The centralized location is hardware.
sends the result in the form of response to the accessed via an internet connection
request of the client. (LAN, WAN, etc). This centralized
• Peer to Peer Systems: As nodes are an important
database is mainly used by institutions or organizations.
Advantages –
part of a system. In this, each node performs their
• Since all data is stored at a single location only thus it is
own task on their local memory and share data
easier to access and coordinate data.
through the supporting medium, this node can
• The centralized database has very minimal data redundancy
work as a server or as a client for a system.
since all data is stored in a single place.
• Middleware: It works as a base for different Disadvantages –
interoperability applications running on different • The data traffic in the case of centralized database is more.
operating systems. Data can be transferred to • If any kind of system failure occurs at the centralized system
other between others by using this service. then the entire data will be destroyed.

• Three-tier: In this data of the client is stored in 2. Distributed Database :


the middle tire rather than sorting into the client A distributed database is basically a
system or on their server through which
development can be done easily. This is mostly type of database which consists of
used in web or online applications. multiple databases that are
• N-tier: When interoperability sends the request
connected with each other and are
spread across different physical
to another application to perform a task or to
locations. The data that is stored on
provide a service. The machine on which the virtual machine is going to be built is known as
various physical locations can thus be
=========================================================== Host Machine and that virtual machine is referred as a Guest Machine.
managed independently of other
What is distributed transparency ? Explain types of transparency.
physical locations. The communication between databases at different
Distribution transparency is the property of distributed databases by the BENEFITS OF VIRTUALIZATION
physical locations is thus done by a computer network.
virtue of which the internal details of the distribution are hidden from the 1. More flexible and efficient allocation of resources.
users. 2. Enhance development productivity.
Advantages –
The three dimensions of distribution transparency are − 3. It lowers the cost of IT infrastructure.
• This database can be easily expanded as data is already
1. Location transparency 4. Remote access and rapid scalability.
spread across different physical locations.
2. Fragmentation transparency
• The distributed database can easily be accessed from
3. Replication transparency Types of Virtualization:
different networks.
Location Transparency 1.Application Virtualization.
Disadvantages –
Location transparency ensures that the user can query on any table(s) or 2.Network Virtualization.
fragment(s) of a table as if they were stored locally in the user’s site. The fact • This database is very costly and it is difficult to maintain
3.Desktop Virtualization.
that the table or its fragments are stored at remote site in the distributed because of its complexity.
4.Storage Virtualization.
database system, should be completely oblivious to the end user. The • In this database, it is difficult to provide a uniform view to
5.Server Virtualization.
address of the remote site(s) and the access mechanisms are completely user since it is spread across different physical locations.
6.Data virtualization.
hidden. Centralized systems and decentralized systems
Explains X Window System
CENTRALIZED SYSTEMS:
Fragmentation Transparency The client/server model in X system works in reverse to typical client/server
We start with centralized systems because they are
Fragmentation transparency enables users to query upon any table as if it model, where the client runs on the local machine and asks for services from
the most intuitive and easy to understand and
were unfragmented. Thus, it hides the fact that the table the user is querying the server. In X system, the server runs on the local machine and provides
define.
on is actually a fragment or union of some fragments. It also conceals the its display and services to the client programs. The client programs may be
Centralized systems are systems that use
fact that the fragments are located at diverse sites. local or remotely exist over different networks, but appear transparently.
client/server architecture where one or more client
X is used in networks of interconnected mainframes, minicomputers,
nodes are directly connected to a central server. This
Replication Transparency workstations, and X Terminals. X window system consists of a number of
is the most used type of system in many
Replication transparency ensures that replication of databases are hidden interacting components, including:
organizations where a client sends a request to a
from the users. It enables users to query upon a table as if only a single copy
of the table exists.Whenever a user updates a data item, the update is X server: Manages the display and input hardware. It captures command-
company server and receives the response.
reflected in all the copies of the table. based and graphics-based inputs from input hardware and passes it to the
Example –
============================================================= client application that requested it. It also receives inputs from the client
Wikipedia. Consider a massive server to which we send our requests and the
What is three-tier architecture? applications and displays the output under guidance from windows
server responds with the article that we requested. Suppose we enter the
Three-tier architecture is a well-established software application manager. The only component that interacts with hardware is X server. This
search term ‘junk food’ in the Wikipedia search bar. This search term is sent
architecture that organizes applications into three logical and physical makes it easier to recode it as per the requirements of different hardware
as a request to the Wikipedia servers (mostly located in Virginia, U.S.A)
computing tiers: the presentation tier, or user interface; the application tier, architectures.
which then responds back with the articles based on relevance. In this
where data is processed; and the data tier, where the data associated with situation, we are the client node, Wikipedia servers are the central server.
the application is stored and managed. Windows manager: Is the client application that manages client windows. It
Characteristics of Centralized System –
The 3-tier architecture consists of the three layers as follows − controls the general operations of the window system like geometry,
appearance, coordinates, and graphical properties of X display. Window
• Presence of a global clock: As the entire system consists of manager can change the size and position of windows on the display and
Presentation layer − This layer is also called the client layer. The front-end a central node(a server/ a master) and many client nodes(a
layer consists of a user interface. The main purpose is to communicate with reshuffle windows in a window stack.
computer/ a slave), all client nodes sync up with the global
the application layer. clock(the clock of the central node). X client: Is an application program that communicates with X server using X
• One single central unit: One single central unit which protocol. Xterm, Xclock, and Xcalc are examples of X clients. X manages its
Application layer − This layer is also called the business logic layer. It acts as serves/coordinates all the other nodes in the system.
a middle layer between the client and the database server which are used windows in a hierarchal structure. The shaded area that fills the entire
• Dependent failure of components: Central node failure screen is the root window. X client application windows are displayed on top
to exchange partially processed data. causes the entire system to fail. This makes sense because of the root window and are often called the children of the root.
when the server is down, no other entity is there to
Database layer − In this layer the data or information is stored. This layer send/receive responses/requests. Cluster System
performs operations like insert, update and delete to connect with the Cluster : It means that multiple servers are grouped together to achieve the
database. DECENTRALIZED SYSTEMS: same business and can be regarded as one computer.
These are other types of systems that have been gaining a lot of popularity, A group of computers consisting of multiple servers, as a whole, provides
primarily because of the massive hype of Bitcoin. Now many organizations users with a set of network resources, which are the nodes of the cluster.
are trying to find the application of such systems.
Two features
In decentralized systems, every node makes its own decision. The final Scalability : A service node in a cluster that dynamically adds machines to
behavior of the system is the aggregate of the decisions of the individual increase the processing power of the cluster.
nodes. Note that there is no single entity that receives and responds to the
request. High availability : If a node in a cluster fails, the services running on this node
can be taken over by other service nodes, thus enhancing the high
Example – availability of the cluster.
Bitcoin. Let’s take Bitcoin for example because it is the most popular use
case of decentralized systems. No single entity/organization owns the
============================================================= bitcoin network. The network is a sum of all the nodes who talk to each other
Content-Addressable-Network (CAN) for maintaining the amount of bitcoin every account holder has.
CAN: Internet Scale Hash table
Interface Characteristics of Decentralized System –
insert(key,value) • Lack of a global clock: Every node is independent of each
value = retrieve(key) other and hence, has different clocks that they run and
Idea: associate to each node and item a unique follow.
coordinate in an d-dimensional Cartesian space. • Multiple central units (Computers/Nodes/Servers): More
than one central unit which can listen for connections from
Properties other nodes
–scalable • Dependent failure of components: one central node failure
–operationally simple causes a part of the system to fail; not the whole system
–good performance
What is Code Migration
Code migration is the movement of programming code from one system to REMOTE PROCEDURE CALL(RPC) Multicasting in Computer Network
another. There are three distinct levels of code migration with increasing A remote procedure call is an interposes communication technique that is Multicast is a method of group communication where the sender sends data
complexity, cost and risk. Simple migration involves the movement from used for client-server-based applications. It is also known as a subroutine to multiple receivers or nodes present in the network simultaneously.
language to a newer version. A second, more complicated level of migration call or a function call. A client has a request message that the RPC translates Multicasting is a type of one-to-many and many-to-many communication as
involves moving to a different programming language. Migrating to an and sends to the server. This request may be a procedure or a function call it allows sender or senders to send data packets to multiple receivers at once
entirely new platform or operating system is the most complex type of to a remote server. When the server receives the request, it sends the across LANs or WANs. This process helps in minimizing the data frame of the
migration. required response back to the client. The client is blocked while the server network.
is processing the call and only resumed execution after the server is finished.
The sequence of events in a remote procedure call are given as follows −
• The client stub is called by the client.
• The client stub makes a system call to send the message to
the server and puts the parameters in the message.
• The message is sent from the client to the server by the
client’s operating system.
• The message is passed to the server stub by the server
operating system.
• The parameters are removed from the message by the
server stub.
• Then the server procedure is called by server stub
Multicasting works in like Broadcasting, but in Multicasting, the information
is sent to the targeted or specific members of the network. This task can be
accomplished by transmitting individual copies to each user or node present
in the network but sending individual copies to each user is inefficient and
might increase the network latency. To overcome these shortcomings,
multicasting allows a single transmission that can be split up among the
multiple users, consequently, this reduces the bandwidth of the signal.
Applications:
Multithreaded Server Architecture Multicasting is used in many areas like:
: A server having more than one thread is known as Multithreaded Server. • Internet protocol (IP)
When a client sends the request, a thread is generated through which a user • Streaming Media
can communicate with the server. We need to generate multiple threads to It also supports video conferencing applications and webcasts.
accept multiple requests from multiple clients at the same time.
IP Multicast:
Multicasting that takes place over the Internet is known as IP Multicasting.
These multicasts follow the internet protocol (IP) to transmit data. IP
multicasting uses a mechanism known as ‘Multicast trees’ to transmit to
information among the users of the network. Multicast trees: allows a single
transmission to branch out to the desired receivers. The branches are
created at the Internet routers, the branches are created such that the
User Datagram Protocol (UDP) length of the transmission will be minimum.
User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of
the Internet Protocol suite, referred to as UDP/IP suite. Unlike TCP, it is an Remote Method Invocation (RMI)
unreliable and connectionless protocol. So, there is no need to establish a Remote Method Invocation (RMI) is an API that allows an object to invoke a
connection prior to data transfer. method on an object that exists in another address space, which could be
on the same machine or on a remote machine. Through RMI, an object
running in a JVM present on a computer (Client-side) can invoke methods
Advantages of Multithreaded Server: on an object present in another JVM (Server-side). RMI creates a public
• Quick and Efficient: Multithreaded server could respond remote server object that enables client and server-side communications
efficiently and quickly to the increasing client queries through simple method calls on the server object.
quickly.
• Waiting time for users decreases: In a single-threaded Stub Object: The stub object on the client machine builds an information
server, other users had to wait until the running process block and sends this information to the server.
gets completed but in multithreaded servers, all users can
get a response at a single time so no user has to wait for The block consists of
other processes to finish. • An identifier of the remote object to be used
Disadvantages of Multithreaded Server: • Method name which is to be invoked
• Complicated Code: It is difficult to write the code of the • Source Port: Source Port is a 2 Byte long field used to • Parameters to the remote JVM
multithreaded server. These programs can not be created identify the port number of the source.
easily • Destination Port: It is a 2 Byte long field, used to identify the Skeleton Object: The skeleton object passes the request from the stub
• Debugging is difficult: Analyzing the main reason and origin port of the destined packet. object to the remote object. It performs the following tasks
of the error is difficult. • Length: Length is the length of UDP including the header • It calls the desired method on the real object present on the
Process and thread and the data. It is a 16-bits field. server.
Processes are basically the programs that are dispatched from the ready • Checksum: Checksum is 2 Bytes long field. It is the 16-bit • It forwards the parameters received from the stub object to
state and are scheduled in the CPU for execution. PCB(Process Control Block) one’s complement of the one’s complement sum of the UDP the method.
holds the concept of process. A process can create other processes which header, the pseudo-header of information from the IP
are known as Child Processes. The process takes more time to terminate and header, and the data, padded with zero octets at the end (if
it is isolated means it does not share the memory with any other process. necessary) to make a multiple of two octets.
The process can have the Transmission Control Protocol
following states new, ready, TCP (Transmission Control Protocol) is one of the main protocols of the
running, waiting, terminated, Internet protocol suite. It lies between the Application and Network Layers
and suspended. which are used in
providing reliable
Thread: delivery services. It is a
Thread is the segment of a connection-oriented
process means a process can protocol for
have multiple threads and these communications that
multiple threads are contained helps in the exchange
within a process. A thread has of messages between
three states: Running, Ready, the different devices
and Blocked. over a network.
The thread takes less time to
terminate as compared to the For example, When a user requests a web page on the internet, somewhere
process but unlike the process, in the world, the server processes that request and sends back an HTML
threads do not isolate. Page to that user. The server makes use of a protocol called the HTTP
Process Thread Protocol. The HTTP then requests the TCP layer to set the required
connection and send the HTML file.
Process means any program is Thread means a segment of a
in execution. process. TCP is a connection-oriented UDP is the Datagram-oriented
protocol. Connection- protocol. This is because there is
orientation means that the no overhead for opening a
The process takes more time to The thread takes less time to
communicating devices should connection, maintaining a
terminate terminate
establish a connection before connection, and terminating a
It takes more time for creation It takes less time for creation
transmitting data and should connection. UDP is efficient for
It also takes more time for It takes less time for context close the connection after broadcast and multicast types of
context Switching switching transmitting the data. network transmission.
The process has its own Thread has Parents’ PCB, its
Process Control Block, Stack, own Thread Control Block, and TCP is reliable as it guarantees The delivery of data to the
and Address Space. Stack and common Address the delivery of data to the destination cannot be
space. destination router guaranteed in UDP
Comparatively Slower than UDP Faster, simpler and more
Process switching uses an Thread switching does not efficient than TCP
interface in an operating require calling an operating
20-60 bytes variable length 8 bytes fixed length header
system. system and causes an interrupt
header
to the kernel.
Heavy weight Lightweight
Group Communication in distributed Systems Name Resolution What christian’s algorithm of physical clock synchronization.?
Communication between two processes in a distributed system is required Name resolution is the process of mapping an object's name to the object's Cristian’s Algorithm is a clock synchronization algorithm is used to
to exchange various data, such as code or a file, between the processes. properties, such as its location. Since an object's properties are stored and synchronize time with a time server by client processes. This algorithm
When one source process tries to communicate with multiple processes at maintained by the authoritative name servers of that object, name works well with low-latency networks where Round Trip Time is short as
once, it is called Group Communication. This abstraction is to hide the resolution is basically the process of mapping an object's name to the compared to accuracy while redundancy-prone distributed
message passing so that the communication looks like a normal procedure authoritative name servers of that object. Once an authoritative name systems/applications do not go hand in hand with this algorithm. Here
call. Group communication also helps the processes from different hosts to server of the object has been located, operations can be invoked to read or Round Trip Time refers to the time duration between the start of a Request
work together and perform operations in a synchronized manner, therefore update the object's properties. Each name agent in a distributed system and the end of the corresponding Response.
increases the overall performance of the system. knows about vat least one name server apriorism. To get a name resolved, Algorithm:
Types of Group Communication in a Distributed System : a client first contacts its name agent, which in turn contacts a known name 1) The process on the client machine sends the request for fetching clock
server, which may in turn contact other name servers. time(time at the server) to the Clock Server at time T_0 .
1. Broadcast Communication : The DNS Name Space 2) The Clock Server listens to the request made by the client process and
When the host process tries to communicate with every process in a The DNS name space is the set of all names used with DNS. This space is returns the response in form of clock server time.
distributed system at same time. partitioned hierarchically and is case insensitive. 3) The client process fetches the response from the Clock Server at time T_1
Broadcast communication comes The current DNS name space is a tree of domains with an unnamed root at and calculates the synchronized client clock time using the formula given
in handy when a common stream the top. The top echelons of the tree are the so-called top-level domains below.
of information is to be delivered (TLDs), which include: \[ T_{CLIENT} = T_{SERVER} + (T_1 - T_0)/2 \]
to each and every process in most • Generic TLDs (gTLDs) where T_{CLIENT} refers to the synchronized clock time,
efficient manner possible. Since it • Country-code TLDs (ccTLDs) T_{SERVER} refers to the clock time returned by the server,
does not require any processing • Internationalized country-code TLDs (IDN ccTLDs) T_0 refers to the time at which request was sent by the client process,
whatsoever, communication is • A special infrastructure TLD called, for historical reasons, T_1 refers to the time at which response was received by the client process
very fast in comparison to other ARPA [RFC3172].
modes of communication. Explain Logical Clocks in detail?
However, it does not support a What Is LDAP?
Companies store usernames, passwords, email addresses, printer Logical Clocks refer to implementing a protocol on all machines within your
large number of processes and distributed system, so that the machines are able to maintain consistent
cannot treat a specific process connections, and other static data within directories. LDAP is an open,
vendor-neutral application protocol for accessing and maintaining that data. ordering of events within some virtual timespan. A logical clock is a
individually. mechanism for capturing chronological and causal relationships in a
A broadcast Communication: P1 process communicating with every LDAP can also tackle authentication, so users can sign on just once and
access many different files on the server. distributed system. Distributed systems may have no physically synchronous
An LDAP query typically involves: global clock, so a logical clock allows global ordering on events from different
process in the system processes in such systems.
• Session connection. The user connects to the server via an
LDAP port.
Example:
2. Multicast Communication: • Request. The user submits a query, such as an email lookup,
If we go outside then we have made a full plan that at which place we have
When the host process tries to to the server.
to go first, second and so on. We don’t go to second place at first and then
communicate with a designated • Response. The LDAP protocol queries the directory, finds
the first place. We always maintain the procedure or an organization that is
group of processes in a the information, and delivers it to the user.
planned before. In a similar way, we should do the operations on our PCs
distributed system at the same • Completion. The user disconnects from the LDAP port.
one by one in an organized way.
time. This technique is mainly Suppose we have more than 10 PCs in a distributed system and every PC is
used to find a way to address doing it’s own work but then how we make them work together. There
problem of a high workload on comes a solution to this i.e., LOGICAL CLOCK.
host system and redundant
information from process in
system. Multitasking can Explain Recart-Agrawala algorithm of distributed mutual exclusion.
significantly decrease time taken Ricart–Agrawala algorithm is an algorithm to for mutual exclusion in a
distributed system proposed by Glenn Ricart and Ashok Agrawala. This
for message handling. algorithm is an extension and optimization of Lamport’s Distributed Mutual
A multicast Communication: P1 process communicating with only a group of Exclusion Algorithm. Like Lamport’s Algorithm, it also follows permission
the process in the system based approach to ensure mutual exclusion.
In this algorithm:
3. Unicast Communication:
When the host process tries to • Two type of messages ( REQUEST and REPLY) are used and
Name Services and the Domain Name System communication channels are assumed to follow FIFO order.
communicate with a single
A name service stores a collection of one or more naming contexts, sets of • A site send a REQUEST message to all other site to get their
process in a distributed system at
bindings between textual names and attributes for objects such as permission to enter critical section.
the same time. Although, same
computers, services, and users. • A site send a REPLY message to other site to give its
information may be passed to
The major operation that a name service supports is to resolve names. permission to enter the critical section.
multiple processes. This works
Uniform Resource Identifiers • A timestamp is given to each critical section request using
best for two processes
Uniform Resource Identifiers (URIs) came about from the need to identify Lamport’s logical clock.
communicating as only it has to
resources on the Web, and other Internet resources such as electronic • Timestamp is used to determine priority of critical section
treat a specific process only.
mailboxes. An important goal was to identify resources in a coherent way, requests. Smaller timestamp gets high priority over larger
However, it leads to overheads
so that they could all be processed by common software such as browsers. timestamp. The execution of critical section request is
as it has to find exact process
and then exchange always in the order of their timestamp.
Uniform Resource Locators: Some URIs contain information that can be used
to locate and access a resource; others are pure resource names. The 1. The Bully Algorithm –
information/data. This algorithm applies to system where every process can send a message
familiar term Uniform Resource Locator (URL) is often used for URIs that
provide location information and specify the method for accessing the to every other process in the system.
Client server communication resource. Algorithm – Suppose process P sends a message to the coordinator.
Clients and servers exchange messages in a request response messaging • If coordinator does not respond to it within a time interval
pattern. The client sends a request, and the server returns a response. This Uniform Resource Names: Uniform Resource Names (URNs) are URIs that T, then it is assumed that coordinator has failed.
exchange of messages is an example of inter-process communication. are used as pure resource names rather than locators. For example, the URI: • Now process P sends election message to every process
To communicate, the computers must have a common language, and they ============================================================= with high priority number.
must follow rules so that both the client and the server know what to expect. What is DNS? How does it works? • It waits for responses, if no one responds for time interval T
The language and rules of communication are defined in a communication. The domain name system (DNS) is a naming database in which internet then process P elects itself as a coordinator.
All client-server protocols operate in the application layer. The application- domain names are located and translated into Internet Protocol (IP) • Then it sends a message to all lower priority number
layer protocol addresses. The domain name system maps the name people use to locate a processes that it is elected as their new coordinator.
defines the basic website to the IP address that a computer uses to locate that website. • However, if an answer is received within time T from any
patterns of the other process Q,
dialogue. For example, if someone types "example.com" into a web browser, a server • Process P again waits for time interval T’ to receive another
To formalize the behind the scenes maps that name to the corresponding IP address. An IP message from Q that it has been elected as coordinator.
data exchange address is similar in structure to 203.0.113.72. • If Q doesn’t responds within time interval T’ then it is
even further, assumed to have failed and algorithm is restarted.
the server may Working of DNS
implement an • DNS is a client/server network communication protocol. 2. The Ring Algorithm –
API(such as a DNS clients send requests to the. server while DNS servers This algorithm applies to systems organized as a ring(logically or physically).
web send responses to the client. In this algorithm we assume that the link between the process are
service).The API • Client requests contain a name which is converted into an unidirectional and every process can message to the process on its right
is an abstraction layer for such resources as databases and custom IP address known as a forward DNS lookups while requests only. Data structure that this algorithm uses is active list, a list that has
software. By restricting communication to a specific content format. By containing an IP address which is converted into a name priority number of all active processes in the system.
known as reverse DNS lookups. Algorithm –
abstracting access, it facilitate cross platform data exchange. • DNS implements a distributed database to store the name • if process P1 detects a coordinator failure, it creates new
Example of all the hosts available on the internet. active list which is empty initially. It sends election message
• When a bank customer accesses online banking services to its neighbor on right and adds number 1 to its active list.
with a web browser (the client), the client initiates a request • If process P2 receives message elect from processes on left,
to the bank’s web server. it responds in 3 ways:
• The customer’s login credentials may be stored in a • If message received does not contain 1 in active list then P1
database, and the web server accesses the database server adds 2 to its active list and forwards the message.
as a client. • If this is the first election message it has received or sent, P1
creates new active list with numbers 1 and 2. It then sends
election message 1 followed by 2.
• If Process P1 receives its own election message 1 then active
list for P1 now contains numbers of all the active processes
in the system. Now Process P1 detects highest priority
number from list and elects it as the new coordinator.


What Does Distributed System Mean? goals and challenges of DS ? Name Spaces Computer Network Architecture
A distributed system is any network structure that consists of autonomous A name space is a collection of all valid names recognized by a particular Computer Network Architecture is defined as the physical and logical design
computers that are connected using a distribution middleware. Distributed serviceAllow simple but meaningful names to be usedPotentially infinite of the software, hardware, protocols, and media of the transmission of data.
systems facilitate sharing different resources and capabilities, to provide number of namesStructuredto allow similar subnames without clashesto Simply we can say that how computers are organized and how tasks are
users with a single and integrated coherent network. group related namesAllow re-structuring of name treesfor some types of allocated to the computer.
change, old programs should continue to workManagement of trust.
The opposite of a distributed system is a centralized system. If all of the The two types of network architectures are used:
components of a computing system reside in one machine, as was the case Computer Network Architecture
with early mainframes such as Von Neumann machines, it is not a • Peer-To-Peer network
distributed system. • Client/Server network

The key goals of a distributed system include: Peer-To-Peer network


• Transparency: Achieving the image of a single system image Peer-To-Peer network is a network in which all the computers are linked
without concealing the details of the location, access, together with equal privilege and responsibilities for processing the data.
migration, concurrency, failure, relocation, persistence and Peer-To-Peer network is useful for small environments, usually up to 10
resources to the users
computers.
• Openness: Making the network easier to configure and
modify Peer-To-Peer network has no
dedicated server.
• Reliability: Compared to a single system, a distributed Special permissions are assigned to
system should be highly capable of being secure, consistent each computer for sharing the
and have a high capability of masking errors. resources, but this can lead to a
What is Thread? What are it’s types ? problem if the computer with the
• Performance: Compared to other models, distributed A thread is a flow of execution through the process code, with its own resource is down.
models are expected to give a much-wanted boost to program counter that keeps track of which instruction to execute next, Advantages Of Peer-To-Peer Network:
performance. system registers which hold its current working variables, and a stack which • It is less costly as it does not contain any dedicated server.
contains the execution history. • If one computer stops working but, other computers will not
• Scalability: Distributed systems should be scalable with Types of Thread stop working.
respect to geography, administration or size. Threads are implemented in following two ways − • It is easy to set up and maintain as each computer manages
• User Level Threads − User managed threads. itself.
Challenges for distributed systems include: Disadvantages Of Peer-To-Peer Network:
• Kernel Level Threads − Operating System managed threads • In the case of Peer-To-Peer network, it does not contain the
• Security is a big challenge in a distributed environment, acting on kernel, an operating system core. centralized system . Therefore, it cannot back up the data as
especially when using public networks. the data is different in different locations.
1. User Level Threads • It has a security issue as the device is managed itself.
• Fault tolerance could be tough when the distributed model In this case, the thread management kernel is not aware of the existence of
is built based on unreliable components. threads. The thread library contains code for creating and destroying
threads, for passing message and data between threads, for scheduling Client/Server Network
• Coordination and resource sharing can be difficult if proper thread execution and for saving and restoring thread contexts. The Client/Server network is a network model designed for the end users called
protocols or policies are not in place. application starts with a single thread. clients, to access the resources such
Advantages as songs, video, etc. from a central
• Process knowledge should be put in place for the • Thread switching does not require Kernel mode privileges. computer known as Server.
administrators and users of the distributed model. • User level thread can run on any operating system. The central controller is known as a
• Scheduling can be application specific in the user level server while all other computers in
Comparison Table Between Absolute and Relative Path
thread.
• User level threads are fast to create and manage. the network are called clients.
Disadvantages
• In a typical operating system, most system calls are A server performs all the major
Parameter of operations such as security and
Absolute Path Relative Path blocking.
Comparison network management.
• Multithreaded application cannot take advantage of
multiprocessing. A server is responsible for managing all the resources such as files,
directories, printer, etc.
specifies the related to the
2. Kernel Level Threads All the clients communicate with each other through a server. For example,
By definition location from the location from
In this case, thread management is done by the Kernel. There is no thread if client1 wants to send some data to client 2, then it first sends the request
root directory current directory
management code in the application area. Kernel threads are supported to the server for the permission. The server sends the response to the client
directly by the operating system. Any application can be programmed to be 1 to initiate its communication with the client 2.
Function of multithreaded. All of the threads within an application are supported within Computer Network Architecture
Begins with a Never begins with a a single process. Advantages Of Client/Server network:
delimiting
delimiting character delimiting character • A Client/Server network contains the centralized system.
character
The Kernel maintains context information for the process as a whole and for Therefore we can back up the data easily.
individuals threads within the process. Scheduling by the Kernel is done on • A Client/Server network has a dedicated server that
Content from other Content from the a thread basis. The Kernel performs thread creation, scheduling and improves the overall performance of the whole system.
Navigates to
domains same domain management in Kernel space. Kernel threads are generally slower to create • Security is better in Client/Server network as a single server
and manage than the user threads. administers the shared resources.
• It also increases the speed of the sharing resources.
URL used Uses absolute URL Used relative URL Advantages Disadvantages Of Client/Server network:
• Kernel can simultaneously schedule multiple threads from • Client/Server network is expensive as it requires the server
the same process on multiple processes. with large memory.
Other names Full-path or File path Non-absolute path
• If one thread in a process is blocked, the Kernel can schedule • A server has a Network Operating System(NOS) to provide
another thread of the same process. the resources to the clients, but the cost of NOS is very high.
• Kernel routines themselves can be multithreaded. • It requires a dedicated network administrator to manage all
Global Name Service (GNS) Disadvantages the resources.
Designed and implemented by Lampson and colleagues at the DEC Systems • Kernel threads are generally slower to create and manage
Digital Signature
Research Center (1986)Provide facilities for resource location, addressing than the user threads.
• A digital signature—a type of electronic signature—is a
and authenticationWhen the naming database grows from small to large • Transfer of control from one thread to another within the mathematical algorithm routinely used to validate the
scale, the structure of name space may changethe service should same process requires a mode switch to the Kernel. authenticity and integrity of a message (e.g., an email, a credit
accommodate itCache consistency ?
card transaction, or a digital document).
GNS Structure
• Digital signatures create a virtual fingerprint that is unique to
• Tree of directories holding names and values
a person or entity and are used to identify users and protect
• Muti-part pathnames refer to the root or relative working information in digital messages or documents.
S.N. User-Level Threads Kernel-Level Thread
directory (like Unix file system) • In emails, the email content itself becomes part of the digital
• Unique Directory Identifier (DI) signature.
• A directory contains list of names and references 1 User-level threads are Kernel-level threads • Digital signatures are significantly more secure than other
• Leaves of tree contain value trees (structured values) faster to create and are slower to create forms of electronic signatures.
manage. and manage.

2 Implementation is by a Operating system


thread library at the user supports creation of
level. Kernel threads.

3 User-level thread is generic Kernel-level thread is


and can run on any specific to the
operating system. operating system.

4 Multi-threaded applications Kernel routines


cannot take advantage of themselves can be
multiprocessing. multithreaded.
Vector Clocks in Distributed Systems Basis of Centralized Distributed database Client-Server Network Peer-to-Peer Network
Vector Clock is an algorithm that generates partial ordering of events and Compariso database
detects causality violations in a distributed system. These clocks expand on n In Client-Server Network, Clients and In Peer-to-Peer Network, Clients and
Scalar time to facilitate a causally consistent view of the distributed system, Definition It is a database It is a database that server are differentiated, Specific server are not differentiated.
they detect whether a contributed event has caused another event in the that is stored, consists of multiple server and clients are present.
distributed system. It essentially captures all the causal relationships. This located as well databases which are
algorithm helps us label every process with a vector(a list of integers) with as maintained at connected with each Client-Server Network focuses on While Peer-to-Peer Network focuses
an integer for each local clock of every process within the system. So for N a single location other and are spread information sharing. on connectivity.
given processes, there will be vector/ array of size N. only. across different
How does the vector clock algorithm work : physical locations.
• Initially, all the clocks are set to zero. Access The data access The data access time In Client-Server Network, Centralized While in Peer-to-Peer Network, Each
• Every time, an Internal event occurs in a process, the value time time in the case in the case of multiple server is used to store the data. peer has its own data.
of the processes’s logical clock in the vector is incremented of multiple users users is less in a
by 1 is more in a distributed database. In Client-Server Network, Server While in Peer-to-Peer Network, Each
• Also, every time a process sends a message, the value of the centralized respond the services which is request and every node can do both request
processes’s logical clock in the vector is incremented by 1. database. by Client. and respond for the services.
Manageme The The management,
Every time, a process receives a message, the value of the processes’s logical nt of data management, modification, and Client-Server Network are costlier While Peer-to-Peer Network are less
clock in the vector is incremented by 1, and moreover, each element is modification, backup of this than Peer-to-Peer Network. costly than Client-Server Network.
updated by taking the maximum of the value in its own vector clock and the and backup of database are very
value in the vector in the received message (for every element). this database difficult as it is spread Client-Server Network are more While Peer-to-Peer Network are less
are easier as the across different stable than Peer-to-Peer Network. stable if number of peers is increase.
Example : entire data is physical locations. Client-Server Network is used for both While Peer-to-Peer Network is
Consider a process (P) with a vector size N for each process: the above set present at the small and large networks. generally suited for small networks
of rules mentioned are to be executed by the vector clock: same location. with fewer than 10 computers.
View This database Since it is spread
provides a across different
uniform and locations thus it is
complete view to difficult to provide a
the user. uniform view to the What is interposes communication in distributed system? Explain.
user. Between RPC and RMI which one is better in terms of communication with
Data This database This database may suitable example.
Consistenc has more data have some data Inter process Communication is a process of exchanging the data between
y consistency in replications thus data two or more independent process in a distributed environment is called as
comparison to consistency is less. Inter process communication. Inter process communication on the internet
distributed provides both Datagram and stream communication.
database. Examples Of Inter Process Communication:
1. N number of applications can communicate with
Explain the middleware with its importance in distributed system with the X server through network protocols.
suitable diagram. 2. Servers like Apache spawn child processes to handle
The above example depicts the vector clocks mechanism in which the vector Distributed computing problems are simplified by many vendors as they are requests.
clocks are updated after execution of internal events, the arrows indicate offering distributed system services that have standard programing 3. Pipes are a form of IPC: grep foo file | sort
how the values of vectors are sent in between the processes (P1, P2, P3). interfaces and protocols. These distributed system services are called
middleware. As they sit in the middle, layering above the operating system
To sum up, Vector clocks algorithms are used in distributed systems to and networking software below industry specific applications. Middleware RPC RMI
provide a causally consistent ordering of events but the entire Vector is sent may have multiple roles, but the most common one is usually handling
to each process for every message sent, in order to keep the vector clocks in communication between components of the system. At a high level, it's
sync. analogous to the postal system - you can send [almost] anything through the RPC is a website for libraries
mail by packaging and addressing it in a standard manner. The carrier makes It is a forum for java.
and OS.
no assumptions about the contents, on the assumption that the receiver
knows what they represent.
Importance:
S.NO Authentication Authorization RPC facilitates the programming RMI supports programming
i. Focus on end-to-end support and integration, not just of the procedures. oriented to the object.
individual components: There is now widespread
recognition that effective development of large-scale
While in distributed systems requires the use of COTS infrastructure
In authentication authorization
and service components. Moreover, the usability of the RPC is less powerful. RMI is more powerful.
process, the identity process, person’s
resulting products depends heavily on the weaving of the
of users are or user’s
checked for authorities are properties of the whole as derived from its parts. In its most
providing the checked for useful forms, middleware provides the end-to-end
perspective extending across elements applicable to the It offers protection at the
access to the accessing the There is no protection for RPC.
1. system. resources. network substrate, the platform operating systems and customer level.
system services, the programming system in which they are
developed, the applications themselves, and the
middleware that integrates all these elements together.
For basic RPC applications, Multiple codes for basic RMI
In authentication While in this several codes are required. applications are not necessary.
process, users or process, users or ii. The increased viability of open systems architectures and
persons are persons are open-source availability: By their very nature, distributed
2. verified. validated. systems developed by composing separate components are
more open than systems conceived and developed as
monolithic entities. The focus on interfaces for integrating
and controlling the component parts leads naturally to Conclusion:
standard interfaces. In turn, this yields the potential for RPC and RMI are frameworks that permit a client to invoke server processing
While this process or method by communicating with the client-server. The common
It is done before the is done after the multiple choices for component implementations, and
open engineering concepts. distinction between RPC and RMI is that RPC only supports proceedings,
authorization authentication while the other big difference between RMI and RPC is the fact that the
3. process. process. parameters transferred to remote operations have regular data structures.
iii. Advanced common infrastructure sustaining continuous
innovation: Middleware: supporting component
integration and reuse is a key technology to help amortize
software life-cycle costs by leveraging previous Explain transient Asynchronous communication with suitable example.
While it needs
It needs usually user’s privilege or development expertise, e.g., component middleware helps Ans: A sends the message and continues execution (nonblocking). B has to
4. user’s login details. security levels. to abstract commonly reused low-level OS concurrency and be running, because if it is not running the message will be discarded. Even
networking details away into higher level, more easily used if any router along the way is down, the message will be discarded. UDP
artifacts. Likewise, middleware also focuses efforts to communication is an example of transient asynchronous communication.
improve software quality and performance by combining The function MP I b send() is an implementation of this.
aspects of a larger solution together, e.g., component Example:
middleware combines fault tolerance for domain-specific
elements with real-time QoS properties.
Why it is difficult to synchronous physical clock? Explain how synchronous Describe Lamport’s algorithm with its benefits and drawbacks. Explain different types of architecture styles in distributed system.
can be solved using logical clock. Ans: Lamport’s Distributed Mutual Exclusion Algorithm is a permission- 1. Layered Architecture:
Ans: Communication between processes in a distributed system can have based algorithm proposed by Lamport’s as an illustration of his In Layered architecture, different components are organized in layers. Each
unpredictable delays, processes can fail, messages may be lost ▪ synchronization scheme for distributed systems. layer communicates with its adjacent layer by sending requests and getting
Synchronization in distributed systems is harder than in centralized systems In permission-based timestamp is used to order critical section requests and responses. The layered architecture separates components into units. It is
because the need for distributed algorithms. to resolve any conflict between requests. an efficient way of communication. Any layer cannot directly communicate
Properties of distributed algorithms: In Lamport’s Algorithm critical section requests are executed in the with another layer. A layer can only communicate with its neighboring
1. 1 The relevant information is scattered among increasing order of timestamps i.e. a request with smaller timestamp will be layer and then the next layer transfers information to another layer and so
multiple machines. given permission to execute critical section first than a request with larger on the process goes on.
2. 2 Processes make decisions based only on locally timestamp. In some cases, layered architecture is in cross-layer coordination. In a
available information. Algorithm: cross-layer, any adjacent layer can be skipped until it fulfils the request and
3. 3 A single point of failure in the system should be To enter Critical section: provides better performance results. Request flow from top to
avoided. • When a site Si wants to enter the critical section, it bottom(downwards) and response flow from bottom to top(upwards). The
4. 4 No common clock or other precise global time sends a request message Request (tsi, i) to all other advantage of layered architecture is that each layer can be modified
source exists. sites and places the request on request_queuei. independently without affecting the whole system. This type of
Logical Clocks refer to implementing a protocol on all machines within your Here, Tsi denotes the timestamp of Site Si architecture is used in Open System Interconnection (OSI) model.
distributed system, so that the machines are able to maintain consistent • When a site Sj receives the request message
ordering of events within some virtual timespan. A logical clock is a REQUEST (tsi, i) from site Si, it returns a
mechanism for capturing chronological and causal relationships in a timestamped REPLY message to site Si and places
distributed system. Distributed systems may have no physically synchronous the request of site Si on request_queuei
global clock, so a logical clock allows global ordering on events from different .
processes in such systems. If we go outside then we have made a full plan To execute the critical section:
that at which place we have to go first, second and so on. We don’t go to • A site Si can enter the critical section if it has
second place at first and then the first place. We always maintain the received the message with timestamp larger than
procedure or an organization that is planned before. In a similar way, we (tsi, i) from all other sites and its own request is at
should do the operations on our PCs one by one in an organized way. the top of request_queuei
Suppose, we have more than 10 PCs in a distributed system and every PC is To release the critical section:
doing it’s own work but then how we make them work together. There • When a site Si exits the critical section, it removes
comes a solution to this i.e. LOGICAL CLOCK. its own request from the top of its request queue
and sends a timestamped RELEASE message to all 2. Object-Oriented Architecture:
other sites In this type of architecture, components are treated as objects which
What do you understand by Caching and Replication in web? Explain.
• When a site Sj receives the timestamped RELEASE convey information to each other. Object-Oriented Architecture contains
A cache is a temporary storage location for copied information. There are
message from site Si, it removes the request of Si an arrangement of loosely coupled objects. Objects can interact with each
over a billion pages (or objects) on the internet. Many users request the
from its request queue other through method calls. Objects are connected to each other through
same popular objects. An example of that would be the top logo image of
Drawbacks of Lamport’s Algorithm: the Remote Procedure Call (RPC) mechanism or Remote Method
Yahoo.com which appears in almost all Yahoo pages. The image must be
• •Unreliable approach: failure of any one of the Invocation (RMI) mechanism. Web Services and REST API are examples of
delivered to the browser each time the browser accesses any of Yahoo's
processes will halt the progress of entire system. object-oriented architecture.
pages these pages are requested a number of times each day by different
• High message complexity: Algorithm requires 3(N-
users. A Web cache is a dedicated computer system which will monitor the
1) messages per critical section invocation.
object requests and stores objects as it retrieves them from the server. On
Performance:
subsequent requests the cache will deliver objects from its storage rather
• Synchronization delay is equal to maximum
than passing the request to the origin server. Every Web object changes over
message transmission time
time and therefore has a useful life or "freshness”. If the freshness of an
• It requires 3(N – 1) messages per CS execution.
object expires it is the responsibility of the Web cache to get the new version
• Algorithm can be optimized to 2(N – 1) messages by
of the object. The more the number of requests for the same object the
omitting the REPLY message in some situations.
more effective will the Web cache be in reducing upstream traffic and will
also help reducing server load, resulting in less latency.
Replication is a technique similar to caching but is generally considered to What is vector clock? Why it is important? Explain vector clock algorithm
be more active. The process of replication copies cache content and pushes by its example.
it on to one or more cache servers across the network. Replication is Ans: Vector Clock is an algorithm that generates partial ordering of events
required to distribute objects among the servers to maintain the freshness and detects causality violations in a distributed system. These clocks expand
of content across servers, which results in reduced upstream network traffic. on Scalar time to facilitate a causally consistent view of the distributed 3. Data Centered Architecture:
Typically, the same content is pushed across several machines making it system, they detect whether a contributed event has caused another event Data Centered Architecture is a type of architecture in which a common
more efficient to use Multicast. Replication is critical in global operations, in the distributed system. It essentially captures all the causal relationships. data space is present at the center. It contains all the required data in one
where cost of international traffic is high and ways have to be found to This algorithm helps us label every process with a vector (a list of integers) place a shared data space. All the components are connected to this data
mirror data without using too much bandwidth. with an integer for each local clock of every process within the system. So space and they follow publish/subscribe type of communication. It has a
============================================================ for N given processes, there will be vector/ array of size N. central data repository at the center. Required data is then delivered to the
Describe different types of security mechanisms to protect against security How does the vector clock algorithm work? components.
threats in distributed systems. • Initially, all the clocks are set to zero. For example, Producer-Consumer system. The producer produces data in
Ans: Network Security is field in computer technology that deals with • Every time, an Internal event occurs in a process, common data space and consumers request data.
ensuring security of computer network infrastructure. As the network is very the value of the processes’ logical clock in the vector
necessary for sharing of information whether it is at hardware level such as is incremented by 1
printer, scanner, or at software level. Therefore, security mechanism can • Also, every time a process sends a message, the
also be termed as is set of processes that deal with recovery from security value of the processes’ logical clock in the vector is
attack. Various mechanisms are designed to recover from these specific incremented by 1.
attacks at various protocol layers. Every time, a process receives a message, the value of the processes’ logical
Types of Security Mechanism are clock in the vector is incremented by 1, and moreover, each element is
Encipherment: updated by taking the maximum of the value in its own vector clock and the
This security mechanism deals with hiding and covering of data which helps value in the vector in the received message (for every element).
data to become confidential. It is achieved by applying mathematical Example:
calculations or algorithms which reconstruct information into not readable Consider a process (P) with a vector size N for each process: the above set
form. of rules mentioned are to be executed by the vector clock:

Access Control:
This mechanism is used to stop unattended access to data which you are
sending. It can be achieved by various techniques such as applying
passwords, using firewall, or just by adding PIN to data.
4. Event-Based Architecture:
Notarization: Event-Based Architecture is almost similar to Data centered architecture
This security mechanism involves use of trusted third party in just the difference is that in this architecture events are present instead of
communication. It acts as mediator between sender and receiver so that if data. Events are present at the center in the Event bus and delivered to the
any chance of conflict is reduced. This mediator keeps record of requests required component whenever needed. In this architecture, the entire
made by sender to receiver for later denied. communication is done through events. When an event occurs, the system,
as well as the receiver, get notified. Data, URLs etc. are transmitted
Data Integrity: through events. The components of this system are loosely coupled that’s
This security mechanism is used by appending value to data to which is why it is easy to add, remove and modify them. Heterogeneous
created by data itself. It is similar to sending packet of information known to components can communicate through the bus.
both sending and receiving parties and checked before and after data is
received.
===========================================================
Authentication exchange:
This security mechanism deals with identity to be known in communication.
This is achieved at the TCP/IP layer where two-way handshaking mechanism
is used to ensure data is sent or not

Bit stuffing:
This security mechanism is used to add some extra bits into data which is
being transmitted. It helps data to be checked at the receiving end and is
achieved by Even parity or Odd Parity.

Digital Signature:
This security mechanism is achieved by adding digital data that is not visible
to eyes. It is form of electronic signature which is added by sender which is
checked by receiver electronically. This mechanism is used to preserve data
which is not more confidential but sender’s identity is to be notified.
Explain Remote procedure call and its working process in detail with a What is data- centric consistency model? Explain its type in details. Cryptography and its Types and features!
suitable diagram. How RPC is different from RMI? Ans: Traditionally consistency has been discussed in the context of read Cryptography is technique of securing information and communications
Remote Procedure Call (RPC) is a powerful technique for constructing and write operations on shared data, available by means of shared through use of codes so that only those person for whom the information
distributed, client-server-based applications. It is based on extending the memory. A shared database, or a file system. Here, we use the broader is intended can understand it and process it. Thus preventing unauthorized
conventional local procedure calling so that the called procedure need not term data store. A data store may be physically distributed across multiple access to information. The prefix “crypt” means “hidden” and suffix graphy
exist in the same address space as the calling procedure. The two machines. means “writing”.
processes may be on the same system, or they may be on different Types: -
systems with a network connecting them. i. Consistency model: a contract between a (distributed) data In general there are three types Of cryptography:
Working of RPC. store and processes, in which the data store specifies precisely what the
results of read and write operations are in the presence of concurrency. Symmetric Key Cryptography:
It is an encryption system where the sender and receiver of message use a
ii. Continuous Consistency: single common key to encrypt and decrypt messages. Symmetric Key
Observation: We can actually talk a about a degree of consistency: Systems are faster and simpler but the problem is that sender and receiver
· Replicas may differ in their numerical value have to somehow exchange key in a secure manner. The most popular
· Replicas may differ in their relative staleness symmetric key cryptography system is Data Encryption System(DES).
· There may differences with respect to (number and order) of
performed update operations Hash Functions:
There is no usage of any key in this algorithm. A hash value with fixed
Conit: consistency unit) specifies the data unit over which consistency is to length is calculated as per the plain text which makes it impossible for
be measured. contents of plain text to be recovered. Many operating systems use hash
· e.g., stock record, weather report, etc. functions to encrypt passwords.
Conit example: numerical and ordering deviations
Asymmetric Key Cryptography:
iii. Strict Consistency Under this system a pair of keys is used to encrypt and decrypt
Any read on a data item ‘x’ returns a value corresponding to the result of information. A public key is used for encryption and a private key is used
the most recent write on ‘x’ (regardless of where the write occurred). With for decryption. Public key and Private Key are different. Even if the public
Strict Consistency, all writes are instantaneously visible to all processes and key is known by everyone the intended receiver can only decode it because
absolute global time order is maintained throughout the distributed he alone knows the private key.
system. This is the consistency model “Holy Grail” – not at all easy in the
real world, and all but impossible within a DS. Features Of Cryptography are as follows:
Confidentiality:
iv. Sequential Consistency Information can only be accessed by the person for whom it is intended
· A weaker consistency model, which represents a relaxation of the and no other person except him can access it.
rules.
It is also must easier (possible) to implement. Integrity:
The following steps take place during an RPC: Sequential Consistency: Information cannot be modified in storage or transition between sender
1. A client invokes a client stub procedure, passing The result of any execution is the same as if the (read and write) and intended receiver without any addition to information being detected.
parameters in the usual way. The client stub resides within operations by all processes on the data-store were executed in the same
the client’s own address space. sequential order and the operations of each individual process appear in Non-repudiation:
2. The client stub Marshalls(pack) the parameters into a this sequence in the order specified by its program. The creator/sender of information cannot deny his intention to send
message. Marshalling includes converting the information at later stage.
representation of the parameters into a standard format, v. Causal Consistency
and copying each parameter into the message. · Writes that are potentially causally related must be seen by all Authentication:
3. The client stub passes the message to the transport layer, processes in the same order. The identities of sender and receiver are confirmed. As well as
which sends it to the remote server machine. · Concurrent writes (i.e., writes that are NOT causally related) may be destination/origin of information is confirmed.
4. On the server, the transport layer passes the message to a seen in a different order by different processes.
server stub, which demarshalls(unpack) the parameters vi. FIFO Consistency ===========================================================
and calls the desired server routine using the regular Writes done by a single process are seen by all other processes in the order
procedure call mechanism. in which they were issued, but writes from different processes may be
5. When the server procedure completes, it returns to the seen in a different order by different processes.
server stub (e.g., via a normal procedure call return), which · Also called “PRAM Consistency” – Pipelined RAM.
Marshalls the return values into a message. The server · Easy to implement -There are no guarantees about the order in which
stub then hands the message to the transport layer. different processes see writes – except those two or more writes from a
6. The transport layer sends the result message back to the single process must be seen in order.
client transport layer, which hands the message back to
the client stub. vii. Weak Consistency
7. The client stub demarshalls the return parameters and · Not all applications need to see all writes, let alone seeing them in the
execution return to the caller. same order.
Three component of security? CIA triad? · Leads to Weak Consistency (which is primarily designed to work with
distributed critical sections).
When we discuss data and information, we must consider the CIA triad. · This model introduces the notion of a synchronization variable”,
The CIA triad refers to an information security model made up of the three which is used update all copies of the data-store.
main components: confidentiality, integrity and availability. Each Properties Weak Consistency:
component represents a fundamental objective of information security. 1. Accesses to synchronization variables associated with a data-store are
The three components of the CIA triad are discussed below: sequentially consistent.
2. No operation on a synchronization variable is allowed to be performed
Confidentiality: until all previous writes have been completed everywhere.
This component is often associated with secrecy and the use of encryption. 3. No read or write operation on data items are allowed to be performed
Confidentiality in this context means that the data is only available to until all previous operations to synchronization variables have been
authorized parties. When information has been kept confidential it means performed.
that it has not been compromised by other parties; confidential data are
not disclosed to people who do not require them or who should not have viii. Release Consistency
access to them. Ensuring confidentiality means that information is · When a process does an acquire, the data-store will ensure that all
organized in terms of who needs to have access, as well as the sensitivity the local copies of the protected data are brought up to date to be
of the data. A breach of confidentiality may take place through different consistent with the remote ones if needs be.
means, for instance hacking or social engineering. · When a release is done, protected data that have been changed are
propagated out to the local copies of the data-store.
Integrity:
Data integrity refers to the certainty that the data is not tampered with or ix. Entry consistency
degraded during or after submission. It is the certainty that the data has ● Acquire and release are still used, and the data-store meets the
not been subject to unauthorized modification, either intentional or following conditions:
unintentional. There are two points during the transmission process during ● An acquire access of a synchronization variable is not allowed to
which the integrity could be compromised: during the upload or perform with respect to a process until all updates to the guarded shared
transmission of data or during the storage of the document in the database data have been performed with respect to that process.
or collection. ● Before an exclusive mode access to a synchronization variable by a
process is allowed to perform with respect to that process, no other
Availability: This means that the information is available to authorized process may hold the synchronization variable, not even in nonexclusive
users when it is needed. For a system to demonstrate availability, it must mode.
have properly functioning computing systems, security controls and ● After an exclusive mode access to a synchronization variable has
communication channels. Systems defined as critical (power generation, been performed, any other process's next nonexclusive mode access to
medical equipment, safety systems) often have extreme requirements that synchronization variable may not be performed until it has performed
related to availability. These systems must be resilient against cyber with respect to that variable's owner.
threats, and have safeguards against power outages, hardware failures and
other events that might impact the system availability.

You might also like