[net.micro.68k] timing loops and context switching

campbell@sauron.UUCP (Mark Campbell) (02/21/86)

One last (I hope) word about this stuff...concerning context switches and
timers with respect to timing delays inherent in some devices.  It really
doesn't make a lot of sense to talk about setting up a timer to implement
these delays, even if the delay were much longer than ~2us.  The problem
is not only the context switching times others have mentioned, but the
overhead associated with setting up some type of critical region around
the device in question.  With two or more processes attempting to
access the device, the "sleep"/"wakeup" scheme just won't cut it.  This
isn't speculation; I recently had to build some tightly-coupled
interprocessor communication code that required that a new state be added
to Unix for just this reason.  It wasn't a pretty sight...
-- 

Mark Campbell    Phone: (803)-791-6697     E-Mail: !ncsu!ncrcae!sauron!campbell

rocky@hpfcla.UUCP (02/23/86)

> Suppose it can execute 32,768 instructions per second.  Now, suppose you
> have a clock that counts in 1/65536ths of a second.  Then, as far as you
> are concerned, it's impossible to tell the clock is running that fast...

Reminds me of the Nyquist sampling limit, stated a little differently:
you can't accurately rebuild a signal from repetitive samples unless
you sample at least twice the rate of the highest frequency contained
in the signal.  Just a throwback from years ago in analog land :-)

Rocky "Where did the z-plane go" Craig
hpfcla!rocky
Hewlett-Packard  Ft. Collins, Colorado

greg@utcsri.UUCP (Gregory Smith) (03/04/86)

In article <19900001@hpfcms.UUCP> rocky@hpfcla.UUCP writes:
>
>> Suppose it can execute 32,768 instructions per second.  Now, suppose you
>> have a clock that counts in 1/65536ths of a second.  Then, as far as you
>> are concerned, it's impossible to tell the clock is running that fast...
>
>Reminds me of the Nyquist sampling limit, stated a little differently:
>you can't accurately rebuild a signal from repetitive samples unless
>you sample at least twice the rate of the highest frequency contained
>in the signal.  Just a throwback from years ago in analog land :-)
                                       ^^^^^ ^^^ ??
What about digital audio / CD's  / digital voice transmission / digital
video etc...?
>Rocky "Where did the z-plane go" Craig
The z-plane is alive and well in a stereo store near you...
-- 
----------------------------------------------------------------------
Greg Smith     University of Toronto       ..!decvax!utzoo!utcsri!greg