Questions tagged [clocks]

49 questions
81
votes
3 answers

How do computers keep track of time?

How are computers able to tell the correct time and date every time? Whenever I close the computer (shut it down) all connections and processes inside stop. How is it that when I open the computer again it tells the exact correct time? Does the…
Soham
  • 947
  • 1
  • 7
  • 8
41
votes
6 answers

Clock synchronization in a network with asymmetric delays

Assume a computer has a precise clock which is not initialized. That is, the time on the computer's clock is the real time plus some constant offset. The computer has a network connection and we want to use that connection to determine the constant…
33
votes
2 answers

What are system clock and CPU clock; and what are their functions?

While reading a book, I came across a paragraph given below: In order to synchronize all of a computer’s operations, a system clock—a small quartz crystal located on the motherboard—is used. The system clock sends out a signal on a regular basis…
swdeveloper
  • 641
  • 2
  • 11
  • 17
18
votes
4 answers

What is a CPU clock physically?

I can't seem to get a straight answer as to what a CPU clock is. I know there are quartz crystal clocks that work by the bending of quartz that happens as an electrical current is passed through it. Do modern CPUs also use a crystal with the same…
Ryan Folks
  • 191
  • 1
  • 1
  • 5
15
votes
1 answer

All soldiers should shoot at the same time

When I was a student, I saw a problem in a digital systems/logic design textbook, about N soldiers standing in a row, and want to shoot at the same time. A more difficult version of the problem was that the soldiers stand in a general network…
Erel Segal-Halevi
  • 6,088
  • 1
  • 25
  • 60
11
votes
3 answers

Happened-before and Causal order

I'm reading Lamport's "Time, Clocks, and the Ordering of Events in a Distributed System" and there's a detail that's bugging me. Lamport defines the "happened before" partial order, which I understand. Then he says that "Another way of viewing the…
Nemo
  • 365
  • 2
  • 8
10
votes
4 answers

Exactly how many clocks does a Computer consists of and how do they synchronize with each other?

I am currently trying to understand how Computers are arranged and organized internally (so that I can learn Assembly Language) through an online book called The Art of Assembly by Randall Hyde. Irrespective of whether or not I'll learn Assembly,…
radiantshaw
  • 201
  • 2
  • 4
8
votes
1 answer

Vector clocks: Why is it necessary to increment my clock on receiving a message?

Assume I have a distributed system of entities, each with a replica of the same data object that can be modified by broadcasting the changes and I'm using vector clocks to know how to order changes. In this scenario, Why would I need to increment my…
Marcel Klehr
  • 229
  • 1
  • 4
7
votes
1 answer

How are lamport timestamps useful in practice?

I am reading Lamport's paper titled Time, clocks, and the ordering of events in a distributed system I understand what's in there more or less, but I am confused whether Lamport timestamps on their own are useful in practice since just by looking at…
7
votes
1 answer

Visualization of Lamport's three-dimensional "space-time diagram" with introduced "tick lines"

In the third page (the third paragraph in the right column) of the paper "Time, Clocks, and the Ordering of Events in a Distributed System" by Leslie Lamport, it says that The reader may find it helpful to visualize a two-dimensional spatial…
hengxin
  • 9,671
  • 3
  • 37
  • 75
6
votes
0 answers

What is 2g-precedence?

I am currently reading a couple of papers about event processing. In the context of ordering events, "2g-precedence" is frequently mentioned. I don't know what it is, and I cannot find much information about it. In this paper I was able to find a…
user39853
6
votes
1 answer

Lamport Timestamps: When to Update Counters

In the timepiece (excuse the pun) that is Time, Clocks and the Ordering of Events, Lamport describes the logical clock algorithm as the following: Each process $Pi$ increments $Ci$ between any two successive events. If event a is the sending of a…
George Robinson
  • 353
  • 4
  • 9
5
votes
1 answer

Lamport logical clock: what does partial mean in the concept of `Partial ordering`?

In lamport's paper[1], he define two concept The partial ordering and The totally ordering. What does partial mean in partial ordering? assumption: this ordering only handle two cases, one is to order events happening in single process, second is…
4
votes
3 answers

How is clock syncing implemented?

I'm looking for an explanation or reference on the implementation of computer clock. To keep the question at the level of logical abstractions: say, we put together some combinational and sequential logic from basic gates. The role of the clock (an…
4
votes
3 answers

Is there a way to compute time without system clock

I was thinking about any method where we can use RAM I/O speed, to calculate time, let's say for example: RAM transfer rate is 1000 MB/s, so when it's half full (about 500 M Bytes written), by dividing 500 by 1000 we get the time which is epoch +…
1
2 3 4