Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more

Questions tagged [clocks]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
80 votes
3 answers
51k views

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 ...
Soham's user avatar
  • 937
41 votes
6 answers
10k views

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 ...
Gilles 'SO- stop being evil''s user avatar
33 votes
2 answers
95k views

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 ...
swdeveloper's user avatar
16 votes
4 answers
14k views

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. ...
Ryan Folks's user avatar
15 votes
1 answer
883 views

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 ...
Erel Segal-Halevi's user avatar
10 votes
3 answers
3k views

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 ...
Nemo's user avatar
  • 355
10 votes
4 answers
6k views

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. ...
radiantshaw's user avatar
7 votes
1 answer
1k views

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. ...
Marcel Klehr's user avatar
7 votes
1 answer
853 views

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 ...
hengxin's user avatar
  • 9,561
7 votes
1 answer
1k views

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 ...
turingcomplete's user avatar
6 votes
1 answer
881 views

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 ...
George Robinson's user avatar
6 votes
0 answers
95 views

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 ...
user avatar
5 votes
1 answer
1k views

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 ...
Ryan Lyu's user avatar
  • 249
4 votes
3 answers
570 views

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 ...
Abderrahim ben's user avatar
4 votes
3 answers
2k views

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 ...
Maksim Yegorov's user avatar
3 votes
1 answer
207 views

Are vector clocks useful in centralized systems?

Vectors clocks seem to be a common way to synchronize the partial ordering of events in a distributed, peer-to-peer, system across all clients. Is there any benefit to using them in a centralized ...
Alex Chumbley's user avatar
3 votes
1 answer
276 views

Lamport logical clock: why event occurs in a process with smaller pid is treated earlier?

In lamport's paper1, he define global local timestamp, which is composed of process id and local lamport timestamp. This timestamp is used to order all the events in a distributed system. The rule ...
Ryan Lyu's user avatar
  • 249
3 votes
1 answer
518 views

Resetting Vector clocks in distributed systems

I understand that vector clocks are preferred over lamport clocks because sometimes lamport clocks cannot account for the casuality and we use extra space to store the timestamps in the vector clocks. ...
Krishna Chaitanya's user avatar
3 votes
1 answer
1k views

How can I calculate the effective bandwidth of a memory system?

I am currently doing my homework for my Computer Architecture class. One of the questions asks: A computer has a 64-bit data bus and 64-bit-wide memory blocks. The memory devices have an access ...
PintSizeSlash3r's user avatar
3 votes
2 answers
219 views

Ordering of operations in a DAG of git commits

Context: I'm looking for a better state resolution algorithm for https://github.com/MichaelMure/git-bug Summary of the current algorithm and shortcomings git-bug is a distributed bug-tracker that ...
Michael Muré's user avatar
2 votes
1 answer
328 views

Why is an accurate time so important for servers and computers?

I just saw this short documentary about atomic clocks. The person working for the Atom clock company gets asked what would happen is all the atom clocks would be turned off and he replayed that cell ...
Jeff 's user avatar
  • 123
2 votes
2 answers
484 views

Whats the point of caching if the minimum single clock cycle time is the prorogation delay of the slowest component (fetching from DRAM)?

I know that the clock speed is determined by the slowest stage within the processor (usually fetch) because one clock cycle will take as much time as the slowest pipeline stage to ensure everything is ...
Fady's user avatar
  • 33
2 votes
1 answer
172 views

Applying information theory to processor clocks

Has there been any research on the subject of applying information theory to a processors clock? It occurred to me that a clock is actually transmitting data that is used for synchronization of ...
Rory O'Hare's user avatar
2 votes
1 answer
130 views

What information needs to be saved in a Lamport clock system to deduce message causality?

By using Lamport timestamps, we can determine the causality of messages. It is however unclear to me how one would deduce this simply from the lamport timestamp of the message. Take the following ...
user129186's user avatar
2 votes
1 answer
7k views

Clock skew vs clock offset in the context of clock synchronization network protocols

In the context of clock synchronization among nodes of a network, what is clock offset and what is clock skew? Are these terms synonymous or is there a difference between them?
davitenio's user avatar
  • 173
2 votes
0 answers
50 views

Finding the timestamps of processes implementing Lamport's clocks

I have been asked this question, but don't know how to go about answering it. Three process, which are implementing Lamport's clocks, are running and a lot of events are taking, place including some ...
Agent smith 2.0's user avatar
1 vote
1 answer
233 views

How do computers synchronize their clocks with the standard time

I'd like to know how clock synchronization is done on computers, I've read this wikipedia article however it didn't give me exactly what I was looking for, I'll outline the problem I'd like answered: ...
Mathew's user avatar
  • 209
1 vote
1 answer
88 views

What happens when two different nodes have the same Lamport clock ID

With Lamport clocks, each node keeps its own counter. Before sending a message, a node increments its counter by one: LC(A)=LC(A)+1, and sends ...
A. Darwin's user avatar
  • 113
1 vote
1 answer
89 views

can UTC replace Lamport logical clocks?

if UTC is universal, what drawbacks does it have in using it in a distributed system to coordinate events or use it as a global objective reference clock? isn't it right to just use UTC to timestamp ...
ezio's user avatar
  • 111
1 vote
1 answer
467 views

How can this MIPS processor execute one instruction in one cycle?

