DC SEM8 Com BH Sample Notes
DC SEM8 Com BH Sample Notes
BrainheatersTM
pp
A
s
er
Bh.Notes: DC
at
Computer Semester 8
he
in
pp
access remote resources and to share them with others in a
controlled way.
● It is cheaper to let a printer be shared by several users than buying
A
and maintaining printers for each user.
● Collaborating and exchanging information can be made easier by
connecting users and resources.
s
2. Transparency:
●
er
It is important for a distributed system to hide the location of its
process and resource. A distributed system that can portray itself
at
as a single system is said to be transparent.
● The various transparencies need to be considered are access,
he
pp
Features/Characteristics of Distributed System
The features are as follows:
1. Resource Sharing
A
● The main important feature of this system is that it allows users to
share resources.
s
● Moreover, they can share resources in a secure and controlled
manner.
●
er
Resources can be of any type. For example, some common
resources which are shared can be printers, files, data, storage, web
at
pages, etc.
2. Openness
he
● This means that the services which the system provides are openly
displayed through interfaces.
Moreover, these interfaces provide only the syntax of the services.
in
●
● For example, the type of functions, their return types, parameters,
etc. These interfaces use Interface Definition Languages (IDL).
ra
3. Concurrency
● It means that several tasks take place at different nodes of the
B
system simultaneously.
● Moreover, these tasks can also interact with each other. It results in
increasing the efficiency of the system.
4. Scalability
pp
6. Transparency
● It is the most important feature of the system. The main goal of a
distributed OS is to hide the fact that the resources are being
A
shared.
● Furthermore, transparency means that the user should not know
s
that the resources he is using are shared.
● Moreover, for the user, the system should be a separate individual
unit.
er
at
Q2. What is the role of Middleware in a Distributed System and mention
he
Middleware usually resides between the operating system and the end
user or end-user application. It provides essential features that the
ra
operating system doesn't offer. The term usually refers to large software
products, such as database managers, transaction monitors, and web
B
servers.
s
components can create connection pools to provide fast and
er
efficient access to popular backend databases.
● Second, middleware software can implement logic based on client
at
requirements. For example, the middleware component can detect
that the language header of the client browser making a particular
he
pp
computer program causes a procedure or subroutine to execute in
a different address space, which is coded as a normal procedure
call without the programmer specifically coding the details for the
A
remote interaction.
● This procedure call also manages low-level transport protocols,
such as User Datagram Protocol, Transmission Control
s
Protocol/Internet Protocol etc. It is used for carrying the message
data between programs.
er
at
he
in
ra
B
pp
Following steps take place during the RPC process:
1. Step 1) The client, the client stub, and one instance of RPC runtime
execute on the client machine.
A
2. Step 2) A client starts a client stub process by passing parameters
in the usual way. The client stub stores within the client’s own
s
address space. It also asks the local RPC Runtime to send back to
the server stub.
3.
er
Step 3) In this stage, RPC is accessed by the user by making regular
Local Procedural Cal. RPC Runtime manages the transmission of
at
messages between the network across client and server. It also
performs the job of retransmission, acknowledgment, routing, and
he
encryption.
4. Step 4) After completing the server procedure, it returns to the
server stub, which packs (marshalls) the return values into a
in
5. Step 5) In this step, the transport layer sends back the result
message to the client transport layer, which returns a message to
B
pp
● It provides a server for clients to use.
● Due to the callback mechanism, the client process is delayed.
● Deadlocks need to be managed in callbacks.
A
● It promotes a Peer-to-Peer (P2P) paradigm among the
processes involved.
s
RPC for Broadcast: A client’s request that is broadcast all through the
network and handled by all servers that possess the method for handling
er
that request is known as a broadcast RPC. Broadcast RPC’s features
include:
at
● You have an option of selecting whether or not the client’s
request message ought to be broadcast.
he
pp
UDP (user datagram protocol) TCP (transmission contact
uses manage oriented protocol) uses stream oriented
communication communication
A
Data is sent by application in Data is sent with no particular
discrete packages called structure.
s
messages. er
Communication is connection Communication is oriented,
at
less, data is sent without any connection established before
setup. comm.
he
pp
Q5. Explain Rica-Agarwala’s non-token based algorithm.(P4 -
Appeared 1 Time) (5-10 Marks)
A
Ans: Ricart–Agrawala algorithm is an algorithm for mutual exclusion in a
distributed system proposed by Glenn Ricart and Ashok Agrawala. This
s
algorithm is an extension and optimization of Lamport’s Distributed Mutual
er
Exclusion Algorithm. Like Lamport’s Algorithm, it also follows a permission
based approach to ensure mutual exclusion.
at
In this algorithm:
● Two types of messages ( REQUEST and REPLY) are used and
he
pp
■ In case Site Sj is requesting, the timestamp of Site Si‘s
request is smaller than its own request.
Otherwise the request is deferred by site Sj.
A
● To execute the critical section:
○ Site Si enters the critical section if it has received the REPLY
s
message from all other sites.
● To release the critical section:
○
er
Upon exiting the site Si sends a REPLY message to all the
deferred requests.
at
Message Complexity:
Ricart–Agrawala algorithm requires invocation of 2(N – 1) messages per
he
●
Drawbacks of Ricart–Agrawala algorithm:
● Unreliable approach: failure of any one of the nodes in the system
ra
can halt the progress of the system. In this situation, the process will
starve forever.
B
pp
nToken: (a) Queue of request sites (b) Array LN[1..N], the sequence number
of the most recent execution by a site j.
Token holder sends token to requestor, if it is not inside CS. Otherwise, send
A
after exiting CS.
Token holders can make multiple CS accesses.
s
Design issues:
a).Distinguishing outdated REQUEST messages from current REQUEST
messages
er
b) Determining which site has an outstanding request for the CS.
at
Algorithm
Requesting the critical section
he
If the requesting site 5i does not have the token, then it increments its
sequence number, RNi[i], and sends a
REQUEST(i, sn) message to all other sites. (sn is the updated value of RNdi].)
in
section. Having finished the execution of the CS, site 5 i takes the following
actions:
It sets the LN[i] element of the token array equal to RNdi].
For every site 5 j whose 10 is not in the token queue, it appends its 10 to the
token queue if RNi [j]=LN[j]+1.
S1 10,15,9 10,15,8 3
pp
S2 10,16,9
A
S3 10,15,9
s
Site Seq.,Vector RN
er
Token Vect. LN Token Queue
S1 10,16,9
at
S2 10,16,9
he
S3 10,16,9 10,15,9 2
S1 10,16,9
B
S3 10,16,9
pp
A
s
er
at
he
migration.
Methods of Process Migration
ra
pp
This facility permits the migration process to be done faster and
relocate more types of processes.
A
Q8. Explain Fault Tolerance Mechanism. (P4 - Appeared 1 Time) (5-10
Marks)
s
Ans: Fault Tolerance simply means a system’s ability to continue operating
er
uninterrupted despite the failure of one or more of its components. This is
true whether it is a computer system, a cloud cluster, a network, or
at
something else. In other words, fault tolerance refers to how an operating
system (OS) responds to and allows for software or hardware malfunctions
he
and failures.
● An OS’s ability to recover and tolerate faults without failing can be
handled by hardware, software, or a combined solution leveraging
in
s
example. er
● A step up: during a system failure, the ability to use a backup
system immediately.
at
● Enhanced fault tolerance: a disk fails, and mirrored disks take over
for it immediately. This provides functionality despite partial system
he
pp
● Software systems backed up by other instances of software. For
example, if you replicate your customer database continuously,
operations in the primary database can be automatically
A
redirected to the second database if the first goes down.
● Redundant power sources can help avoid a system fault if
s
alternative sources can take over automatically during power
failures, ensuring no loss of service.
er
Q9. more questions are available in Brainheaters app….
at
.
he
.
in
ra
B
A
Brainheaters App
s
er
at