Y
Yan
I just thought if this was possible under POSIX (or win32 or whatever).
As a programming excersize i wanted to think of a good way to do this.
The solution that came to mind is just have an endless loop, (the
process would listen for a signal to interrupt) and count microseconds
(or the smallest time possible, of the system clock). While the gaps
will be relatively low, the process is running, as soon as you get a gap
that's relatively large, the process has been switched and restored again.
This has no practical use, or at least i can't think of one, it's just
something I wondered if was possible to implement in a reliable
mechanism. I was reading about the inner workings of an OS and wondered
if this was possible purely from a user-space running process.
Your input?
-Yan
As a programming excersize i wanted to think of a good way to do this.
The solution that came to mind is just have an endless loop, (the
process would listen for a signal to interrupt) and count microseconds
(or the smallest time possible, of the system clock). While the gaps
will be relatively low, the process is running, as soon as you get a gap
that's relatively large, the process has been switched and restored again.
This has no practical use, or at least i can't think of one, it's just
something I wondered if was possible to implement in a reliable
mechanism. I was reading about the inner workings of an OS and wondered
if this was possible purely from a user-space running process.
Your input?
-Yan