I'm reading section 7.3 (SINGLE CYCLE PROCESSOR) of Digital Design and Computer Architecture, Second Edition by David Money Harris. At the end of the section the autor shows this MIPS processor and ...
EmTor's user avatar
  • 13
1 vote
2 answers
45 views

What is an example of an algorithm that requires synchronised clocks?

What is an example of an algorithm that requires synchronised clocks? Synchronised in an absolute sense, not just synchronised clock rates. For more background, I've read Barbra Lisksov's 1993 paper '...
MattCochrane's user avatar
1 vote
0 answers
44 views

Can a distributed system designed with logical clocks truly derive a total ordering of events?

I’m reading Leslie Lamport’s white paper, “Time, clocks, and the ordering of events in a distributed system”. His explanation for total ordering has me a bit confused in the following excerpt. I've ...
Shawn Armstrong's user avatar
1 vote
0 answers
33 views

What is time stamp in asynchronous transmission?

I am new to CS, and learning asynchronous transmission. Asynchronous Transmission typically also uses SYNC word/bits to provide occasional time stamp for receiver to synchronise its clock to ...
Chris Tang's user avatar
1 vote
0 answers
292 views

calculate average CPI [closed]

I cannot solve this exercise: "If a processor has a cache hit rate of 99.5% and a cache miss penalty of 160 core processor cycles, what will the average CPI be for 1,000 instructions?" how can i do ...
hagard's user avatar
  • 27
1 vote
0 answers
92 views

Processor system synchronization?

Processor has the internal clock which is a multiplier of the main clock which is present on the motherboard which is designed by keeping in mind the critical path and the slowest device on board, ...
Muhammad Usman's user avatar
1 vote
1 answer
222 views

Is potential causality relation equals to set of consistent happens before relations?

In a book dedicated to distributed algorithms, I found the following definition - potential causality diagram is consistent with happens before diagram if potential causality relation between system ...
Andrey Lomakin's user avatar
0 votes
1 answer
105 views

Why computer didn't use cesium atom to define 1 second?

As far I know computer using crystal oscilator to define 1 second and it's not real 1 second, i mean it's not stable. While real clock using cesium and we know cesium is stable, why doesn't computer ...
Muhammad Ikhwan Perwira's user avatar
0 votes
2 answers
2k views

Vector clock :why Singhal Kshemkalyani differential technique require FIFO for message passing?

Singhal–Kshemkalyani’s differential technique is based on the observation that between successive message sends to the same process, only a few entries of the vector clock at the sender process ...
sunil's user avatar
  • 101
0 votes
1 answer
139 views

Does two system's clock synchronises to communicate with each other?

If two computer system's has to do some kind communication like data transfer or receiving should its clock sync to do that?If not then how they transfer bytes without having syced clocks?
Vignesh's user avatar
  • 47
0 votes
1 answer
2k views

Metrics on which Clock Cycles Per Instruction(CPI) depends

In the book - Computer Organization and Design: The Hardware/Software Interface [RISC-V Edition] by Patterson and Hennessy, CPI is defined like this: The term clock cycles per instruction, which is ...
Haslo Vardos's user avatar
0 votes
1 answer
97 views

How does Lamport imply anomalous behavior is impossible given these constraints?

Lamport's paper: Time, Clocks, and the ordering of Events in a Distributed System Anomalous behavior occurs because Lamport's logical clocks are not enough to guarantee that the total ordering of ...
Anthony O's user avatar
  • 177
0 votes
1 answer
237 views

Why does the converse of the clock condition imply that any two concurrent events occur at the same time?

In Lamport's paper, Time, Clocks, and the ordering of Events in a Distributed System he says that the converse of the clock condition does not hold and if it did, we could expect concurrent events to ...
Anthony O's user avatar
  • 177
0 votes
1 answer
1k views

Calculating CPU throughput on a single cycle vs multicycle datapath

When calculating the throughput of a CPU, how does it differ when it is implemented with a single cycle datapath versus a multicycle datapath? If for example the CPU is running 1 GHz freq, then ...
HotWheels's user avatar
  • 113
0 votes
1 answer
288 views

Why does Lamport clocks increment on both message received and sent?

According to wikipedia, Lamport clocks need to be incremented when sending a message (time = time + 1) and when receiving a message (...
Michael Muré's user avatar
0 votes
0 answers
47 views

Design of a synchronized clock

I was living in a country where Internet wasn't that fast so the younger me had the following idea for compressing data Let say 2 parties want to send data to each other, we know that data can be ...
user avatar
0 votes
1 answer
75 views

How can one tell when will the state of the circuit components change? [closed]

The system clock is needed to synchronize all components on the motherboard, which means they all do their work only if the clock is high; never when it's low. And because the clock speed is set above ...
user79161's user avatar
  • 103
0 votes
0 answers
143 views

Understanding leslie lamport's spacetime diagram with tick lines

I am trying to understand tick lines in Fig 2 on Page 2 of "Time, Clocks, and the Ordering of Events in a Distributed System" paper [1]. Below are 2 things which I did not understand What is the ...
rahul's user avatar
  • 101
-1 votes
1 answer
2k views

How was counted one second in computers

I would like to know how was counted 1 second in computers. I mean how machine can understand period of 1 second. Who and when resolved this problem, and more important how ?
Davit's user avatar
  • 23