Uploaded by theskyspace.finance

dc ans

advertisement
Write types of process scheduling techniques of distributed system
What is the difference between Load Balancing and Load sharing
What are the main assumptions in task assignment work
Describe Strict data consistency model.
A strict data consistency model is a distributed systems model that
guarantees that all users will always see the most recent data. In a strict
consistency model, all writes to a data item are immediately visible to all
other users, regardless of where they are located in the network. This
means that there is no possibility of data loss or corruption, and all users
will always have the same view of the data.
Strict consistency is the strongest consistency model, but it is also the
most difficult to achieve. In order to implement strict consistency, a
distributed system must be able to guarantee that all writes are atomic,
meaning that they are either all successful or all fail. This can be difficult
to achieve in a distributed system, where there is always the possibility
of network failures or node outages.
There are a number of different ways to implement strict consistency in
a distributed system. One common approach is to use a replicated state
machine. In a replicated state machine, all writes are applied to all
replicas of the data, and all replicas are kept in sync. This ensures that
all users will always see the same data, even if one or more replicas fail.
What is the Release Data-Centric Consistency Model of a distributed system?
What are the types of replicas in the Distributed System?
What are the types of failures?
1. System failure
The primary reason for a system failure is a software or hardware failure.
It is a suitable assumption that a system failure always results in the loss of
the contents of the primary memory, while the secondary storage remains
safe. Whenever there is a system failure, the processor fails to perform the
execution. During a system failure, the system may reboot or freeze.
2. Communication medium failure
The main reason for a communication medium failure is the failure of
the communication link or the shifting of nodes. A possible scenario can be
a website within a network that is trying to communicate with another
operational website within the network, but is unable to establish the
connection.
3. Secondary storage failure
If the information stored on the secondary storage device is inaccessible, it
is called a secondary storage failure. Secondary storage failure can be
caused by several reasons. Some of the common reasons are listed as
follows:
•
•
•
Node crash
Dirt on the medium
Parity error
4. Method failure
A method failure most often halts the distributed system. Moreover, it
makes the system result in incorrect execution, or unable to perform any
execution at all. A system may enter a deadlock state or do protection
violations during a method failure.
What is Backward and forward recovery in a distributed system?
1. Backward Recovery:
Moving the system from its current state back into a formerly accurate
condition from an incorrect one is the main challenge in backward recovery.
It will be required to accomplish this by periodically recording the system’s
state and restoring it when something goes wrong. A checkpoint is deemed to
have been reached each time (part of) the system’s current state is noted.
2. Forward Recovery:
Instead of returning the system to a previous, checkpointed state in this
instance when it has entered an incorrect state, an effort is made to place the
system in a correct new state from which it can continue to operate. The
fundamental issue with forward error recovery techniques is that potential
errors must be anticipated in advance. Only then is it feasible to change those
mistakes and transfer to a new state.
What is file replication? Write advantages of file replication.
What is Read -Any-Write- All Protocol of file replication?
Read-Any: Any replica can handle read requests from clients. This means that
clients can read data from any available replica without needing to contact a
specific one. This improves read performance and availability since multiple
replicas can serve read requests simultaneously.
Write-All: When a write operation occurs, the data is written to all replicas
before the write operation is considered successful. This ensures that all
replicas have consistent data and prevents data divergence or inconsistencies
across replicas.
What is file cashing? Write conceivable locations of cashing files.
Here are some conceivable locations for caching files:
**Client-Side Caching:**
This involves caching files on the user’s device (computer, phone, etc.). This is
beneficial for frequently accessed files as subsequent accesses can be much
faster by retrieving them from the local cache instead of the remote server.
Web browsers and mobile apps often employ client-side caching. *
**Server-Side Caching:**
In this approach, frequently accessed files are cached on the server itself. This
can reduce load on the main storage system and improve response times for
clients requesting those files. Web servers and content delivery networks
(CDNs) frequently use server-side caching strategies. *
**Network Caching:**
Caching can be implemented within the network infrastructure, such as
routers or dedicated caching appliances. This can be particularly beneficial for
geographically distributed networks where accessing files from remote
locations can be slow. Network caching helps by storing copies of frequently
accessed files closer to users, reducing latency.
What are models of the File system?
5 marks
What are the issues in designing Load-balancing algorithms?
Explain different mechanisms for address space transfer in process migration.
What are the desirable features of a scheduling algorithm?
Explain sender-initiated load sharing algorithm.
What is a monotonic read Client Centric Consistency model? Explain with an
example?
Describe two phase commit protocol.
Two-Phase Commit Protocol: This protocol is designed with the core intent to
resolve the above problems, Consider we have multiple distributed databases
which are operated from different servers(sites) let’s say S1, S2, S3, ….Sn.
Where every Si made to maintains a separate log record of all corresponding
activities and the transition T has also been divided into the subtransactions T1,
T2, T3, …., Tn and each Ti are assigned to Si. This all maintains by a separate
transaction manager at each Si. We assigned anyone site as a Coordinator.
Some points to be considered regarding this protocol:
a) In a two-phase commit, we assume that each site logs actions at that site,
but there is no global log.
b) The coordinator(Ci), plays a vital role in doing confirmation whether the
distributed transaction would abort or commit.
c) In this protocol messages are made to send between the coordinator(Ci) and
the other sites. As each message is sent, its logs are noted at each sending site,
to aid in recovery should it be necessary.
The two phases of this protocol are as follow:
Phase-1st–
a) Firstly, the coordinator(Ci) places a log record <Prepare T> on the log record
at its site.
b) Then, the coordinator(Ci) sends a Prepare T message to all the sites where
the transaction(T) executed.
c) Transaction manager at each site on receiving this message Prepare T
decides whether to commit or abort its component(portion) of T. The site can
delay if the component has not yet completed its activity, but must eventually
send a response.
d) If the site doesn’t want to commit, so it must write on log record <no T>, and
local Transaction manager sends a message abort T to Ci.
e) If the site wants to commit, it must write on log record <ready T>, and local
Transaction manager sends a message ready T to Ci. Once the ready T message
at Ci is sent nothing can prevent it to commit its portion of transaction T except
Coordinator(Ci).
Phase- 2nd–
The Second phase started as the response abort T or commit T receives by the
coordinator(Ci) from all the sites that are collaboratively executing the
transaction T. However, it is possible that some site fails to respond; it may be
down, or it has been disconnected by the network. In that case, after a
suitable timeout period will be given, after that time it will treat the site as if it
had sent abort T. The fate of the transaction depends upon the following
points:
a) If the coordinator receives ready T from all the participating sites of T, then
it decides to commit T. Then, the coordinator writes on its site log record
<Commit T> and sends a message commit T to all the sites involved in T.
b) If a site receives a commit T message, it commits the component of T at that
site, and write it in log records <Commit T>.
c) If a site receives the message abort T, it aborts T and writes the log record
<Abort T>.
d) However, if the coordinator has received abort T from one or more sites, it
logs <Abort T> at its site and then sends abort T messages to all sites involved
in transaction T.
what are the desirable features of a good distributed file system?
What is DSM? What are the design issues in DSM?
Distributed Shared Memory (DSM) is a model that manages memory across
multiple nodes in a distributed system without physically shared memory. DSM
provides a virtual address area that is shared between any or all nodes, which
helps to reduce communication costs in distributed systems. Programs that use
DSM are sometimes shorter and easier to understand than programs that use
message passing.
Desing issues
1. Granularity: Granularity refers to the block size of a DSM system. Granularity
refers to the unit of sharing and the unit of data moving across the network
when a network block shortcoming then we can utilize the estimation of the
block size as words/phrases. The block size might be different for the various
networks.
2.Structure of shared memory space: Structure refers to the design of the
shared data in the memory. The structure of the shared memory space of a
DSM system is regularly dependent on the sort of applications that the DSM
system is intended to support.
3. Memory coherence and access synchronization: In the DSM system the
shared data things ought to be accessible by different nodes simultaneously in
the network. The fundamental issue in this system is data irregularity. The data
irregularity might be raised by the synchronous access. To solve this problem in
the DSM system we need to utilize some synchronization primitives,
semaphores, event count, and so on.
4. Data location and access: To share the data in the DSM system it ought to be
possible to locate and retrieve the data as accessed by clients or processors.
Therefore the DSM system must implement some form of data block finding
system to serve network data to meet the requirement of the memory
coherence semantics being utilized.
5. Replacement strategy: In the local memory of the node is full, a cache miss
at the node implies not just a get of the gotten to information block from a
remote node but also a replacement. A data block of the local memory should
be replaced by the new data block. Accordingly, a position substitution
methodology is additionally vital in the design of a DSM system.
6. Thrashing: In a DSM system data blocks move between nodes on demand. In
this way on the off chance that 2 nodes compete for write access to the single
data item. The data relating data block might be moved to back and forth at
such a high rate that no genuine work can get gone. The DSM system should
utilize an approach to keep away from a situation generally known as thrashing.
7. Heterogeneity: The DSM system worked for homogeneous systems and need
not address the heterogeneity issue. In any case, assuming the underlined
system environment is heterogeneous, the DSM system should be designed to
deal with heterogeneous, so it works appropriately with machines having
different architectures.
Download