Assignment I - 875
Assignment I - 875
Type of
Individual Marks 10
Assignment
Date of
15/9/2022 Deadline 18/01/2023
Announcement
2. Source can be searched in internet but strictly avoid copying from friends.
3. Questions are from Chapter 1, 2 and 3. Each question carries TWO marks.
Questions:
the system as a single coherent system. The key characteristics of a distributed system
are as follows:
worksimultaneously, which makes it possible for the system to process multiple requests
simultaneously.
No global clock: There is no global clock in a distributed system, which means that the
which means that the failure of one component does not necessarily lead to the failure of
Transparency: The users of a distributed system should be unaware of the location and
cluster computing
Cluster computing systems became popular when the price/performance ratio of personal
cluster computing is used for parallel programming in which a single (compute intensive)
•Cluster computing is mainly used to increase the performance and availability of a single
system, while Grid computing is mainly used to solve large-scale computational problems
Grid computing:
• often constructed as a federation of computer systems, where each system may fall
under a different administrative domain, and may be very different when it comes to
• Grid computing, on the other hand, is a type of distributed computing in which a group of
computers work together to solve a single problem or perform a single task. The
computers in a grid may be located in different locations and may be connected by a wide
area network (WAN). The main goal of grid computing is to utilize the spare processing
sequence, and local data. The chief characteristics of a monitor are the following:
1.The local data variables are accessible only by the monitor’s procedures and not by any
external procedure.
3. Only one process may be executing in the monitor at a time;any other processes that
have invoked the monitor are blocked, waiting for the monitor to become available. A
monitor supports synchronization by the use of condition variables that are contained
within the monitor. Condition variables are a special data type in monitors, which are
cwait on the same condition. If there are several such processes,choose one of them; if
there is no such process, do nothing. The monitor includes two condition variables
(declared with the construct cond ): notfull is true when there is room to add at least one
character to the buffer, and notempty is true when there is at least one character in the
buffer.
4. What is clock synchronization? Synchronize the network given below when the
Server
2:35
a-The Server asks all the other machines for their clock values and send his current time
to all clients:
2:35
2:00
2:20
1:55
b-The Client answer and The clients, client1, client2, and client3, compare the server's time
with their own time and calculate the time offset. Client1's time offset is 35 seconds,
client2's time offset is 15 seconds, and client3's time offset is 40 seconds. The clients then
C-The server calculates the average time offset of all clients and applies it to its own
clock.The server sends the new corrected time to all clients. Clients update their clocks
Server
2:45
system. It is a vector of logical clocks, one for each process in the system. Each process
maintains its own logical clock and increments it each time it performs an event. A vector
clock is represented as a vector of integers where the i-th entry of the vector represents the
logical clock of the i-th process. The vector clock is updated with each event that occurs,
and it is sent with each message that is sent between processes. For example, let's say
there are three processes in a distributed system: A, B, and C. Each process maintains a
logical clock that starts at 0. Process A sends a message to process B. The vector clock
for process A is [1, 0, 0] and it is sent with the message.Process B receives the message
and updates its vector clock to [1, 1, 0]. It then sends a message to process C. The vector
clock for process B is [1, 1, 0] and it is sent with the message.Process C receives the
message and updates its vector clock to [1, 1, 1]. Now, Process A sends another message
to Process C. The vector clock for process A is [2, 1, 1].Process C receives the message
and updates its vector clock to [2, 1, 2]. In this example, the final vector clocks of all
processes are [2, 1, 2], [1, 1, 0], [2,1,2] respectively. From the vector clock, it can be seen
that the first message sent by process A caused the event at process B, and the second
message sent by process A caused the event at process C.Vector clocks are used for
system.