I was thinking about any method where we can use RAM I/O speed, to calculate tim
ID: 654506 • Letter: I
Question
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 + 0.5 seconds so all in all we have three routines:
one for writing data (zeros for example) into RAM
another one for checking when a specific size is full
and the third for calculating time
Note: Sorry if it sounds stupid, because this is not my study field
Explanation / Answer
You could try to measure time from RAM transfer rates. You'd need to know the precise clock ratio between the RAM and the CPU. There would have to be a precise clock ratio; I don't think this is the case on typical PC architectures as the RAM and the CPU have their own clock and I'm not sure the RAM peak transfer rate is a constant.
You'd need to block all other sources of interrupts, because if the CPU is responding to some other interrupt, it may notice too late that the RAM is ready, so it would tend to drift.
The nail in the coffin is that while the CPU is waiting for the RAM, it isn't doing anything else. The same objection goes for anything that requires the CPU to perform computations to obtain the time
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.