`5,654,905
`[11] Patent Number:
`United States Patent
`’
`3
`Aug. 5, 1997
`[45] Date of Patent:
`Mulhollandetal.
`
`
`115
`
`[54] SYSTEM FOR TRACKING COMPUTER
`USAGE TIME
`
`5,557,784
`
`9/1996 Dayan et al.
`
`....cssssccssosessessrneee 395/550
`
`[75]
`
`Primary Examiner—James P. Trammell
`Inventors: Candace Mulholland, Foothill Ranch;
`Assistant Examiner—Craig Steven Miller
`Jason T. Kurashige, Irvine, both of
`Attorney, Agent, or Firm—Knobbe, Martens, Olson & Bear,
`Calif.
`LLP
`[73] Assignee: AST Research, Inc., Irvine, Calif.
`ABSTRACT
`57
`s
`7]
`c
`[21] Appl. No.: 528,945
`A system tracks the amount oftime a computer system has
`[22] Filed:
`Sep. 15, 1995
`operated, after its delivery to a new user. The system
`GO6F 1/14
`[51]
`Int. CL®
`[52] US Cl eee364/569.364/2813: 305/557__includesaterminate andstay resident (TSR) program which
`
`[58] Field of Search w.csmessnesssnennunanu 364/552, 569,
`18 loaded each time the computer is booted. The program
`364/280, 281.3, 264, 286.4, 925.2; 371/29.1;
`counts system timerticks and, at predetermined intervals but
`395/650, 700, 550, 557-750
`only when the operating system isidle, logs the amountof
`.
`time counted in a log file located on the computer’s local
`References Cited
`hard drive.
`U.S. PATENT DOCUMENTS
`
`[56]
`
`5,390,324
`
`2/1995 Burckhartt etal. ....osscssssessseee 395/375
`
`4 Claims, 6 Drawing Sheets
`
`
`7 PARAMETER A
`
`
`
`
`OK TO
`
`TERMINATE.
`
`& STAY RESIDENT
`?
`
`VALID INTERVAL
`
`
`SUCCESSFUL
`?
`
`IS
`ManualLock
`
`OR AutoLock
`FLAG SET,
`
`
`
` CREATION
`
`2
`TIO
`
`
`TERMINATE AND
`STAY RESIDENT
`
`Ie
`
`
`
`BootCount =
`
`
`MaxBoots
`?
`
`
`UPDATE LOG FILE
`CHAIN OWN TIMER,
`IDLE
`
`SET IntervalTicks
`& MULTIPLEX INTERRUPT
`
`
`HANDLERS TO INTERRUPT
`SET Maxlntervals
`
`
`VECTOR CHAINS
`SET _TicksLeft
`
`
`Google Exhibit 1012
`Google Exhibit 1012
`Google v. Valtrus
`Google v. Valtrus
`
`
`
`U.S. Patent
`
`Aug.5, 1997
`
`Sheet 1 of 6
`
`5,654,905
`
`
`
`
`
`
`
`
`Ce
`
`J
`xT\)
`“sy SPURNS
`cy XUNAD
`ay
`SLIPRELAY
`XT
`XPD TANro
`YAN
`Ve
`= te!
`_Y eX
`XY[A
`.S RY>
`CANES
`>
`vs
`eNO
`
`
`
`
`U.S. Patent
`
`Aug. 5, 1997
`
`Sheet 2 of 6
`
`5,654,905
`
`50
`
`52
`
`woe
`
`70
`
`60
`
`HARD
`
`16
`
`FLOPPY
`DRIVE
`
`12
`
`MONITOR
`
`b4
`
`OF
`
`TIMER
`
`KEYBOARD
`
`FIG. 2
`
`
`
`U.S. Patent
`
`Aug. 5, 1997
`
`Sheet3 of 6
`
`5,654,905
`
`700
`
`
`
`
`ANY
`COMMAND
`LINE PARAMETER
`
`2
`
`
`
`
`
`IO?
`
`
`
`PARAMETER A
`VALID INTERVAL
`
`YES
`
`NO
`
`I
`O06
`
`FIG. SA\FIG.3B
`
`SET IntervalMinutes
`= DEFAULT VALUE
`
`SET IntervaiMinutes
`= PARAMETER VALUE
`
`FIG, F
`
`
`=&
`
`OK TO
`
`TERMINATE
`
`
`& STAY RESIDENT
`?
`
`
`
`VIZ
`
`AG 54
`
`
`
`FILE
`
`
`CREATION
`SUCCESSFUL
`
`
`
`ManualLock
`
`OR AutoLock
`YES
`FLAG SET
`
`
`
`NO
`INCREMENT BootCount
`
`120
`
`4
`
`[SET AutoLock
`FLAG
`
`126
`
`122
`
`
`DOES
` YES
`
`BootCount =
`
`MaxBoots
`?
`
`
`
`UPDATE LOG FILE
`SET IntervalTicks
`SET Maxintervals
`SET TicksLeft
`
`A350
`
`
`TERMINATE AND
`STAY RESIDENT
`
`
`
`128
`
`
`
`IDLE
`CHAIN OWN TIMER,
`& MULTIPLEX INTERRUPT
`
`
`HANDLERS TO INTERRUPT
`VECTOR CHAINS
`
`
`
`
`U.S. Patent
`
`Aug. 5, 1997
`
`Sheet4 of 6
`
`5,654,905
`
`Hoes
`LOG FILE
`EXIST
`?
`
`DELETE LOG
`FILE
`
`LE
`
`SET ManualLock FLAG
`& UPDATE LOG FILE
`
`062
`DISPLAY ERROR
`MESSAGE
`
`DATA
`
`RESET LOGGED DATA
`& UPDATE LOG FILE
`
`DISPLAY LOGGED
`
`
`
`U.S. Patent
`
`Aug. 5, 1997
`
`Sheet 5 of 6
`
`5,654,905
`
`DosTimer
`
` 1S Process
`
`
`
`FLAG SET
` IS DosTimer
`Executing
`FLAG SET
` SET DosTimer
`
`
`Executing
`FLAG
`
`
`SOL
`FIZ
`
`
`RETURN
`
` CLEAR
`
`
`
`DosTimer
`Executing
`
`
`INCREMENT
`
`FLAG
`IntervalCount
`
`
`
`FL
`
`
`|
`SET
`
`
`IntervalCount
`
`
`DoUpdateFile
`
`=Maxintervals
`
`
`FLAG
`
`
`FIG,
`
`
`
`U.S. Patent
`
`Aug. 5, 1997
`
`Sheet 6 of 6
`
`5,654,905
`
`Dosldle
`
`
`
` IS Dosldle
`Executing
`FLAG SET
`
`
`
`IS
`
`
`DoUpdateFile
`FLAG SET
`
`4OZ
`
`SET Dosidie
`Executing
`FLAG
`
`#70
`
`
`
`
`
`
`
`
`
` ManuallLock
`
`IS SYSTEM
`
`CLEAR Dosidle
`
`
`SEATEREADY 82.
`recut
`
`
`a,
`FLAG
`
`
`
`YES
`
`UPDATE
`LOG FILE
`
`
`CLEAR
`
`DoUpdateFile
`FLAG
`
`OR AutoLock
`FLAG SET
`
`CLEAR Process
`FLAG
`
`FIG,
`
`OB
`
`
`
`5,654,905
`
`1
`SYSTEM FOR TRACKING COMPUTER
`USAGETIME
`
`BACKGROUND OF THE INVENTION
`
`1. Field of the Invention
`This invention relates to systems for tracking the amount
`of time a computer has been operating. More specifically,
`this invention relates to background executing programs that
`track the amountof time a computerhas operated after it has
`been delivered to a new user.
`2. Description of Related Art
`Computer sellers are sometimes asked to accept returned
`computer systems. Because the seller has no way of know-
`ing how muchthe otherwise new system has been used, it is
`often forced to resell the computer as a used system, which
`of course commands a lower price. Were there some method
`of tracking the amountof time that a new computer system
`has been operated before its return, the seller could resell
`returned systems that were used infrequently or notat all for
`a much higher price.
`,
`There is thus a need for a method or system for tracking
`the amount of time a new computer system has been
`operated, after it has been delivered to a new user.
`
`SUMMARY OF THE INVENTION
`
`The present invention is a system for tracking the amount
`of time a computer has been operated, after the computer has
`been delivered to an end user. The system comprises a time
`logging program which is loaded into the computer’s
`memory, and which is activated in a background mode each
`time the computer is booted. The time logging program
`counts timer interrupts issued by the computer’s timer, and
`updates a log file located on the computer’s hard drive at
`predeterminedintervals. The log contains data representing
`the amountof time the computer has been on. Because the
`program operates in background mode, its execution is
`virtually transparent to the user, thus providing an elegant
`and unobtrusive method for tracking the amountof time the
`computer has been used. In the preferred embodiment, the
`time logging program is a DOS-based Terminate and Stay
`Resident (TSR) program.
`In accordance with another aspect of the present
`invention,
`the time logging program intercepts idle
`interrupts, which are issued by the computer’s operating
`system whenever it is idle. The time logging program
`updates the log file only during these idle periods, thus
`further ensuring that the program’s operation does not
`interfere with the computer’s other tasks.
`Moreover, in the preferred embodiment of the present
`invention the log file and the executablefile are hiddenflies,
`making them invisible to the casual user.
`The time logging program ceases operating after it has
`counted a predetermined number of timer interrupts, In
`addition, the time logging program counts the number of
`times the computer executes the TSR program, which gen-
`erally corresponds to the number of times the computer is
`booted, and likewise ceases operating after it has counted a
`predetermined number of boots.
`The time logging program can beactivated with an input
`parameter to disable further operation.
`
`BRIEF DESCRIPTION OF THE DRAWINGS
`
`FIG. 1 is perspective view of a computer system, into
`which the present invention may be incorporated.
`
`10
`
`15
`
`20
`
`25
`
`30
`
`35
`
`45
`
`50
`
`55
`
`65
`
`2
`FIG. 2 is a simplified block diagram of a computer
`system, into which the present invention may be incorpo-
`rated.
`
`FIGS.3A and 3B are flowcharts describing the operation
`of the preferred embodiment’s Initialize function, FIG. 3
`shows the relationship between FIGS. 3A and 3B.
`FIG. 4 is a flowchart describing the operation of the
`preferred embodiment’s DosTimer function.
`FIG. 5 is a flowchart describing the operation of the
`preferred embodiment’s DosIdle function.
`
`DETAILED DESCRIPTION OF THE
`PREFERRED EMBODIMENT
`
`FIG.1 illustrates an exemplary computer system 10 into
`which the present invention is advantageously incorporated.
`The computer system 10 comprises a base unit 11, a monitor
`12, a keyboard 14, and a flexible disk drive 16. The keyboard
`12 provides user access to the computer system 10, and the
`monitor 14 displays data and other information generated by
`the computer system 10. Theflexible disk drive 16 permits
`a userto transfer software and data to and from the computer
`system 10. The computer system 10 may advantageously
`include other peripheral devices, such as, for example, a
`printer (not shown).
`FIG. 2 is a highly simplified block diagram of the com-
`puter system 10 showing a microprocessor or central pro-
`cessing unit (CPU) 50, a random access read/write memory
`(RAM)subsystem 52, and an input/output (I/O) subsystem
`54, connected to a common system bus 56. A number of
`peripheral devices, such as, for example, a hard disk drive
`60, the floppy disk drive 16, a timer subsystem 64, the
`keyboard 14 and the monitor 12, communicate with the
`microprocessor 50 via the I/O subsystem 54 and the system
`bus56.In addition, various components connected to the /O
`subsystem 54 generate interrupts which are communicated
`to the microprocessor 50 via one or more interrupt lines 70.
`Oneskilled in the art will appreciate that the I/O subsystem
`54 may include a number of different buses, such as, for
`example, a peripheral componentinterconnect (PCD bus, an
`Industry Standard Architecture (ISA)bus, a video local bus,
`and the like, which are not shown in FIG. 2. The computer
`system 10 is configured in a conventional manner andis not
`altered in any manner in order to incorporate the present
`invention other than to load and run the program described
`herein. Thus, it is not believed to be necessary to further
`describe the basic structure or operation of the computer
`system 10.
`The preferred embodimentofthis invention is a Terminate
`and Stay Resident (TSR) computer program called
`“Tracker”. The Tracker program is loaded automatically by
`the computer’s DOS operating system whenever the com-
`puter is booted. Because the Tracker program is a TSR,it
`can operate while other computer programs are running.
`Moreover, the Tracker program’s operation is invisible to
`the user, so that the user will not be alerted to its presence
`or tempted to disable it.
`Briefly described, the Tracker program monitors the com-
`puter system’s timer and, at predetermined intervals (by
`default, every thirty minutes), stores the amount of time
`intervals the computer system has been operating in a logfile
`located on the computer’s hard drive. The Tracker program
`also logs the number of times the computer system has been
`booted. After a sufficient period of time has been monitored,
`or after a sufficient number of boots have been logged, the
`Tracker program disables its logging function and further-
`more prevents itself from running as a logger when the
`
`
`
`5,654,905
`
`3
`computer is booted in the future. In an alternative
`embodiment, the Tracker program also stores the time and
`date when the computer system is first booted andthelogfile
`is created.
`
`The Tracker program has three main components: (1) an
`Initialize function, which is called when the program is first
`loaded, and which sets up the program’s counters and
`prepares the program to terminate and stay resident; (2) a
`DosTimer function, which intercepts and counts the number
`of DOStimer interrupts issued by the computer system’s
`timer; and (3) a DosIdle function, which intercepts the DOS
`idle interrupt and, when enough timer ticks to reach one
`interval have been counted, updatesa logfile, located on the
`computer’s hard disk, to reflect the total time the computer
`has been operating.
`The Tracker program is designed to accept one(optional)
`command-line argument. This argument can be either a
`number representing a valid interval time in minutes, or one
`of the commands DELETE, LOCK, RESET, OR SHOW.
`(Theeffect of these commandswill be described below.) If
`no argument is provided or if a valid interval time is
`provided. the Tracker program terminates but stays resident,
`and begins logging the time the computer is on. (If no
`argumentis given, the default interval time of thirty minutes
`is used.) If, on the other hand, a commandis given, the
`Tracker program performs the requested function and
`terminates, but does not stay resident.
`In the preferred embodiment, the computer system 10 is
`an IBM-PC compatible computer using the DOS operating
`system. As is well known to most DOSusers, when such a
`computer is turned on or restarted (“booted”), the DOS
`operating system executes a batch command file called
`“AUTOEXEC.BAT”, if such a file exists. The AUTOEX-
`EC.BAT file typically performs basic startup functionssuch
`as loading device drivers and setting up the DOS environ-
`ment. In the preferred embodiment, the computer seller
`configures the AUTOEXEC.BAT file so that it executes the
`Tracker program (which is located on the computer’s hard
`disk) without a command-line argument. In this way, the
`Tracker program loads andstarts running, using the default
`interval
`time, each time the computer is booted.
`Alternatively,
`the computer seller may configure the
`AUTOEXEC.BAT file so that it executes the Tracker pro-
`gram using an interval time other than the default interval
`time.
`
`For the reader’s aid in following the description below,
`the Tracker program uses the following variables:
`BootCount: the number of boots counted.
`IntervalCount: the numberof intervals counted.
`ManualLock: a flag that, when set, stops the Tracker
`program from operating.
`AutoLock: another flag that, when set, stops the Tracker
`program from operating.
`Process: another flag that, when set, stops the Tracker
`program from operating.
`DoUpdateFile: a flag that, when set, causes the Tracker
`program to update the logfile.
`IntervalMinutes: the number of minutes per interval.
`IntervalTicks: the numberof timer ticks per interval.
`TicksLeft: the number of timer ticks remaining before
`IntervalTicks ticks have been counted.
`MaxBoots: the maximum number of boots to count.
`MaxIntervals: the maximum numberof intervals to count.
`FIGS.3A and 3B illustrate the Tracker program’s Initial-
`ize function, which is called as soon as the Tracker program
`
`15
`
`20
`
`25
`
`45
`
`50
`
`55
`
`65
`
`4
`has been loaded into memory and executed. Beginning at a
`step 100 in FIG.3A,the Initialize function checks whether
`any command-line parameters were specified. If so, the
`parameteris tested at a step 102 to determineif it is a number
`representing an interval time, in minutes. In the preferred
`embodiment, the interval time is in the range 30 to 60
`minutes, although other ranges may be used. An interval of
`30 minutes causes the computer system to be activated only
`twice per hour to update the logfile. Thus, in a system where
`the disk drive is powered down during periods of inactivity
`by the user, the disk drive is powered up infrequently to
`update the log file such that the useris not as likely to notice
`the disk activity than if the log file is updated more often.
`Onthe other hand, interval times longer than 60 minutes
`significantly affect the Tracker program’s accuracy in log-
`ging operating time. This is because whenever the computer
`is shut down or rebooted, the Tracker program will not
`record the fraction of an interval that it has already counted.
`Thus, the Tracker program consistently underestimates the
`amount of time the computer has been used, by an amount
`proportional to the interval time. Longer interval times,
`therefore, lead to larger underestimations.
`If no argument is specified, the Initialize function sets
`IntervalMinutes to the default interval time of 30 minutes at
`a step 104. If a valid interval was specified, the Initialize
`function sets IntervalMinutes to the specified interval timeat
`a step 106. Next, at a step 108, the Initialize functiontests
`whether it is possible for the Tracker program to terminate
`and stay resident (TSR). The Initialize function performs
`this test in a manner well knownin the art by using the DOS
`multiplex interrupt (2F hex) to determine whether
`Microsoft® Windows™ is executing and whether the
`Tracker program is already resident.If the Initialize function
`determines that the Tracker program cannot terminate and
`stay resident, the program terminates at a step 109 (FIG.
`3B).
`The Initialize function next tests at a step 110 whetherthe
`Trackerlog file exists. In the preferred embodiment, the log
`file is identified by the name “~AST.LOG”, and is stored as
`a hiddenfile located in the local hard drive’s root directory
`(usually the “C:\’ directory). The logfile is hidden so that
`the user will not notice it and will not be tempted to alterit.
`If the log file does not exist, the Initialize function creates
`the log file at a step 112. The log file contains information
`for the following variables: BootCount, IntervalCount,
`IntervalMinutes, ManualLock, and AutoLock. In an alter-
`native embodiment, the log file also includes the date and
`time whenthe log file wasfirst created when the consumer
`first booted the computer system. As discussed above, the
`log file is created so that it is a hidden file. When first
`created, the log file variables are all zeroed, except the
`IntervalMinutes variable, which is set to the current Inter-
`valMinutes value (either the default of thirty minutes, or
`whatever interval time was specified in the command-line
`argument). The Initialize function further checks at a step
`114 whetherits attempt at creating the log file was success-
`ful. If not, the program terminatesat the step 109 (FIG.3B).
`If the log file does exist, the Initialize function loads the
`data from the log file into its variables. Initialize then
`ensures at a step 116 that the logfile’s IntervalMinutes value
`is the same as the specified (or default) IntervalMinutes
`value. This check is necessary because the Tracker program
`logs the number of intervals counted, not the number of
`minutes counted, and therefore if the Tracker program is
`directed to log at intervals different from the log file’s
`interval time, the IntervalCount value will have an indeter-
`minate meaning. For this reason, if the log file’s Interval-
`
`
`
`5,654,905
`
`5
`Minutes value does not agree with the current IntervalIM-
`inutes value, the program terminates at the step 109 (FIG.
`3B).
`If the log file does exist and if the log file’s IntervalM-
`inutes value agrees with the current IntervalMinutes value,
`the Initialize function also ensures at a step 118 that neither
`its ManualLock flag nor its AutoLock flag is set. Either of
`these flags directs the Tracker program to stop operating.
`Thereforeif either flag is set, the program terminates at the
`step 109 (FIG. 3B).
`If the program proceeds through the foregoing tests
`without terminating, the Initialize function increments the
`BooctCountvariable at a step 120, and then at a step 122
`checks whether a predetermined maximum numberof boots
`(MaxBoots) have been counted.
`In the preferred
`embodiment, MaxBoots is set to 1,500, representing the
`assumption that after 1,500 boots, the system is sufficiently
`used that further usage tracking is unnecessary. If MaxBoots
`(e.g., 1,500) boots have been counted, the Initialize function
`sets the AutoLock flag at a step 124.
`In any case, the Initialize function then updates thelogfile
`at a step 126 so that it contains the current set of logged
`variables. At this time, the Initialize function also calculates
`the numberofticks required per interval (IntervalTicks), and
`sets the TicksLeft variable to this number. IntervalTicks is
`equal to IntervalMinutes multiplied by 1,091, which closely
`approximates the 1,090.9 ticks per minute for an IBM-
`compatible computer’s system timer when the computer
`system is executing under DOS.TheInitialize function also
`calculates MaxIntervals, which sets the maximum number
`of intervals the Tracker program will count before disabling
`itself. In the preferred embodiment, MaxIntervals is equal to
`90,000 minutes (1,500 hours) divided by IntervalMinutes, so
`that the Tracker program will log time for the first 1,500
`hours the computer is on, and then stop.
`Finally, at a step 128 the Initialize function chains the
`Tracker program into the DOS timer, idle, and multiplex
`interrupt vectors, and then terminates and stays residentat a
`step 130. The process for hooking a TSR program into
`interrupt vectors is well-known in the art and need not be
`described here. It is necessary only to note that the Tracker
`program’ s Dosldle function is chained into the DOSidle (28
`hex) interrupt vector, and that the Tracker program’s Dos-
`Timer function is chained into the DOS timer (08 hex)
`interrupt vector, so that the DosIdle function is called
`whenever the DOS systemis idle, and the DosTimer func-
`tion is called at each DOStimer tick.
`Asillustrated in FIG. 3B,if the command-line parameter
`passed to the Tracker program was not a valid interval, the
`Initialize function checks at a step 200 whether the param-
`eter is a valid keyword. As discussed above, valid keywords
`are DELETE, LOCK, RESET, and SHOW. If the parameter
`is not a valid keyword, the program terminates at the step
`109.
`If on the other hand the parameteris a valid keyword,the
`Initialize function displays a brief heading giving the
`Tracker program name and copyright information, and then
`determines whether the logfile exists at steps 202 and 204.
`If no log file exists, the Initialize function displays an error
`message at a step 206 and then the program terminatesat the
`step 109.
`If the log file exists at the step 204, then the Initialize
`function respondsto the keyword commandin the command
`line as follows.
`If the DELETE keywordis found in the commandlineat
`a step 210, the Initialize function deletes the logfile at a step
`212 and then terminates at the step 109.
`
`10
`
`20
`
`25
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`60
`
`65
`
`6
`If the LOCK keyword is found in the command line at a
`step 220, the Initialize function sets the ManualLock flag
`and updatesthe logfile at a step 222. Then, ata step 224, the
`Initialize function displays the logged data. The Initialize
`function then terminates at the step 109,
`If the RESET keyword is foundin the commandline at a
`step 230,
`the Initialize function zeroes the BootCount,
`IntervalCount, ManualLock, and, AutoLock variables and
`updates the logfile at a step 232. The Initialize function then
`displays the logged data at the step 224 and then terminates
`at the step 109.
`If the SHOW keyword is found in the commandline at a
`step 240,
`then, at the step 224,
`the Initialize function
`displays the number of hours logged (IntervalCount times
`IntervalMinutes divided by 60),
`the number of boots
`counted, the IntervalMinutes period, and whether the Manu-
`alLock or AutoLock flags are set. The Initialize function
`then terminates at the step 109.
`These keyword commandsare notpublished as part of the
`system documentation, and are intended to be used only by
`the seller prior to shipping a new system or when a system
`is returned.
`If the Tracker program has succeeded in terminating and
`staying resident,
`the Tracker program’s DosTimer and
`DosiIdle functions will be called whenever a system timer
`interrupt or DOSidle interrupt occurs, respectively.
`The DosTimer function counts the numberof timer ticks
`issued by the system timer. As illustrated in FIG. 4, the
`DosTimer function’s first operation is to check the Process
`flag at a step 300 to determineif the Tracker program isstill
`intended to operate. This check is made early to ensure that,
`if the Tracker program should cease operation (if, for
`example,
`the requisite 1,500 hours logged have been
`reached), the DosTimer function exits quickly. Clearly, since
`the DosTimer function is called 1091 times each minute,it
`is advantageousfor the function to quit as scon as possible
`if its continued operation is unnecessary. If the Process flag
`is not set, the DosTimer function returns control to the
`interrupt calling function at a step 302.
`If the Process flag is set, the DosTimer function then
`checks aninternal flag (DosTimerExecuting) at a step 304 to
`determine if the DosTimer function has already been called.
`Although it is an unlikely event, it is possible for the
`DosTimer function to be called while the function is execut-
`ing. This can occur if the system timer issues an interrupt
`during the DosTimer function’s execution. For this reason,
`the DosTimer function must ensure that it is not already
`active, before continuing to execute. If the DosTimerEx-
`ecuting flag is already set, the DosTimer function returns
`control to the interrupt calling function at the step 302.
`If the DosTimerExecuting flag is not set, the DosTimer
`function then decrements the TicksLeft variable at a step
`306, and then checks whetherit has reached zero yetat a step
`308. Because TicksLeft was initialized to the value of
`IntervalTicks, when TicksLeft reaches zero, one interval has
`elapsed. If the TicksLeft variable is not zero, the DosTimer
`function returns control to the interrupt calling function at
`the step 302.If TicksLeft is zero, the DosTimer functionsets
`the DosTimerExecuting flag at a step 310, resets TicksLeft
`to IntervalTicks at a step 312, increments IntervalCountat a
`step 314, and then sets the DoUpdateFileflag at a step 316.
`Next, the DosTimer function checks whether Interval-
`Counthas reached MaxIntervals at a step 318.If it has, the
`DosTimer function sets the AutoLock flag at a step 320,
`which will (as discussed below) stop the Tracker program
`from operating further, after the log file has been updated
`onelast time. The DosTimer function then clears the Dos-
`
`
`
`5,654,905
`
`7
`TimerExecutingflag at a step 322 and returnscontrolto the
`interrupt calling function at the step 302.
`If at the step 318, the IntervalCount has not reached
`MaxIntervals, the DosTimer function clears the DosTimer-
`Executing flag at the step 322 and returns control to the
`interrupt calling function at the step 302.
`FIG. 5 illustrates the DosIdle function. The DosIdle
`functionis called in response to a DOSidle interrupt, which
`is issued whenever DOSis idle. Like the DosTimer function,
`the DosIdle function first checks an internal
`flag
`(DosIdleExecuting) at a step 400 to ensure that it is not
`already executing. If it is already executing, the DosIdle
`functions returns control to the interrupt calling function at
`a step 402. If it is not already executing, the DosIdle function
`checks whether the DoUpdateFile flag is set at a step 404.
`Because the DosIdle function’s only purpose is to update the
`log file, it need only operate when DoUpdateFile has been
`set.
`If the DoUpdateFile flag is set, the DosIdle function
`prepares for operation by setting the DosIdleExecutingflag
`at a step 406, and then checks the DOS system at a step 408
`to ensure that it is ready to accept a write request to the
`system’s local hard drive. As those with skill in the art will
`appreciate, this check is performed by checking the DOS
`CriticalError flag (whose location is determined at initial-
`ization time via a DOS interrupt (21 hex) function call) to
`ensurethatnocritical error has occurred in the DOS system.
`If a DOScritical error would preventthe logfile writing
`operation, the DosIdle function clears the DosIdleExecuting
`flag at a step 410 and then terminates by returning control to
`the interrupt calling function at the step 402. If not, the
`DosIdle function updates the log file, by writing to it the
`BootCount, IntervalCount, IntervalMinutes, ManualLock,
`and AutoLock values at a step 412. The DoslIdle function
`then clears the DoUpdateFile flag at a step 414.
`The DosIdle function next checks whether either the
`ManualLock or AutoLock flag is set at a step 416. If neither
`flag is set, the DosIdle function clears the DosIdleExecuting
`flag at a step 410 and returnsat the step 402. If either flag
`is set, the DosIdle function clears the Process flag (which
`will prevent the DosTimer function from further counting
`timer ticks) at a step 418, clears the DosIdleExecuting flag
`at the step 410, and returns control to the interrupt calling
`function at the step 402,
`The Tracker program thus provides a simple way of
`keeping track of the number of boots and the total operating
`time of the computer system 10 in a manner generally
`transparent to the system’s user. Thus, if the computer
`system 10 is returned to the seller, the seller can readily
`determine, by examining the log file (.e., by executing the
`Tracker program with the SHOW parameter in the command
`line), whether the computer system 10 has been used, and
`approximately how much it has been used.
`This invention may be embodied in other specific forms
`without departing from the essential characteristics as
`described herein. The embodiments described above are to
`be considered in all respects as illustrative only and not
`restrictive in any manner. The scope of the invention is
`indicated by the following claims rather than by the fore-
`going description. Any and all changes which come within
`the meaning and range of equivalency of the claimsare to be
`considered within their scope.
`.
`Whatis claimedis:
`1. A system for tracking the amount of time a computer
`has been operated after delivering the computer to an end
`user, said system comprising:
`a random access memory which stores data and execut-
`able programs while said computer is operating;
`
`20
`
`25
`
`30
`
`35
`
`40
`
`45
`
`50
`
`55
`
`65
`
`8
`a source of periodic interrupts to said computer;
`a non-volatile data storage device;
`a logfile located on said non-volatile data storage device,
`said log file containing data representing the mount of
`time said computer has been on; and
`a time logging program which is loaded into memory and
`which is activated in background mode each time said
`computer is booted, said time logging program count-
`ing said timer interrupts and updating said data in said
`log fie when a predetermined number of said timer
`interrupts has been counted, said log file thereby stor-
`ing a count representing a time duration for which said
`computer is operated, and wherein said time logging
`program ceases operating after it has counted a prede-
`termined number of timer interrupts.
`2. A system for tracking the amount of time a computer
`has been operated. after delivering the computer to an end
`user, said system comprising:
`a tandom access memory which stores data and execut-
`able programs while said computer is operating;
`a source of periodic interrupts to said computer;
`a non-volatile data storage device;
`a logfile located on said non-volatile data storage device,
`said log file containing data representing the amount of
`time said computer has been on; and
`a time logging program whichis loaded into memory and
`which is activated in background mode each time said
`computer is booted, said time logging program count-
`ing said timer interrupts and updating said data in said
`log file when a predetermined number of said timer
`interrupts has been counted, said log file thereby stor-
`ing a count representing a time duration for which said
`computer is operated, and wherein said time logging
`program also counts the numberof times said computer
`system is booted.
`3. A system for tracking the amount of time a computer,
`which has a memory and a non-volatile data storage device
`and which issues timer interrupts, is on, comprising:
`a logfile located on said non-volatile data storage device,
`said log file containing data representing the amountof -
`time said computer has been on; and
`a background executing program whichis loaded into said
`memory and activated each time said computer is
`booted, said background executing program intercept-
`ing and counting said timerinterrupts, said background
`executing program updatingsaid log file’s data when a
`predetermined numberof said timer interrupts has been
`counted, and wherein said time logging program ceases
`operating after it has counted a predetermined number
`of timer interrupts.
`4, A system for tracking the amount of time a computer,
`which has a memory and a non-volatile data storage device
`and which issues timer interrupts, is on, comprising:
`a log file located on said non-volatile data storage device,
`said log file containing data representing the amount of
`time said computer has been on; and
`a background executing program whichis loaded into said
`memory and activated each time said computer is
`booted, said background executing program intercept-
`ing and counting said timer interrupts, said background
`executing program updating said log file’s data when a
`predetermined numberof said timer interrupts has been
`counted, and wherein said time logging program also
`counts the number of times said computer system is
`booted.
`
`