Cs3351 DC Ques Bank
Cs3351 DC Ques Bank
UNIT – I INTRODUCTION
Two Marks:
1. Why do we need a distributed Computing?
The Need of distributed Computing is:
Scalability: Distributed Computing systems are generally more scalable than centralized systems,
as they can easily add new devices or systems to the network to increase processing and storage capacity
Reliability: Distributed Computing systems are often more reliable than centralized systems, as they
can continue to operate even if one device or system fails.
Flexibility: Distributed Computing systems are generally more flexible than centralized systems, as they
can be configured and reconfigured more easily to meet changing Computing needs.
Economics: Collections of microprocessors offer a better price/performance ratio than large
mainframes.mainframes:10 times faster, 1000 times as expensive.
2. Define transparency. What are its types?
Transparency: The system should appear as a single unit and the interactions and complexity between the
components should be hidden from the end user.
Types: The various forms of transparency are
Transparency Description
Access Hide differences in data representation and how a resource is accessed.
Location Hide where a resource is located
Migration Hide that resource may move to another location
Relocation Hide that resource may be moved to another location while in use.
Replication Hide that a resource is replicated.
Concurrency Hide that a resource may be shared by several competitive users
Failure Hide the failure and recovery of a resource
4. What are the challenges faced in the designing of scalable distributed Computing systems?
The different challenges faced in the designing of scalable distributed Computing systems are:
Controlling the cost of physical resources.
Controlling the performance loss.
Preventing software resources running out.
Avoiding performance bottlenecks.
5. List the techniques for dealing with failures in distributed Computing systems.
The various techniques used for dealing with failures in distributed Computing systems are as follows:
• Detecting failures
• Masking failures
• Tolerating failures
• Recovery from failures
Redundancy
6. What is a distributed system?
A distributed system is one in which components located at networked computers
communicate and coordinate their actions only by passing messages. The
components interact with each other in order to achieve a common goal.
7. What do you mean by message passing?
Message passing is a fundamental mechanism for communication in distributed
systems. It enables processes or nodes to exchange messages and coordinate their
actions. There are several types of message-passing models, including
synchronous, asynchronous, and hybrid approaches.
10. Define Distributed Program?
A computer program that runs within a distributed system is called a distributed
program, and distributed programming is the process of writing such programs.
11. What do you mean by synchronous and asynchronous execution?
Asynchronous is a non-blocking architecture, so the execution of one task isn't
dependent on another. Tasks can run simultaneously. Synchronous is a blocking
architecture, so the execution of each operation depends on completing the one
before it. Each task requires an answer before moving on to the next iteration.
12. List out the features of distributed systems?
Performance. ...
Scalability. ...
High availability. ...
Data integrity. ...
High reliability. ...
Security. ...
User mobility.
13. Write down the principles of distributed systems?
Distributed file systems are an important part of any organization's data storage
and access needs. The design of the system should be based on the principles
of scalability, availability, reliability, performance, and security.
14. State the objectives of resource sharing model?
The primary objective of resource sharing is to maximize the resource base,i.e., collection, staff, infrastructure,
as well as services of the participating libraries. They would be benefited by the resources of other libraries
adding to their own resources.
15. What are the significant consequences of distributed systems?
The components of a distributed system interact with one another in order to achieve a common goal. Three
significant challenges of distributed systems are: maintaining concurrency of components, overcoming the lack
of a global clock, and managing the independent failure of components.
16. Differentiate between buffering and caching
Buffering is a process of temporarily holding data in memory or a buffer before writing it to a permanent storage
location. Caching is a process of temporarily storing data in memory for quick access or retrieval. Cache stores
copy of the data. Cache is in processor, and can be also implemented with ram and disk.
17. Differentiate between synchronous and asynchronous execution?
Synchronous code executes one line of code after the other, while asynchronous code allows multiple lines of code
to run at the same time.
Asynchronous code can be much more efficient than synchronous code for certain types of programs, but it is also
more complex and harder to debug.
18. What is the role of middleware in a distributed system?
Middleware is an intermediate layer of software that sits between the application and the network. It is used in
distributed systems to provide common services, such as authentication, authorization, compilation for best
performance on particular architectures, input/output translation, and error handling.
19. .Name some services and examples of middleware?
Common middleware examples include database middleware, application server middleware, message-oriented
middleware, web middleware, and transaction processing monitors.
20. Describe what is meant by a scalable system?
A system is scalable when it has the capacity to accommodate a greater amount of usage. Some systems aren't at all
scalable, and can only handle exactly the amount of usage they were designed for. Scalable systems can handle
extra usage, but their capacity varies.
21. What is replication transparency?
Replication transparency is the ability to create multiple copies of objects without any effect of the replication seen
by applications that use the objects. It should not be possible for an application to determine the number of replicas,
or to be able to see the identities of specific replica instances.
22. Define access transparency?
Access Transparency allows the same operations to be used to access local and remote resources.
23. What are the challenges of distributed systems?
The main challenges of distributed system are:
Heterogeneity
Openness
Security
Scalability
Failure handling
Concurrency
Transparency
Quality of service
Detailed Questions:
Two Marks:
1. What is message ordering communication?
In this type of communication multiple sender send message to a single receiver. A selective receiver specifies
unique sender from which the message transfer takes place.
5. Write short notes on clock drift rate and HTTP, FTP, Telnet, SMTP
Clock drift rate refers to the rate at which a computer clock deviates from a perfect reference clock
• HTTP: The Hypertext Transfer Protocol is used for communication between web browsers and web servers
• FTP: The File Transfer Protocol allows directories on a remote computer to be browsed and files to be
Transferred from one computer to another over a connection.
• Telnet: Telnet provides access by means of a terminal session to a remote computer.
SMTP: The Simple Mail Transfer Protocol is used to send mail between computers.
6. What are the issues in distributed system?
There is no global time in a distributed system, so the clocks on different computers do not necessarily give the
same time as one another. All communication between processes is achieved by means of messages. Message
communication over a computer network can be affected by delays, can suffer from a variety of failures and is
vulnerable to security attacks.
7. What is meant by group communication in distributed system?
Group Communication occurs when a single source process simultaneously attempts to communicate with
numerous functions. A group is an abstract collection of interrelated operations. This abstraction hides the message
passing such that the communication seems to be a standard procedure call.
8. What is meant by asynchronous programming?
Asynchronous programming provides opportunities for a program to continue running other code while waiting
for a long -running task to complete.
9. Write application of casual order?
The causal ordering of messages describes the causal relationship between a message send event and a message
receive event. For example, if send(M1) -> send(M2) then every recipient of both the messages M1 and M2 must
receive the message M1 before receiving the message M2.
10. What is synchronous order?
Synchronous execution means the first task in a program must finish processing before moving on to executing the
next task.
11. Define Scalar Time?
scalar time are independent (i.e., they are notcausally related), they can be ordered using any. arbitrary criterion
without violating the causality. relation . Therefore, a total order is consistent with the. causality relation .
12. What is clock shew?
Clock skew (sometimes called timing skew) is a phenomenon in synchronous digital circuit systems (such as
computer systems) in which the same sourced clock signal arrives at different components at different times due to
gate or, in more advanced semiconductor technology, wire signal propagation delay.
13. What is clock drift rate?
Clock Drift: As mentioned, no two clocks would have the same clock rate of oscillations i.e; clock rate would be
different. The difference of clock rate is called clock drift.
14. What is clock tick?
Clock Tick: after a predefined number of oscillations, the timer will generate a clock tick. This clock tick generates
a hardware interrupt that causes the computer's operating system to enter a special routine in which it can update
the software clock and run the process scheduler.
15. What is logical Clock?
Logical Clocks refer to implementing a protocol on all machines within your distributed system, so that the
machines are able to maintain consistent ordering of events within some virtual timespan. A logical clock is a
mechanism for capturing chronological and causal relationships in a distributed system.
16. What is global state of the distributed system?
The global state of a distributed system is the set of local states of each individual processes involved in the system
plus the state of the communication channels. Determinism. Deterministic Computation.
17. Write the happen before relation?
Happened before relation is an irreflexive partial ordering on the set of all events happening in the system i.e.;
(a⇢ a) is not true for any event a.
This relates back to Einstein’s general theory of relativity where events are ordered in terms of messages that
could possibly be sent.
18. What is vector clock?
Vector Clock is an algorithm that generates partial ordering of events and detects causality violations in a
distributed system.
19. What is chandy lamport algorithm?
Chandy and Lamport were the first to propose a algorithm to capture consistent global state of a distributed system.
The main idea behind proposed algorithm is that if we know that all message that have been sent by one process
have been received by another then we can record the global state of the system.
20. write causal order application?
Causal ordering is used for implementing distributed shared memory, fair resource allocation. Other application are
updating replicated data, synchronizing multimedia streams and allocating requests in a fair manner.
Detailed Questions:
1. Describe briefly about Physical clock synchronization. Pg.no:2.12
2. Explain in detail about asynchronous execution with synchronous communications? Pg.no:2.21
3. Give notes on synchronous program order on an asynchronous system. Pg.no:2.23
4. Write a brief note on Global state and snapshot recording algorithms. Pg.no:2.30
5. write a brief note on group communication? Pg.no:2.24
6. Explain about Chandy Lamport Snapshot algorithms for FIFO channels Pg.no:2.32
7. Elucidate on the total and casual order in distributed system with a neat diagram Pg.no:2.28
8. Explain about Message ordering paradigms Pg.no:2.20
9. write a note on scalar time and vector time? Pg.no:2.19
UNIT – 3 DISTRIBUTED MUTEX AND DEADLOCK
PART -A
1. What is clock synchronization?
Nodes in distributed system to keep track of current time for various purposes such as calculating the time
spent by a process in CPU utilization ,disk I/O etc so that the corresponding user can be charged. Clock
synchronization means the time difference between two nodes should be very small.
2. Explain the term mutual exclusion
A program object that blocks multiple users from accessing the same shared variable or data at the same
time. With a critical section, a region of code in which multiple processes or threads access the same shared
resource, this idea is put to use in concurrent programming.
3. What is deadlock?
A Deadlock is a situation where a set of processes are blocked because each process is holding a resource
and waiting for another resource occupied by some other process. When this situation arises, it is known as
Deadlock. Deadlock.
4. Name the two types of messages used in Ricart-Agrawala's algorithm
The algorithm uses two types of messages: REQUEST and REPLY. A process sends a REQUEST
message to all other processes to request their permission to enter the critical section. A process sends a
REPLY message to a process to give its permission to that process.
5. What are the conditions for deadlock?
The four necessary conditions for a deadlock situation are mutual exclusion, no preemption, hold and wait,
and circular set. There are four methods of handling deadlocks - deadlock avoidance, deadlock prevention,
deadline detection and recovery, and deadlock ignorance.
6. Which are the three basic approaches for implementing distributed mutual exclusion?
Token-based approach
. Non-token-based approach
. Quorum-based approach.
7. What are the requirements of mutual exclusion algorithms?
No Deadlock: Two or more site should not endlessly wait for any message that will never arrive.
No Starvation: Every site who wants to execute critical section should get an opportunity to execute it in
finite time.
8. What is response time?
Response time includes the time taken to transmit the inquiry, process it by the computer, and transmit the
response back to the terminal.
9. What is wait for graph?
A wait-for graph in computer science is a directed graph used for deadlock detection in operating systems
and relational database systems.
10. What do you mean by deadlock avoidance?
Deadlock avoidance is another technique used in operating systems to deal with deadlocks. Unlike
deadlock prevention, which aims to eliminate the possibility of deadlocks, deadlock avoidance focuses on
dynamically detecting and avoiding situations that could lead to deadlocks.
11. Define deadlock detection in distributed system?
Deadlock detection involves two basic tasks: maintenance of the state graph and search of the state graph
for the presence of cycles. Because in distributed systems a cycle may involve several sites, the search for
cycles greatly depends on how the system state graph is represented across the system.
12. How is distributed dead lock detected?
In a distributed system involving multiple servers being accessed by multiple transactions, a global wait-
for-graph has to be constructed. If and only if there is a cycle in the wait-for-graph a distributed deadlock is
said to be detected. Hence Detection of a distributed deadlock requires a cycle to be found in the global
transaction wait-for graph that is distributed among the servers that were involved in the transactions.
13. What is a phantom deadlock?
A deadlock that is ‘detected’ but is not really a deadlock is called a phantom deadlock. In distributed
system if there is a deadlock, the necessary information will eventually be collected in one place and a cycle
will be detected. As this procedure will take some time, there is a chance that one of the transactions that holds
a lock will meanwhile have released it, in which case the deadlock will no longer exist. This is a sample case
for phantom deadlocks.
14. What is wait-for-graph?
A wait-for graph can be used to represent the waiting relationships between current transactions. In a wait-
for graph the nodes represent transactions and the edges represent waitfor relationships between transactions.
Following figure represents a wait-for-graph with transactions T and U.
15. Define Edge chasing
A distributed approach to deadlock detection uses a technique called edge chasing or path pushing. In this
approach, the global wait-for graph is not constructed, but each of the servers involved has knowledge about
some of its edges. The servers attempt to find cycles by forwarding messages called probes, which follow the
edges of the graph throughout the distributed system
16. What is the role of replication in distributed systems?
Replication is defined as the maintenance of copies of data at multiple computers. It is a key to the
effectiveness of distributed systems in that it can provide enhanced performance, high availability and fault
tolerance.
PART -B
6. Define recovery.
Recovery refers to restoring a system to its normal operational state. O failure has occurred, it is essential that the
process where the failure happen recover to a correct state. Fundamental to faulttolerance is the recovery from an
error.
12. Define fault and failure. What are different approaches to fault-tolerance ?
Fault: Anomalous physical condition, e.g. design errors, manufacturing problems, damage, external
disturbances Failure of a system occurs when the system does not perform its service in the manner specified.
8. List the situations where PaaS may not be the best option?
Integration with on-premise application
Flexibility at the platform level
Customization at the infrastructure level
Frequent application migration
9 .What is Amazon EC2 ?
Amazon Elastic Compute Cloud (Amazon EC2) is a web service that provides resizable compute capacity
in the cloud. It is designed to make web- scale computing easier for developers and system administrators.