PSN-L Email List Message

Subject: Re: Basic Programming Help desired?
From: Mike Price seapsn@........
Date: Sat, 10 May 2008 02:08:30 -0700


Regarding clocks in DOS (and all other OSes):
The RTC is used to set the operating system clock only at boot. After 
that, the OS keeps time from its own timer driven by a periodic 
interrupt. Since interrupts can be blocked (e.g. by other interrupts), 
the OS must take special care to ensure an accurate time of day clock. 
DOS is notorious for failing to do this properly as are most versions of 
windows.One hack is to sync the OS clock with the RTC clock periodically 
(by calling the clock program from a script). Another is to run ntp (not 
possible on a singly threaded OS like DOS). If you need an accurate 
clock in DOS, there are routines available that can read the RTC clock 
directly and ignore the DOS clock.

Regarding memory management in DOS.
The PC can directly (easily) address only 640KB of memory. This was a HW 
restriction of the original PC, preserved in DOS despite CPU 
improvements. Extended memory can provide many megabytes, but memory 
accesses are slower since all accesses are indirect (an address register 
is loaded, then memory is accessed). The compiler takes care of memory 
management behind the scenes, but you'll get better performance if the 
code and data fit into the 640KB. Given a Pentium, Windows or Linux will 
implement a linear memory model and give better performance for large 
arrays (generally).

Mike

Geoff wrote:
> another programming language, he's wanting to run his data capture 
> system on a low-spec machine (retired from other uses, I suspect).
>>
>> Kevin
>
> Nope, I used to run my program on a TRS Laptop With a
> 10MHz CPU (Z80 sound familiar ?) then some burglars
> stole that machine from my folks house which the
> insurance company replaced with Toshiba Satellite
> 205CDS and since the late 1990s (I think) I have been using that
> exclusively for seismic stuff.
> It has never been retired from anything I am aware of.
> Its RTC is terrible looses 1 second ( slow) every
> 4 hours or so Without a ring counter the WWV reception
> is so horrible Id have no decent calibration indicator
> for times. I can not compliment the Japanese
> in the calibration of their digital Quartz whatevers.
> Obviously this machine was never calibrated at operating
> temperatures. Although it keeps bad time it IS a rugged machine.
> In ruggedness it matches an old  timex watch commercial.
> If I could recommend something to all manufacturers
> of electronic devices it would be to calibrate their
> quartz clocks properly and build everything within a faraday shield.
>
>
>
>
>
> __________________________________________________________
>
> Public Seismic Network Mailing List (PSN-L)
>
> To leave this list email PSN-L-REQUEST@.............. with the body of 
> the message (first line only): unsubscribe
> See http://www.seismicnet.com/maillist.html for more information.
>
__________________________________________________________

Public Seismic Network Mailing List (PSN-L)


[ Top ] [ Back ] [ Home Page ]