DS - Important Questions
DS - Important Questions
(134)
25-Question Bank
3. Network Problems:
Communication failures can cause parts of the system to be isolated.
4. Synchronization:
Keeping all parts of the system in sync, especially when data is updated.
5. Scalability:
The system should handle more users or data without slowing down.
6. Latency:
Delays in communication between different parts of the system can affect
performance.
7. Security:
Protecting data and ensuring safe communication between parts of the
system.
8. Concurrency:
Handling multiple operations at the same time without conflicts.
9. Heterogeneity:
Different parts of the system may use different hardware or software, which
can complicate things.
10.Data Consistency:
Ensuring data is correct and up-to-date across the system.
Q-4. What is Code Migration? Explain reasons for code
migration.
➢ Traditionally, communication in distributed systems is concerned with
exchanging data between processes.
➢ Code migration in the broadest sense deals with moving programs between
machines, with the intention to have those programs be executed at the
target
➢ process migration in which an entire process is moved from one machine
to another
➢ Code migration is often used for load distribution, reducing network
bandwidth, dynamic customization, and mobile agents.
➢ Code migration increases scalability, improves performance, and provides
flexibility.
Operations :
There is a sequence of operations that are needed to b followed by users. These
operations are given below :
1.Establishing Connection – It generally requires a session connection to be
established just before any data is transported or sent with a direct physical
connection among sessions.
2.Transferring Data or Message – When this session connection is established,
then we transfer or send message or data.
3.Releasing the Connection – After sending or transferring data, we release
connection.
Different Ways :
There are two ways in which connection-oriented services can be done. These
ways are given below :
1.Circuit-Switched Connection –
Circuit-switching networks or connections are generally known as connection-
oriented networks. In this connection a dedicated route is being established
among sender and receiver and whole data or message is sent through it. A
dedicated physical route or a path or a circuit is established among all
communication nodes, and after that, data stream or message is sent or
transferred.
2.Virtual Circuit-Switched Connection –
Virtual Circuit-Switched Connection or Virtual Circuit Switching is also known
as Connection-Oriented Switching. In this connection, a preplanned route or path
is established before data or messages are transferred or sent. The message Is
transferred over this network is such a way that it seems to user that there is a
dedicated route or path from source or sender to destination or receiver.
Type of transparency
a. Access transparency: enables local and remote resources to be accessed using
identical operations.
b. Location transparency: enables resources to be accessed without knowledge
of their location.
c. Concurrency transparency: enables several processes to operate concurrently
using shared resources without interference between them.
d. Replication transparency: enables multiple instances of resources to be used
to increase reliability and performance without knowledge of the replicas by users
or application programmers. `
e. Failure transparency: enables the concealment of faults, allowing users and
application programs to complete their tasks despite the failure of hardware or
software components.
f. Mobility transparency: allows the movement of resources and clients within
asystem without affecting the operation of users or programs.
g. Performance transparency: allows the system to be reconfigures to
implement performance as loads vary.
h. Scaling transparency: allows the system and applications to expand in scale
without change to the system structure or the application algorithms.
i. Access and location transparency together provide network transparency
Q-7. Discuss flat and structured naming with example.
Flat Naming:
Flat names are simply random bit strings, which we refer to as unstructured
names.
Flat names do not contain any information about how to locate the access point
of the associated entity.
Structured Naming:
Structured names are composed of simple, human-readable names. Names are
arranged in a specific structure.
Example: www.dint.engg.cse.cee
1. Name Space:
o Name spaces for structured names can be represented as a labeled,
directed graph with two types of nodes:
▪ A leaf node represents a named entity and has the property
that it has no outgoing edges.
▪ A directory node has a number of outgoing edges, each
labeled with a name.
2. Name Resolution:
o Name resolution is the process of mapping an object's name to its
specific properties, such as its location.
o Example: The client first contacts its naming agent, which further
contacts other name agents until the object is found.
3. Domain Name Server (DNS):
o DNS provides directory services through DNS servers.
o DNS stands for Domain Name System or Domain Name Server.
o It is used to map IP addresses with domain names.
o Since remembering IP addresses is complex, DNS came into play.
Q-8. Explain LDAP in detail.
LDAP stands for Lightweight Directory Access Protocol. LDAP defines a
standard method for accessing and updating information in a directory. It has
gained wide acceptance as the directory access method of the Internet and is
therefore also becoming strategic within corporate intranets.
LDAP is based on X.500. It is a fast-growing technology for accessing common
directory information. Fig. 3.4.1 shows LDAP uses X.500.
Uses of Cryptography
Cryptography is widely used in a variety of applications to enhance security and
protect sensitive information. Here are some of its main uses:
1. Data Privacy: Protects sensitive information (such as personal data,
financial details, or classified information) by making it unreadable to
unauthorized parties. This is commonly used in messaging apps, emails,
and online banking.
2. Authentication: Verifies the identity of users, devices, and systems. For
example, digital signatures and certificates are cryptographic methods to
ensure that messages or documents come from legitimate sources.
3. Data Integrity: Ensures that data has not been altered during transmission
or storage. Cryptographic hashing algorithms, like SHA-256, create unique
fingerprints for data that make it possible to detect any tampering.
4. Secure Communication: Encrypts data transmitted over networks, such
as the Internet, to prevent eavesdropping or interception. SSL/TLS
protocols, which secure HTTPS websites, use cryptography to protect data
exchange.
5. Digital Signatures: Provide non-repudiation, meaning that the sender
cannot deny having sent a message. This is widely used in legal documents,
contracts, and transactions to verify authenticity and origin.
6. Cryptocurrencies: Cryptography is the backbone of blockchain
technology, which underlies cryptocurrencies like Bitcoin and Ethereum.
It secures transactions, controls the creation of new units, and verifies asset
transfers.
Approach:
At 3:00, the time daemon tells the other machines its time and asks for theirs.
They respond with how far ahead or behind the time daemon they are.
The time daemon computes the average and tells each machine how to adjust
its clock.
Q-11. Define virtualization. Explain architecture of virtual
machine.
Virtualization plays an important role and function in cloud computing. It helps
in reducing the space or costs associated with the investment.
This technology allows end users to run multiple desktop operating systems and
applications simultaneously on the same hardware and software.
Virtualization in cloud computing simplifies the creation of virtual machines and
makes it easier to run multiple machines.
It also helps create a virtual ecosystem of server operating systems, multiple
storage facilities, and multiple operating systems.
Cloud computing is an application or service associated with a virtual ecosystem.
Such ecosystems can be public or private.
Due to virtualization, the need for physical infrastructure can be reduced.
The terms cloud computing and virtualization are now used interchangeably and
are rapidly converging.
Virtualization Architecture is defined as a model that describes the concept of
virtualization. The use of virtualization is important in cloud computing. In cloud
computing, end users share data through an application called the cloud.
However, end users can share their entire IT infrastructure with virtualization
itself.
Architecture of the Virtualization
In the diagram above, virtualization includes virtual applications and virtual
infrastructure services.
• The virtual application services help in application management, and the
virtual infrastructure services can help in infrastructure management.
• Both services are integrated into the virtual data center or operating system.
Virtual services can be used on any platform and programming
environment. These services can be accessed from the local cloud or
external cloud. In return, cloud users must pay a monthly or annual fee to
the third party.
• This fee is paid to third parties for providing cloud services to end users,
who in turn provide applications in different forms according to the needs
of cloud end users.
• A hypervisor separates the operating system from the underlying hardware.
It allows the host computer to run multiple virtual machines simultaneously
and share the same computer resources.
1. Transparency:
• Make remote calls feel like local calls, hiding network
details from the programmer.
• Allow the client to connect to services without needing to
know their exact location.
• Handle network and server failures so the client isn’t
affected by them directly.
2. Performance:
• Latency: Minimize network delays to make remote calls as
fast as possible.
• Efficiency: Use methods to send and receive data quickly,
minimizing extra steps that slow things down.
• Concurrency: Allow the server to handle multiple calls at
once, so it can serve many clients efficiently.
3. Parameter Passing:
• Data Conversion (Marshalling): Convert data to a network-
friendly format before sending it and back when receiving
it.
• References: Since memory cannot be directly shared
between computers, RPC systems usually send copies of
data rather than direct references.
4. Communication Protocol:
• Choose a reliable method to send data over the network,
typically TCP, so messages don’t get lost.
• Have a system for managing requests and responses,
including retries if something goes wrong.
5. Error Handling:
• Handle network issues that can cause RPCs to fail by
retrying or notifying the client of failures.
• Manage server crashes and partial failures without
disrupting the whole system.
6. Security:
• Authentication: Verify who is requesting access to prevent
unauthorized use.
• Encryption: Secure data as it travels over the network to
keep it private.
• Authorization: Allow only specific users to access certain
functions.
7. Scalability:
• Load Balancing: Spread client requests across multiple
servers to handle large numbers of users.
• Stateless Design: Make it easier to scale by not storing data
between calls unless absolutely needed.
Q-14. Write a short note on digital signature.
ANS: The Digital Signature is a technique which is used to validate the
authenticity and integrity of the message.
• A digital signature uses a pair of asymmetric keys.
• A valid digital signature helps the receiver to know the message comes
from the authentic sender and is not altered in between.
• When a person creates a digital signature, two additional encrypted files
are created. These are the "private key" which stays with the signature
owner, and the "public key" which is sent along with the signed document
to let the recipient open it.
• To verify digital signatures, the recipient applies verification techniques to
a combination of the message and the signature to verify authenticity. So
here a copy of the signature is not stored anywhere.
Example:
• Maintaining versions of replicated files in the correct order everywhere.
• The write operations performed by a single process P at two different local
copies of the same data store.
• Resembles to PRAM, but here we are considering consistency only for a
single process (client) instead of for a collection of concurrent processes.
• Fig. 5.3.3 (a) shows monotonic-write consistent data store and a data store
that does not provide monotonic-write consistency.
Example 2:
• Maintaining versions of replicated files in the correct order everywhere.
Q-16.What is Replication? Write about motivations for replication.
Replication is the process of creating and maintaining multiple copies of the same
data or resources across different servers, databases or locations in a network.
In distributed computing and database systems, replication is used to ensure that
identical copies of data exist in multiple places, improving availability, reliability,
and performance.
Types of Firewalls
1. Packet-Filtering Firewall: Checks each packet individually, blocking or
allowing based on simple rules like IP addresses and port numbers.
2. Stateful Inspection Firewall: Tracks ongoing connections and only allows
data if it’s part of a recognized connection.
3. Proxy Firewall: Acts as a middleman, filtering data for specific
applications (like web traffic).
4. Next-Generation Firewall (NGFW): Combines traditional firewall
functions with advanced features like intrusion prevention, detecting and
blocking complex threats.
Benefits of Firewalls
• Protects the Network: Blocks unauthorized access and cyber threats.
• Controls Access: Allows or blocks specific data or users.
• Monitors Traffic: Logs network activity to detect suspicious behavior.
• This setup not only improves performance by enabling parallel access but
also simplifies data sharing and collaboration among users.
• By abstracting the complexities of the underlying hardware, a distributed
file system provides a seamless experience for file operations, making it
easier to manage large volumes of data in a scalable manner.
Features of DFS
1. Transparency:
o DFS provides a unified interface, so users can access files without
needing to know where the data is physically stored.
o Types of transparency include:
▪ Location Transparency: Users access files by name, not by
their physical location.
▪ Replication Transparency: Multiple copies of files can be
stored in different locations to improve access speed and
reliability.
▪ Failure Transparency: The system can handle hardware or
network failures without user interruption.
2. Scalability:
o DFS can scale to accommodate more data or additional servers as
storage needs grow.
o Adding more servers or storage devices allows DFS to manage and
distribute increased workloads.
3. Reliability and Fault Tolerance:
o DFS replicates files across multiple servers, meaning if one server
fails, the system can retrieve data from another location.
o This redundancy ensures that data is still accessible even in the case
of a hardware or network failure.
4. Concurrency Control:
o Multiple users can access and modify files simultaneously.
o DFS ensures consistency, using locking mechanisms and version
control to manage concurrent access and avoid data conflicts.
5. High Availability:
o Data is distributed across various servers, which helps provide
continuous access and reduces downtime.
o Replication and redundancy play a vital role in maintaining
availability.
Persistent Connection
1. Non-Pipelined Persistent Connection: In a Non-pipeline connection, we first
establish a connection that takes two RTTs then we send all the object’s
images/text files which take 1 RTT each (TCP for each object is not required).
2. Pipelined Persistent Connection: In Pipelined connection, 2RTT is for
connection establishment and then 1RTT(assuming no window limit) for all the
objects i.e. images/text.
Persistent Without Pipelining and with Pipelining