Department of Artificial Intelligence & Data Science
Department of Artificial Intelligence & Data Science
OUTCOMES:
Upon the completion of this course, the student will be able to
CO1: Explain the foundations of distributed systems (K2)
CO2: Solve synchronization and state consistency problems (K3)
CO3 Use resource sharing techniques in distributed systems (K3)
CO4: Apply working model of consensus and reliability of distributed systems (K3)
CO5: Explain the fundamentals of cloud computing (K2)
LOGICAL TIME
Motivation:
In centralized systems, there is only single clock. A process gets the time by simply
issuing a system call to the kernel.
In distributed systems, there is no global clock or common memory. Each processor
has its own internal clock and its own notion of time.
These clocks can easily drift seconds per day, accumulating significant errors over
time.
Also, because different clocks tick at different rates, they may not remain always
synchronized although they might be synchronized when they start.
Motivation:
For most applications and algorithms that run in a distributed system, we need to know
time in one or more of the following contexts:
◮ The time of the day at which an event happened on a specific machine in the
network.
◮ The time interval between two events that happened on different machines in the
network.
◮ The relative ordering of events that happened on different machines in the
network.
Unless the clocks in each machine have a common notion of time, time-based queries
cannot be answered.
Clock synchronization has a significant effect on many problems like secure systems,
fault diagnosis and recovery, scheduled operations, database systems, and real-world
clock values.
PHYSICAL CLOCK SYNCHRONIZATION: NTP
Due to different clocks rates, the clocks at various sites may diverge
with time and periodically a clock synchronization must be performed to
correct this clock skew in distributed systems.
Clocks that must not only be synchronized with each other but also
have to adhere to physical time are termed physical clocks.
PHYSICAL CLOCK SYNCHRONIZATION: NTP
PHYSICAL CLOCK SYNCHRONIZATION: NTP
Network Time Protocol (NTP) is a protocol that helps the computers clock times to
be synchronized in a network. This protocol is an application protocol that is responsible
for the synchronization of hosts on a TCP/IP network.
NTP servers have access to highly precise and atomic clocks GPU clocks.
NTP uses a hierarchical system of time resources and provides synchronization within the stratum
servers.
First, at the topmost level, there is highly accurate time resources’ ex. atomic or GPS clocks. These
clock resources are called stratum 0 servers, and they are linked to the below NTP server called
Stratum 1,2 or 3 and so on.
These servers then provide the accurate date and time so that communicating hosts are synced to
each other.
PHYSICAL CLOCK SYNCHRONIZATION: NTP
PHYSICAL CLOCK SYNCHRONIZATION: NTP