patternMinor
One rational interval function and one irrational, will they ever collide?
Viewed 0 times
intervalfunctioncolliderationalirrationalonewillandeverthey
Problem
This question may be a little mathy or hardware-y, so I may have to ask elsewhere.
I've recently learned that if a is a positive rational number and b is a positive irrational number, there exists no common multiple between the two.
A common design consideration in threaded or embedded systems is concurrency control, when two functions or threads share resources.
So if function A runs every sqrt(2) seconds, and function B runs every 1 second, they will never run at the same time.
Is it somehow possible to use very accurate measured numbers, to make this possible? Or is it possible using exact/symbolic programs/tools? Or is it not possible at all in machine/computer computational formats?!
I've recently learned that if a is a positive rational number and b is a positive irrational number, there exists no common multiple between the two.
A common design consideration in threaded or embedded systems is concurrency control, when two functions or threads share resources.
So if function A runs every sqrt(2) seconds, and function B runs every 1 second, they will never run at the same time.
Is it somehow possible to use very accurate measured numbers, to make this possible? Or is it possible using exact/symbolic programs/tools? Or is it not possible at all in machine/computer computational formats?!
Solution
Could you make a theoretical device that could measure an irrational number of seconds? Maybe, but that would be impossibly hard. In the real world the computers clock, which runs the scheduler, is made out of a vibrating piece of quartz creating the ticks. This is vibrating at a few billion times per second. You will never get resolution of time between the vibrations so it provides us with an implicit limit on how accurately we can measure time.
Context
StackExchange Computer Science Q#69652, answer score: 3
Revisions (0)
No revisions yet.